Github user swill commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1304#discussion_r61333278 --- Diff: test/integration/component/test_vpc_network.py --- @@ -2683,6 +2687,65 @@ def setUp(self): def tearDown(self): return + def listRouter(self): + routers = Router.list( + self.apiclient, + vpcid=self.vpc.id, + listall="true" + ) + self.assertEqual(validateList(routers)[0], PASS, "Invalid router response") + return routers[0] + + def secondaryIP(self, router): + hosts = list_hosts( + self.apiclient, + id=router.hostid + ) + self.assertEqual(validateList(hosts)[0], PASS, "Invalid host response") + host = hosts[0] + if self.hypervisor.lower() in ('vmware', 'hyperv'): + # SSH into system vms is done via management server for Vmware and + # Hyper-V + result = get_process_status( + self.apiclient.connection.mgtSvr, + 22, + self.apiclient.connection.user, + self.apiclient.connection.passwd, + router.privateip, + "ip addr show", + hypervisor=self.hypervisor + ) + else: + try: + host.user, host.passwd = get_host_credentials( + self.config, host.ipaddress + ) + result = get_process_status( + host.ipaddress, + 22, + host.user, + host.passwd, + router.linklocalip, + "ip addr show" + ) + except KeyError: + self.skipTest("Marvin configuration has no host credentials to check router services") + return result + + def validateResult(self, output): + ip = self.public_ip_1.ipaddress.ipaddress + reg = re.compile(ip) + for line in output: + m = reg.search(line) + if m: + break + if m.group(0) == ip and re.search("secondary", line): --- End diff -- `m` is not guaranteed to be set. You need to check `if m and len(m.group) > 0 ...` before you can try to access it. Check the `Error` in the CI result.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---