[ https://issues.apache.org/jira/browse/CLOUDSTACK-9401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15470997#comment-15470997 ]
ASF GitHub Bot commented on CLOUDSTACK-9401: -------------------------------------------- Github user fmaximus commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1578#discussion_r77851893 --- Diff: test/integration/plugins/nuagevsp/nuageTestCase.py --- @@ -631,195 +753,257 @@ def check_Router_state(self, router, state=None): self.assertEqual(routers[0].state, state, "Virtual router is not in the expected state" ) - self.debug("Successfully validated the deployment and state of Router - %s" % router.name) + self.debug("Successfully validated the deployment and state of Router " + "- %s" % router.name) - # validate_PublicIPAddress - Validates if the given public IP address is in the expected state form the list of - # fetched public IP addresses - def validate_PublicIPAddress(self, public_ip, network, static_nat=False, vm=None): + # validate_PublicIPAddress - Validates if the given public IP address is in + # the expected state form the list of fetched public IP addresses + def validate_PublicIPAddress(self, public_ip, network, static_nat=False, + vm=None): """Validates the Public IP Address""" - self.debug("Validating the assignment and state of public IP address - %s" % public_ip.ipaddress.ipaddress) + self.debug("Validating the assignment and state of public IP address " + "- %s" % public_ip.ipaddress.ipaddress) public_ips = PublicIPAddress.list(self.api_client, id=public_ip.ipaddress.id, networkid=network.id, isstaticnat=static_nat, listall=True ) self.assertEqual(isinstance(public_ips, list), True, - "List public IP for network should return a valid list" + "List public IP for network should return a " + "valid list" ) - self.assertEqual(public_ips[0].ipaddress, public_ip.ipaddress.ipaddress, - "List public IP for network should list the assigned public IP address" + self.assertEqual(public_ips[0].ipaddress, + public_ip.ipaddress.ipaddress, + "List public IP for network should list the assigned " + "public IP address" ) self.assertEqual(public_ips[0].state, "Allocated", "Assigned public IP is not in the allocated state" ) if static_nat and vm: self.assertEqual(public_ips[0].virtualmachineid, vm.id, - "Static NAT rule is not enabled for the VM on the assigned public IP" + "Static NAT rule is not enabled for the VM on " + "the assigned public IP" ) - self.debug("Successfully validated the assignment and state of public IP address - %s" % - public_ip.ipaddress.ipaddress) + self.debug("Successfully validated the assignment and state of public " + "IP address - %s" % public_ip.ipaddress.ipaddress) - # VSD verifications - # VSD is a programmable policy and analytics engine of Nuage VSP SDN platform + # VSD verifications; VSD is a programmable policy and analytics engine of + # Nuage VSP SDN platform - # get_externalID_filter - Returns corresponding external ID filter of the given object in VSD + # get_externalID_filter - Returns corresponding external ID filter of the + # given object in VSD def get_externalID_filter(self, object_id): ext_id = object_id + "@" + self.cms_id return self.vsd.set_externalID_filter(ext_id) # fetch_by_externalID - Returns VSD object with the given external ID def fetch_by_externalID(self, fetcher, *cs_objects): - """ Fetches a child object by external id using the given fetcher, and uuids of the given cloudstack objects. + """ Fetches a child object by external id using the given fetcher, and + uuids of the given cloudstack objects. E.G. - - fetch_by_external_id(vsdk.NUSubnet(id="954de425-b860-410b-be09-c560e7dbb474").vms, cs_vm) - - fetch_by_external_id(session.user.floating_ips, cs_network, cs_public_ip) + - fetch_by_external_id(vsdk.NUSubnet + (id="954de425-b860-410b-be09-c560e7dbb474").vms, cs_vm) + - fetch_by_external_id + (session.user.floating_ips, cs_network, cs_public_ip) :param fetcher: VSPK Fetcher to use to find the child entity :param cs_objects: Cloudstack objects to take the UUID from. :return: the VSPK object having the correct externalID """ - return fetcher.get_first(filter="externalID BEGINSWITH '%s'" % ":".join([o.id for o in cs_objects])) + return fetcher.get_first(filter="externalID BEGINSWITH '%s'" % + ":".join([o.id for o in cs_objects])) - # verify_vsd_network - Verifies the given domain and network/VPC against the corresponding installed enterprise, - # domain, zone, and subnet in VSD + # verify_vsd_network - Verifies the given CloudStack domain and network/VPC + # against the corresponding installed enterprise, domain, zone, and subnet + # in VSD def verify_vsd_network(self, domain_id, network, vpc=None): - self.debug("Verifying the creation and state of Network - %s in VSD" % network.name) - vsd_enterprise = self.vsd.get_enterprise(filter=self.get_externalID_filter(domain_id)) - ext_network_filter = self.get_externalID_filter(vpc.id) if vpc else self.get_externalID_filter(network.id) + self.debug("Verifying the creation and state of Network - %s in VSD" % + network.name) + vsd_enterprise = self.vsd.get_enterprise( + filter=self.get_externalID_filter(domain_id)) + ext_network_filter = self.get_externalID_filter(vpc.id) if vpc \ + else self.get_externalID_filter(network.id) vsd_domain = self.vsd.get_domain(filter=ext_network_filter) vsd_zone = self.vsd.get_zone(filter=ext_network_filter) - vsd_subnet = self.vsd.get_subnet(filter=self.get_externalID_filter(network.id)) + vsd_subnet = self.vsd.get_subnet( + filter=self.get_externalID_filter(network.id)) self.assertEqual(vsd_enterprise.name, domain_id, - "VSD enterprise name should match CloudStack domain uuid" + "VSD enterprise name should match CloudStack domain " + "uuid" ) if vpc: self.assertEqual(vsd_domain.description, "VPC_" + vpc.name, - "VSD domain description should match VPC name in CloudStack" + "VSD domain description should match VPC name in " + "CloudStack" ) self.assertEqual(vsd_zone.description, "VPC_" + vpc.name, - "VSD zone description should match VPC name in CloudStack" + "VSD zone description should match VPC name in " + "CloudStack" ) else: self.assertEqual(vsd_domain.description, network.name, - "VSD domain description should match network name in CloudStack" + "VSD domain description should match network " + "name in CloudStack" ) self.assertEqual(vsd_zone.description, network.name, - "VSD zone description should match network name in CloudStack" + "VSD zone description should match network name " + "in CloudStack" ) self.assertEqual(vsd_subnet.description, network.name, - "VSD subnet description should match network name in CloudStack" + "VSD subnet description should match network name in " + "CloudStack" + ) + self.debug("Successfully verified the creation and state of Network " + "- %s in VSD" % network.name) + + # verify_vsd_object_status - Verifies the given CloudStack object status in + # VSD + def verify_vsd_object_status(self, cs_object, stopped): + vsd_object = self.vsd.get_vm( + filter=self.get_externalID_filter(cs_object.id)) + expected_status = cs_object.state.upper() if not stopped \ + else "DELETE_PENDING" + tries = 0 + while (vsd_object.status != expected_status) and (tries < 3): + self.debug("Waiting for the CloudStack object " + cs_object.name + + " to be fully resolved in VSD...") + time.sleep(30) --- End diff -- Except that wail_until starts with sleeping instead of by executing the callback. > Nuage VSP Plugin : Support for InternalDns including Marvin test coverage > ------------------------------------------------------------------------- > > Key: CLOUDSTACK-9401 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9401 > Project: CloudStack > Issue Type: Task > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Automation, Network Controller > Reporter: Rahul Singal > Assignee: Nick Livens > > Supporting Internal Dns by using Dns service provider as Virtual Router but > Dhcp provider will be NuageVsp. The idea is here is to keep using Internal > Dns service of cloudstack when network provider is some other vendor. > A sample network offering will be like below one:- > Service Provider > DHCP NuageVsp > DNS VirtualRouter/VpcVirtualRouter > UserData VirtualRouter/VpcVirtualRouter > Virtual Networking NuageVsp > SourceNat NuageVsp > StaticNat NuageVsp > NetworkAcl/Firewall NuageVsp > Testrun:- > Verify InternalDns on Isolated Network ... === TestName: > test_01_Isolated_Network_with_zone | Status : SUCCESS === > ok > Verify InternalDns on Isolated Network with ping by hostname ... === > TestName: test_02_Isolated_Network | Status : SUCCESS === > ok > Verify update NetworkDomain for InternalDns on Isolated Network ... === > TestName: test_03_Update_Network_with_Domain | Status : SUCCESS === > ok > Verify update NetworkDomain for InternalDns on Isolated Network with ping VM > ... === TestName: test_04_Update_Network_with_Domain | Status : SUCCESS === > ok > Verify InternalDns on VPC Network ... === TestName: > test_05_VPC_Network_With_InternalDns | Status : SUCCESS === > ok > Verify InternalDns on VPC Network by ping with hostname ... === TestName: > test_06_VPC_Network_With_InternalDns | Status : SUCCESS === > ok > ---------------------------------------------------------------------- > Ran 6 tests in 5736.562s > OK > cloudstack$ pep8 --max-line-length=150 test_internal_dns.py > cloudstack$ pyflakes test_internal_dns.py > cloudstack$ -- This message was sent by Atlassian JIRA (v6.3.4#6332)