aboutsummaryrefslogtreecommitdiffstats
path: root/app/discover/fetchers/cli/cli_fetch_host_pnics.py
diff options
context:
space:
mode:
authoryayogev <yaronyogev@gmail.com>2017-08-21 10:06:31 +0300
committeryayogev <yaronyogev@gmail.com>2017-08-21 10:06:31 +0300
commit5123fe510da52369a73dfbfc64f2f25d05ff90af (patch)
treedb31874dc11da0dc9accf3a99876b5050b2dd796 /app/discover/fetchers/cli/cli_fetch_host_pnics.py
parentf1a8bef9f98a4601de16ee96ac1e68b212d104d8 (diff)
fix CLI unit tests
Change-Id: Ie54f56adf2cd4cc42cf89c2b30004c1cf15eb2d6 Signed-off-by: yayogev <yaronyogev@gmail.com>
Diffstat (limited to 'app/discover/fetchers/cli/cli_fetch_host_pnics.py')
-rw-r--r--app/discover/fetchers/cli/cli_fetch_host_pnics.py18
1 files changed, 12 insertions, 6 deletions
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):