Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
)
conn.import_module(remotes)
distro_name, release, codename = conn.remote_module.platform_information()
+ if not codename:
+ raise exc.UnsupportedPlatform(distro=distro, codename=codename)
+
machine_type = conn.remote_module.machine_type()
module = _get_distro(distro_name)
def platform_information():
""" detect platform information from remote host """
distro, release, codename = platform.linux_distribution()
+ if not codename: # this could be an empty string in Debian
+ debian_codenames = {
+ '8': 'jessie',
+ '7': 'wheezy',
+ '6': 'squeeze',
+ }
+ major_version = release.split('.')[0]
+ codename = debian_codenames.get(major_version, '')
+
return (
str(distro).rstrip(),
str(release).rstrip(),