From 5123fe510da52369a73dfbfc64f2f25d05ff90af Mon Sep 17 00:00:00 2001 From: yayogev Date: Mon, 21 Aug 2017 10:06:31 +0300 Subject: fix CLI unit tests Change-Id: Ie54f56adf2cd4cc42cf89c2b30004c1cf15eb2d6 Signed-off-by: yayogev --- app/discover/fetchers/cli/cli_fetch_host_pnics.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'app/discover/fetchers/cli/cli_fetch_host_pnics.py') 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): -- cgit 1.2.3-korg