allows for the use of . in onie identifiers and updates documentation

This commit is contained in:
Steven Noble
2016-08-26 10:20:45 -07:00
parent 14dd72b0ed
commit c776a7138d
6 changed files with 25 additions and 50 deletions

View File

@@ -224,7 +224,7 @@ class App(SubprocessMixin):
arch = getattr(self.machineConf, 'onie_arch', None)
if plat and arch:
self.log.info("ONL installer running under ONIE.")
plat = plat.replace('_', '-')
plat = plat.replace('_', '-').replace('.', '-')
elif os.path.exists("/etc/onl/platform"):
with open("/etc/onl/platform") as fd:
plat = fd.read().strip()

View File

@@ -32,7 +32,7 @@ def import_subsystem_platform_class(subsystem='onl', klass='OnlPlatform'):
if platform is None:
raise RuntimeError("cannot find a platform declaration")
platform_module = platform.replace('-', '_')
platform_module = platform.replace('-', '_').replace('.', '_')
# Import the platform module
m = importlib.import_module('%s.platform.%s' % (subsystem, platform_module))