diff --git a/pylib/aeon/opx/device.py b/pylib/aeon/opx/device.py index 841123c..03b3bec 100644 --- a/pylib/aeon/opx/device.py +++ b/pylib/aeon/opx/device.py @@ -35,8 +35,8 @@ def gather_facts(self): good, got = self.api.execute([ 'hostname', - """grep -oP '^OS_VERSION="\K.*\d' /etc/OPX-release-version""", - """grep -oP '^PLATFORM="\K.*\w' /etc/OPX-release-version""" + """grep -oP '^OS_VERSION=[\"]?\K.*\d' /etc/OPX-release-version""", + """grep -oP '^PLATFORM=[\"]?\K.*\w' /etc/OPX-release-version""" ]) facts['fqdn'] = got[0]['stdout'].strip() diff --git a/setup.py b/setup.py index dade005..ee6b1e2 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def requirements(filename): setup( name="aeon-venos", - version="0.9.17", + version="0.9.18", author="Jeremy Schulman", url='https://github.com/Apstra/aeon-venos', author_email="jeremy@apstra.com", diff --git a/tests/test_opx.py b/tests/test_opx.py index 5021987..a09149b 100644 --- a/tests/test_opx.py +++ b/tests/test_opx.py @@ -51,10 +51,10 @@ def mock_execute(args, **kwargs): results = [] for arg in args: # os_version - if arg == """grep -oP '^OS_VERSION="\K.*\d' /etc/OPX-release-version""": + if arg == """grep -oP '^OS_VERSION=[\"]?\K.*\d' /etc/OPX-release-version""": results.append({'stdout': grep_version_out}) # platform - if arg == """grep -oP '^PLATFORM="\K.*\w' /etc/OPX-release-version""": + if arg == """grep -oP '^PLATFORM=[\"]?\K.*\w' /etc/OPX-release-version""": results.append({'stdout': grep_platform_out}) # hostname elif arg == 'hostname':