[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15469418#comment-15469418
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9401:
--------------------------------------------

Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77756102
  
    --- Diff: test/integration/plugins/nuagevsp/nuageTestCase.py ---
    @@ -77,85 +117,104 @@ def setUpClass(cls, zone=None):
             cls.test_data["virtual_machine"]["zoneid"] = cls.zone.id
             cls.test_data["virtual_machine"]["template"] = cls.template.id
     
    -        # Create service offering
    -        cls.service_offering = ServiceOffering.create(cls.api_client,
    -                                                      
cls.test_data["service_offering"]
    -                                                      )
    -        cls._cleanup = [cls.service_offering]
    -
             # Check if the host hypervisor type is simulator
    -        cls.isSimulator = Hypervisor.list(cls.api_client, 
zoneid=cls.zone.id)[0].name == "Simulator"
    +        cls.isSimulator = Hypervisor.list(
    +            cls.api_client,
    +            zoneid=cls.zone.id)[0].name == "Simulator"
     
             # Get configured Nuage VSP device details
             try:
    -            physical_networks = PhysicalNetwork.list(cls.api_client, 
zoneid=cls.zone.id)
    +            physical_networks = PhysicalNetwork.list(
    +                cls.api_client,
    +                zoneid=cls.zone.id
    +            )
                 for pn in physical_networks:
                     if pn.isolationmethods == "VSP":
                         cls.vsp_physical_network = pn
                         break
    -            cls.nuage_vsp_device = Nuage.list(cls.api_client,
    -                                              
physicalnetworkid=cls.vsp_physical_network.id
    -                                              )[0]
    +            cls.nuage_vsp_device = Nuage.list(
    +                cls.api_client,
    +                physicalnetworkid=cls.vsp_physical_network.id)[0]
                 pns = cls.config.zones[0].physical_networks
    -            providers = filter(lambda physical_network: "VSP" in 
physical_network.isolationmethods, pns)[0].providers
    -            devices = filter(lambda provider: provider.name == "NuageVsp", 
providers)[0].devices
    +            providers = filter(lambda physical_network:
    +                               "VSP" in physical_network.isolationmethods,
    +                               pns)[0].providers
    +            devices = filter(lambda provider:
    +                             provider.name == "NuageVsp",
    +                             providers)[0].devices
                 cls.nuage_vsp_device.username = devices[0].username
                 cls.nuage_vsp_device.password = devices[0].password
                 cls.cms_id = cls.nuage_vsp_device.cmsid
             except Exception as e:
                 cls.tearDownClass()
    -            raise unittest.SkipTest("Warning: Could not get configured 
Nuage VSP device details - %s" % e)
    +            raise unittest.SkipTest("Warning: Could not get configured "
    +                                    "Nuage VSP device details - %s" % e)
    +        return
     
    -        # VSD is a programmable policy and analytics engine of Nuage VSP 
SDN platform
    -        # vspk is a Python SDK for Nuage VSP's VSD
    -        # libVSD is a library that wraps vspk package
    +    @classmethod
    +    def configureVSDSessions(cls):
    +        # VSD is a programmable policy and analytics engine of Nuage VSP 
SDN
    +        # platform; vspk is a Python SDK for Nuage VSP's VSD; libVSD is a
    +        # library that wraps vspk package
             try:
    -            vspk_module = "vspk." + cls.nuage_vsp_device.apiversion if 
int(cls.nuage_vsp_device.apiversion[1]) >= 4 \
    +            vspk_module = "vspk." + cls.nuage_vsp_device.apiversion \
    +                if int(cls.nuage_vsp_device.apiversion[1]) >= 4 \
                     else "vspk.vsdk." + cls.nuage_vsp_device.apiversion
                 cls.vsdk = importlib.import_module(vspk_module)
                 from libVSD import ApiClient, VSDHelpers
             except Exception as e:
                 cls.tearDownClass()
    -            raise unittest.SkipTest("Warning: vspk (and/or) libVSD package 
import failure - %s" % e)
    +            raise unittest.SkipTest("Warning: vspk (and/or) libVSD package 
"
    +                                    "import failure - %s" % e)
     
             # Configure VSD session
    -        cls._session = 
cls.vsdk.NUVSDSession(username=cls.nuage_vsp_device.username,
    -                                             
password=cls.nuage_vsp_device.password,
    -                                             enterprise="csp",
    -                                             api_url="https://%s:%d"; % 
(cls.nuage_vsp_device.hostname,
    -                                                                        
cls.nuage_vsp_device.port)
    -                                             )
    +        cls._session = cls.vsdk.NUVSDSession(
    +            username=cls.nuage_vsp_device.username,
    +            password=cls.nuage_vsp_device.password,
    +            enterprise="csp",
    +            api_url="https://%s:%d"; % (cls.nuage_vsp_device.hostname,
    +                                       cls.nuage_vsp_device.port)
    +            )
    --- End diff --
    
    Please add an assert to validate that ``cls._session`` is valid.  
Otherwise, an invalid session may cause subsequent tests to fail by side effect 
inhibiting debugging.


> 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)

Reply via email to