aboutsummaryrefslogtreecommitdiffstats
path: root/app/discover/fetchers/cli
diff options
context:
space:
mode:
Diffstat (limited to 'app/discover/fetchers/cli')
-rw-r--r--app/discover/fetchers/cli/cli_access.py1
-rw-r--r--app/discover/fetchers/cli/cli_fetch_host_pnics.py18
-rw-r--r--app/discover/fetchers/cli/cli_fetch_vservice_vnics.py4
3 files changed, 15 insertions, 8 deletions
diff --git a/app/discover/fetchers/cli/cli_access.py b/app/discover/fetchers/cli/cli_access.py
index 1db84ea..11579bd 100644
--- a/app/discover/fetchers/cli/cli_access.py
+++ b/app/discover/fetchers/cli/cli_access.py
@@ -204,3 +204,4 @@ class CliAccess(BinaryConverter, Fetcher):
matches = regex.search(line)
if matches:
o[name] = matches.group(1)
+ break
diff --git a/app/discover/fetchers/cli/cli_fetch_host_pnics.py b/app/discover/fetchers/cli/cli_fetch_host_pnics.py
index 3516e25..5df4d3b 100644
--- a/app/discover/fetchers/cli/cli_fetch_host_pnics.py
+++ b/app/discover/fetchers/cli/cli_fetch_host_pnics.py
@@ -19,12 +19,18 @@ class CliFetchHostPnics(CliAccess):
self.inv = InventoryMgr()
self.ethtool_attr = re.compile('^\s+([^:]+):\s(.*)$')
self.regexps = [
- {'name': 'mac_address', 're': '^.*\sHWaddr\s(\S+)(\s.*)?$'},
- {'name': 'mac_address', 're': '^.*\sether\s(\S+)(\s.*)?$'},
- {'name': 'IP Address', 're': '^\s*inet addr:?(\S+)\s.*$'},
- {'name': 'IP Address', 're': '^\s*inet ([0-9.]+)\s.*$'},
- {'name': 'IPv6 Address', 're': '^\s*inet6 addr:\s*(\S+)(\s.*)?$'},
- {'name': 'IPv6 Address', 're': '^\s*inet6 \s*(\S+)(\s.*)?$'}
+ {'name': 'mac_address', 're': '^.*\sHWaddr\s(\S+)(\s.*)?$',
+ 'description': 'MAC address with HWaddr'},
+ {'name': 'mac_address', 're': '^.*\sether\s(\S+)(\s.*)?$',
+ 'description': 'MAC address with ether'},
+ {'name': 'IP Address', 're': '^\s*inet addr:?(\S+)\s.*$',
+ 'description': 'IP Address with "inet addr"'},
+ {'name': 'IP Address', 're': '^\s*inet ([0-9.]+)\s.*$',
+ 'description': 'IP Address with "inet"'},
+ {'name': 'IPv6 Address', 're': '^\s*inet6 addr:\s*(\S+)(\s.*)?$',
+ 'description': 'IPv6 Address with "inet6 addr"'},
+ {'name': 'IPv6 Address', 're': '^\s*inet6 \s*(\S+)(\s.*)?$',
+ 'description': 'IPv6 Address with "inet6"'}
]
def get(self, id):
diff --git a/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py b/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py
index 44ac8d6..d10d99e 100644
--- a/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py
+++ b/app/discover/fetchers/cli/cli_fetch_vservice_vnics.py
@@ -21,10 +21,10 @@ class CliFetchVserviceVnics(CliAccess):
self.regexps = [
{'name': 'mac_address', 're': '^.*\sHWaddr\s(\S+)(\s.*)?$'},
{'name': 'mac_address', 're': '^.*\sether\s(\S+)(\s.*)?$'},
- {'name': 'netmask', 're': '^.*\sMask:\s?([0-9.]+)(\s.*)?$'},
- {'name': 'netmask', 're': '^.*\snetmask\s([0-9.]+)(\s.*)?$'},
{'name': 'IP Address', 're': '^\s*inet addr:(\S+)\s.*$'},
{'name': 'IP Address', 're': '^\s*inet ([0-9.]+)\s.*$'},
+ {'name': 'netmask', 're': '^.*\sMask:\s?([0-9.]+)(\s.*)?$'},
+ {'name': 'netmask', 're': '^.*\snetmask\s([0-9.]+)(\s.*)?$'},
{'name': 'IPv6 Address',
're': '^\s*inet6 addr: ?\s*([0-9a-f:/]+)(\s.*)?$'},
{'name': 'IPv6 Address',