You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by nlivens <gi...@git.apache.org> on 2016/06/02 10:04:25 UTC

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

GitHub user nlivens opened a pull request:

    https://github.com/apache/cloudstack/pull/1578

    CLOUDSTACK-9401 : Support for Internal DNS in Nuage VSP plugin

    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$

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nlivens/cloudstack nuage_vsp_internal_dns

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1578.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1578
    
----
commit c86ab936f03b9815debaa535065df10dc724149f
Author: Eric Waegeman <er...@nuagenetworks.net>
Date:   2016-05-26T09:37:52Z

    CLOUDSTACK-9401 : Support for Internal DNS in Nuage VSP plugin

commit 064646de7604ffb58a4ae7ecc3db103e4e067fbf
Author: rahul singal <ra...@alcatel-lucent.com>
Date:   2016-06-02T09:30:25Z

    CLOUDSTACK-9401 : Marvin tests for Internal DNS verification with NuageVsp

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @blueorangutan package


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755943
  
    --- 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)
    --- End diff --
    
    Why shouldn't this exception cause the test to fail?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755606
  
    --- Diff: server/src/com/cloud/network/element/VirtualRouterElement.java ---
    @@ -922,10 +921,56 @@ public boolean release(final Network network, final NicProfile nic, final Virtua
             return true;
         }
     
    +
         @Override
         public boolean configDhcpSupportForSubnet(final Network network, final NicProfile nic, final VirtualMachineProfile vm, final DeployDestination dest,
    -            final ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    -        if (canHandle(network, Service.Dhcp)) {
    +                                              final ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    +            return configureDhcpSupport(network, nic, vm, dest, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean configDnsSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp, getProvider())) {
    +            return true;
    +        } else {
    +            return configureDhcpSupport(network, nic, vm, dest, Service.Dns);
    +        }
    +    }
    +
    +    @Override
    +    public boolean removeDhcpSupportForSubnet(final Network network) throws ResourceUnavailableException {
    +        return deleteDhcpSupportForSubnet(network, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean removeDnsSupportForSubnet(Network network) throws ResourceUnavailableException {
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp, getProvider())) {
    +            return true;
    +        } else {
    +            return deleteDhcpSupportForSubnet(network, Service.Dns);
    +        }
    +    }
    +
    +    @Override
    +    public boolean addDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile vm, final DeployDestination dest, final ReservationContext context)
    +            throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    +        return applyDhcpEntries(network, nic, vm, dest, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean addDnsEntry(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp, getProvider())) {
    +            return true;
    +        } else {
    --- End diff --
    
    This ``else`` block is unnecessary since the ``if`` block returns.  Please remove it.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @rhtyd Can you comment on the test failures? looks like the failures are not related to this pr.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77754469
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ReserveVmInterfaceVspCommand.java ---
    @@ -19,25 +19,29 @@
     
     package com.cloud.agent.api.guru;
     
    -import com.cloud.agent.api.Command;
    +import net.nuage.vsp.acs.client.api.model.VspDhcpVMOption;
     import net.nuage.vsp.acs.client.api.model.VspNetwork;
     import net.nuage.vsp.acs.client.api.model.VspNic;
     import net.nuage.vsp.acs.client.api.model.VspStaticNat;
     import net.nuage.vsp.acs.client.api.model.VspVm;
     
    +import com.cloud.agent.api.Command;
    +
     public class ReserveVmInterfaceVspCommand extends Command {
     
         private final VspNetwork _network;
         private final VspVm _vm;
         private final VspNic _nic;
         private final VspStaticNat _staticNat;
    +    private final  VspDhcpVMOption _dhcpOption;
    --- End diff --
    
    ``private final VspNetwork`` and ``private final VspNetwork _network`` appear many of these command classes.  Would it make it sense to consolidate these commonalities in a VSP abstract command class?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by fmaximus <gi...@git.apache.org>.
Github user fmaximus commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r76993494
  
    --- Diff: engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java ---
    @@ -2645,6 +2669,18 @@ public DhcpServiceProvider getDhcpServiceProvider(final Network network) {
             }
         }
     
    +    @Override
    +    public DnsServiceProvider getDnsServiceProvider(final Network network) {
    +        final String DnsProvider = _ntwkSrvcDao.getProviderForServiceInNetwork(network.getId(), Service.Dns);
    --- End diff --
    
    Variables should start lowecase


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    none of the test failures are related and it has enough LGTMs. I am merging this now.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    <b>Trillian test result (tid-259)</b>
    Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
    Total time taken: 27269 seconds
    Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1578-t259-kvm-centos7.zip
    Test completed. 47 look ok, 1 have error(s)
    
    
    Test | Result | Time (s) | Test File
    --- | --- | --- | ---
    test_01_create_template | `Error` | 95.95 | test_templates.py
    test_01_vpc_site2site_vpn | Success | 185.72 | test_vpc_vpn.py
    test_01_vpc_remote_access_vpn | Success | 66.18 | test_vpc_vpn.py
    test_01_redundant_vpc_site2site_vpn | Success | 256.54 | test_vpc_vpn.py
    test_02_VPC_default_routes | Success | 254.44 | test_vpc_router_nics.py
    test_01_VPC_nics_after_destroy | Success | 569.20 | test_vpc_router_nics.py
    test_05_rvpc_multi_tiers | Success | 496.25 | test_vpc_redundant.py
    test_04_rvpc_network_garbage_collector_nics | Success | 1472.28 | test_vpc_redundant.py
    test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | Success | 566.21 | test_vpc_redundant.py
    test_02_redundant_VPC_default_routes | Success | 739.88 | test_vpc_redundant.py
    test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Success | 1336.08 | test_vpc_redundant.py
    test_09_delete_detached_volume | Success | 15.50 | test_volumes.py
    test_08_resize_volume | Success | 15.38 | test_volumes.py
    test_07_resize_fail | Success | 20.43 | test_volumes.py
    test_06_download_detached_volume | Success | 15.27 | test_volumes.py
    test_05_detach_volume | Success | 100.28 | test_volumes.py
    test_04_delete_attached_volume | Success | 10.18 | test_volumes.py
    test_03_download_attached_volume | Success | 15.30 | test_volumes.py
    test_02_attach_volume | Success | 43.60 | test_volumes.py
    test_01_create_volume | Success | 721.82 | test_volumes.py
    test_deploy_vm_multiple | Success | 299.08 | test_vm_life_cycle.py
    test_deploy_vm | Success | 0.03 | test_vm_life_cycle.py
    test_advZoneVirtualRouter | Success | 0.02 | test_vm_life_cycle.py
    test_10_attachAndDetach_iso | Success | 27.82 | test_vm_life_cycle.py
    test_09_expunge_vm | Success | 125.21 | test_vm_life_cycle.py
    test_08_migrate_vm | Success | 35.85 | test_vm_life_cycle.py
    test_07_restore_vm | Success | 0.17 | test_vm_life_cycle.py
    test_06_destroy_vm | Success | 125.95 | test_vm_life_cycle.py
    test_03_reboot_vm | Success | 125.98 | test_vm_life_cycle.py
    test_02_start_vm | Success | 10.17 | test_vm_life_cycle.py
    test_01_stop_vm | Success | 35.36 | test_vm_life_cycle.py
    test_CreateTemplateWithDuplicateName | Success | 201.45 | test_templates.py
    test_08_list_system_templates | Success | 0.03 | test_templates.py
    test_07_list_public_templates | Success | 0.04 | test_templates.py
    test_05_template_permissions | Success | 0.06 | test_templates.py
    test_04_extract_template | Success | 5.17 | test_templates.py
    test_03_delete_template | Success | 5.10 | test_templates.py
    test_02_edit_template | Success | 90.18 | test_templates.py
    test_10_destroy_cpvm | Success | 161.47 | test_ssvm.py
    test_09_destroy_ssvm | Success | 164.21 | test_ssvm.py
    test_08_reboot_cpvm | Success | 131.67 | test_ssvm.py
    test_07_reboot_ssvm | Success | 134.60 | test_ssvm.py
    test_06_stop_cpvm | Success | 161.92 | test_ssvm.py
    test_05_stop_ssvm | Success | 138.84 | test_ssvm.py
    test_04_cpvm_internals | Success | 1.27 | test_ssvm.py
    test_03_ssvm_internals | Success | 4.56 | test_ssvm.py
    test_02_list_cpvm_vm | Success | 0.12 | test_ssvm.py
    test_01_list_sec_storage_vm | Success | 0.12 | test_ssvm.py
    test_01_snapshot_root_disk | Success | 16.36 | test_snapshots.py
    test_04_change_offering_small | Success | 209.65 | test_service_offerings.py
    test_03_delete_service_offering | Success | 0.04 | test_service_offerings.py
    test_02_edit_service_offering | Success | 0.07 | test_service_offerings.py
    test_01_create_service_offering | Success | 0.12 | test_service_offerings.py
    test_02_sys_template_ready | Success | 0.14 | test_secondary_storage.py
    test_01_sys_vm_start | Success | 0.17 | test_secondary_storage.py
    test_09_reboot_router | Success | 51.14 | test_routers.py
    test_08_start_router | Success | 35.36 | test_routers.py
    test_07_stop_router | Success | 15.18 | test_routers.py
    test_06_router_advanced | Success | 0.08 | test_routers.py
    test_05_router_basic | Success | 0.04 | test_routers.py
    test_04_restart_network_wo_cleanup | Success | 5.79 | test_routers.py
    test_03_restart_network_cleanup | Success | 70.57 | test_routers.py
    test_02_router_internal_adv | Success | 1.12 | test_routers.py
    test_01_router_internal_basic | Success | 0.61 | test_routers.py
    test_router_dns_guestipquery | Success | 76.65 | test_router_dns.py
    test_router_dns_externalipquery | Success | 0.05 | test_router_dns.py
    test_router_dhcphosts | Success | 242.36 | test_router_dhcphosts.py
    test_01_updatevolumedetail | Success | 0.07 | test_resource_detail.py
    test_01_reset_vm_on_reboot | Success | 130.93 | test_reset_vm_on_reboot.py
    test_createRegion | Success | 0.04 | test_regions.py
    test_create_pvlan_network | Success | 5.20 | test_pvlan.py
    test_dedicatePublicIpRange | Success | 0.40 | test_public_ip_range.py
    test_04_rvpc_privategw_static_routes | Success | 532.00 | test_privategw_acl.py
    test_03_vpc_privategw_restart_vpc_cleanup | Success | 470.59 | test_privategw_acl.py
    test_02_vpc_privategw_static_routes | Success | 441.29 | test_privategw_acl.py
    test_01_vpc_privategw_acl | Success | 93.37 | test_privategw_acl.py
    test_01_primary_storage_nfs | Success | 35.72 | test_primary_storage.py
    test_createPortablePublicIPRange | Success | 15.17 | test_portable_publicip.py
    test_createPortablePublicIPAcquire | Success | 15.40 | test_portable_publicip.py
    test_isolate_network_password_server | Success | 59.12 | test_password_server.py
    test_UpdateStorageOverProvisioningFactor | Success | 0.13 | test_over_provisioning.py
    test_oobm_zchange_password | Success | 20.52 | test_outofbandmanagement.py
    test_oobm_multiple_mgmt_server_ownership | Success | 16.52 | test_outofbandmanagement.py
    test_oobm_issue_power_status | Success | 10.51 | test_outofbandmanagement.py
    test_oobm_issue_power_soft | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_issue_power_reset | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_issue_power_on | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_issue_power_off | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_issue_power_cycle | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_enabledisable_across_clusterzones | Success | 57.25 | test_outofbandmanagement.py
    test_oobm_enable_feature_valid | Success | 5.19 | test_outofbandmanagement.py
    test_oobm_enable_feature_invalid | Success | 0.10 | test_outofbandmanagement.py
    test_oobm_disable_feature_valid | Success | 5.18 | test_outofbandmanagement.py
    test_oobm_disable_feature_invalid | Success | 0.11 | test_outofbandmanagement.py
    test_oobm_configure_invalid_driver | Success | 0.08 | test_outofbandmanagement.py
    test_oobm_configure_default_driver | Success | 0.09 | test_outofbandmanagement.py
    test_oobm_background_powerstate_sync | Success | 29.50 | test_outofbandmanagement.py
    test_extendPhysicalNetworkVlan | Success | 15.29 | test_non_contigiousvlan.py
    test_01_nic | Success | 595.79 | test_nic.py
    test_releaseIP | Success | 283.83 | test_network.py
    test_reboot_router | Success | 454.62 | test_network.py
    test_public_ip_user_account | Success | 10.24 | test_network.py
    test_public_ip_admin_account | Success | 40.25 | test_network.py
    test_network_rules_acquired_public_ip_3_Load_Balancer_Rule | Success | 66.91 | test_network.py
    test_network_rules_acquired_public_ip_2_nat_rule | Success | 61.51 | test_network.py
    test_network_rules_acquired_public_ip_1_static_nat_rule | Success | 123.57 | test_network.py
    test_delete_account | Success | 263.70 | test_network.py
    test_02_port_fwd_on_non_src_nat | Success | 55.59 | test_network.py
    test_01_port_fwd_on_src_nat | Success | 111.70 | test_network.py
    test_nic_secondaryip_add_remove | Success | 228.40 | test_multipleips_per_nic.py
    login_test_saml_user | Success | 24.48 | test_login.py
    test_assign_and_removal_lb | Success | 133.55 | test_loadbalance.py
    test_02_create_lb_rule_non_nat | Success | 187.23 | test_loadbalance.py
    test_01_create_lb_rule_src_nat | Success | 217.91 | test_loadbalance.py
    test_03_list_snapshots | Success | 0.08 | test_list_ids_parameter.py
    test_02_list_templates | Success | 0.04 | test_list_ids_parameter.py
    test_01_list_volumes | Success | 0.03 | test_list_ids_parameter.py
    test_07_list_default_iso | Success | 0.06 | test_iso.py
    test_05_iso_permissions | Success | 0.06 | test_iso.py
    test_04_extract_Iso | Success | 5.30 | test_iso.py
    test_03_delete_iso | Success | 95.20 | test_iso.py
    test_02_edit_iso | Success | 0.06 | test_iso.py
    test_01_create_iso | Success | 21.84 | test_iso.py
    test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | Success | 243.24 | test_internal_lb.py
    test_03_vpc_internallb_haproxy_stats_on_all_interfaces | Success | 177.90 | test_internal_lb.py
    test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | Success | 521.25 | test_internal_lb.py
    test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | Success | 414.70 | test_internal_lb.py
    test_dedicateGuestVlanRange | Success | 10.26 | test_guest_vlan_range.py
    test_UpdateConfigParamWithScope | Success | 0.14 | test_global_settings.py
    test_rolepermission_lifecycle_update | Success | 7.06 | test_dynamicroles.py
    test_rolepermission_lifecycle_list | Success | 6.85 | test_dynamicroles.py
    test_rolepermission_lifecycle_delete | Success | 6.80 | test_dynamicroles.py
    test_rolepermission_lifecycle_create | Success | 6.84 | test_dynamicroles.py
    test_rolepermission_lifecycle_concurrent_updates | Success | 6.88 | test_dynamicroles.py
    test_role_lifecycle_update_role_inuse | Success | 6.77 | test_dynamicroles.py
    test_role_lifecycle_update | Success | 11.85 | test_dynamicroles.py
    test_role_lifecycle_list | Success | 6.75 | test_dynamicroles.py
    test_role_lifecycle_delete | Success | 11.85 | test_dynamicroles.py
    test_role_lifecycle_create | Success | 6.96 | test_dynamicroles.py
    test_role_inuse_deletion | Success | 6.73 | test_dynamicroles.py
    test_role_account_acls_multiple_mgmt_servers | Success | 9.01 | test_dynamicroles.py
    test_role_account_acls | Success | 9.15 | test_dynamicroles.py
    test_default_role_deletion | Success | 6.87 | test_dynamicroles.py
    test_04_create_fat_type_disk_offering | Success | 0.06 | test_disk_offerings.py
    test_03_delete_disk_offering | Success | 0.03 | test_disk_offerings.py
    test_02_edit_disk_offering | Success | 0.05 | test_disk_offerings.py
    test_02_create_sparse_type_disk_offering | Success | 0.07 | test_disk_offerings.py
    test_01_create_disk_offering | Success | 0.10 | test_disk_offerings.py
    test_deployvm_userdispersing | Success | 30.62 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_userconcentrated | Success | 55.73 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_firstfit | Success | 55.60 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_userdata_post | Success | 10.37 | test_deploy_vm_with_userdata.py
    test_deployvm_userdata | Success | 86.27 | test_deploy_vm_with_userdata.py
    test_02_deploy_vm_root_resize | Success | 6.85 | test_deploy_vm_root_resize.py
    test_01_deploy_vm_root_resize | Success | 6.83 | test_deploy_vm_root_resize.py
    test_00_deploy_vm_root_resize | Success | 248.38 | test_deploy_vm_root_resize.py
    test_deploy_vm_from_iso | Success | 208.32 | test_deploy_vm_iso.py
    test_DeployVmAntiAffinityGroup | Success | 71.09 | test_affinity_groups.py
    test_03_delete_vm_snapshots | Skipped | 0.00 | test_vm_snapshots.py
    test_02_revert_vm_snapshots | Skipped | 0.00 | test_vm_snapshots.py
    test_01_test_vm_volume_snapshot | Skipped | 0.00 | test_vm_snapshots.py
    test_01_create_vm_snapshots | Skipped | 0.00 | test_vm_snapshots.py
    test_06_copy_template | Skipped | 0.00 | test_templates.py
    test_static_role_account_acls | Skipped | 0.02 | test_staticroles.py
    test_11_ss_nfs_version_on_ssvm | Skipped | 0.03 | test_ssvm.py
    test_01_scale_vm | Skipped | 0.00 | test_scale_vm.py
    test_01_primary_storage_iscsi | Skipped | 0.03 | test_primary_storage.py
    test_06_copy_iso | Skipped | 0.00 | test_iso.py
    test_deploy_vgpu_enabled_vm | Skipped | 0.03 | test_deploy_vgpu_enabled_vm.py
    test_3d_gpu_support | Skipped | 0.03 | test_deploy_vgpu_enabled_vm.py



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77754184
  
    --- Diff: engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java ---
    @@ -2645,6 +2669,18 @@ public DhcpServiceProvider getDhcpServiceProvider(final Network network) {
             }
         }
     
    +    @Override
    +    public DnsServiceProvider getDnsServiceProvider(final Network network) {
    +        final String dnsProvider = _ntwkSrvcDao.getProviderForServiceInNetwork(network.getId(), Service.Dns);
    +
    +        if (dnsProvider == null) {
    +            s_logger.debug("Network " + network + " doesn't support service " + Service.Dhcp.getName());
    --- End diff --
    
    Should this message be logged as ``WARN`` instead of ``DEBUG``?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by fmaximus <gi...@git.apache.org>.
Github user fmaximus commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77818579
  
    --- Diff: server/src/com/cloud/network/element/VirtualRouterElement.java ---
    @@ -988,6 +1016,21 @@ public boolean addDhcpEntry(final Network network, final NicProfile nic, final V
             return result;
         }
     
    +    protected boolean deleteDhcpSupportForSubnet(Network network, Network.Service service) throws ResourceUnavailableException {
    +        if (canHandle(network, service)) {
    +            final List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
    +            if (routers == null || routers.size() == 0) {
    +                throw new ResourceUnavailableException("Can't find at least one router!", DataCenter.class, network.getDataCenterId());
    +            }
    +            try {
    +                return _routerMgr.removeDhcpSupportForSubnet(network, routers);
    +            } catch (final ResourceUnavailableException e) {
    +                s_logger.debug("Router resource unavailable ");
    --- End diff --
    
    Here we moved existing code from removeDhcpSupportForSubnet to a separate method, containing the service. 
    Another question is, why catch ResourceUnavailableException, if it is also present in the method's throws clause? It then would be logged by the invoking methods.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by singalrahul <gi...@git.apache.org>.
Github user singalrahul commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    LGTM
    
    Marvin test run:-
    
    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 ... === 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 3663.756s
    
    OK
    
    [runinfo.txt](https://github.com/apache/cloudstack/files/457219/runinfo.txt)



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @rhtyd a Trillian-Jenkins matrix job (centos6 mgmt + xs65sp1, centos7 mgmt + vmware55u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77754965
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java ---
    @@ -403,4 +455,37 @@ private HostVO getNuageVspHost(long physicalNetworkId) {
             }
             return nuageVspHost;
         }
    +
    +    private boolean networkHasDns(Network network) {
    +
    +        if (network != null) {
    +            List<String> dnsProviders = _ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(network.getNetworkOfferingId(), Network.Service.Dns);
    +            return dnsProviders.contains(Network.Provider.VirtualRouter.getName())
    +                || dnsProviders.contains(Network.Provider.VPCVirtualRouter.getName());
    +
    +        }
    +
    +        return false;
    +    }
    +
    +    private boolean getDefaultHasDns(Map<Long, Boolean> cache, Nic nic) {
    +        Long networkId = nic.isDefaultNic()
    +                ? Long.valueOf(nic.getNetworkId())
    +                : getDefaultNetwork(nic.getInstanceId());
    +
    +        Boolean hasDns = cache.get(networkId);
    +        if (hasDns == null) {
    +            hasDns = networkHasDns(_networkDao.findById(networkId));
    +            cache.put(networkId, hasDns);
    +        }
    +        return hasDns;
    +    }
    +
    +    private Long getDefaultNetwork(long vmId) {
    +        NicVO defaultNic = _nicDao.findDefaultNicForVM(vmId);
    +        if (defaultNic != null) return defaultNic.getNetworkId();
    --- End diff --
    
    Per our coding standards, please wrap all ``if`` blocks in curly braces.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77756715
  
    --- 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 --
    
    Please replace with ``utils.wait_until`` which is a more responsive and robust mechanism to wait until a condition is met.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by singalrahul <gi...@git.apache.org>.
Github user singalrahul commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    LGTM
    
    After incorporating review comment, the marvin test goes fine :+1: 
    
    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 ... === 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 3941.529s
    
    OK
    [runinfo.txt](https://github.com/apache/cloudstack/files/522295/runinfo.txt)



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by fmaximus <gi...@git.apache.org>.
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.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77756322
  
    --- Diff: test/integration/plugins/nuagevsp/nuageTestCase.py ---
    @@ -360,60 +427,75 @@ def delete_VM(self, vm, expunge=True):
     
         # get_Router - Returns router for the given network
         def get_Router(self, network):
    -        self.debug("Finding the virtual router for network with ID - %s" % network.id)
    +        self.debug("Finding the virtual router for network with ID - %s" %
    +                   network.id)
             routers = Router.list(self.api_client,
                                   networkid=network.id,
                                   listall=True
                                   )
             self.assertEqual(isinstance(routers, list), True,
    -                         "List routers should return a valid virtual router for network"
    +                         "List routers should return a valid virtual router "
    +                         "for network"
                              )
             return routers[0]
     
    -    # acquire_PublicIPAddress - Acquires public IP address for the given network/VPC
    +    # acquire_PublicIPAddress - Acquires public IP address for the given
    +    # network/VPC
         def acquire_PublicIPAddress(self, network, vpc=None, account=None):
             if not account:
                 account = self.account
    -        self.debug("Associating public IP for network with ID - %s in the account - %s" % (network.id, account.name))
    +        self.debug("Associating public IP for network with ID - %s in the "
    +                   "account - %s" % (network.id, account.name))
             public_ip = PublicIPAddress.create(self.api_client,
                                                accountid=account.name,
                                                domainid=account.domainid,
                                                zoneid=self.zone.id,
    -                                           networkid=network.id if vpc is None else None,
    -                                           vpcid=vpc.id if vpc else self.vpc.id if hasattr(self, "vpc") else None
    +                                           networkid=network.id
    +                                           if vpc is None else None,
    +                                           vpcid=vpc.id if vpc else self.vpc.id
    +                                           if hasattr(self, "vpc") else None
                                                )
    -        self.debug("Associated public IP address - %s with network with ID - %s" %
    -                   (public_ip.ipaddress.ipaddress, network.id))
    +        self.debug("Associated public IP address - %s with network with ID - "
    +                   "%s" % (public_ip.ipaddress.ipaddress, network.id))
             return public_ip
     
    -    # create_StaticNatRule_For_VM - Creates Static NAT rule on the given public IP for the given VM in the given network
    -    def create_StaticNatRule_For_VM(self, vm, public_ip, network, vmguestip=None):
    -        self.debug("Enabling Static NAT rule on public IP - %s for VM with ID - %s in network with ID - %s" %
    +    # create_StaticNatRule_For_VM - Creates Static NAT rule on the given
    +    # public IP for the given VM in the given network
    +    def create_StaticNatRule_For_VM(self, vm, public_ip, network,
    +                                    vmguestip=None):
    +        self.debug("Enabling Static NAT rule on public IP - %s for VM with ID "
    +                   "- %s in network with ID - %s" %
                        (public_ip.ipaddress.ipaddress, vm.id, network.id))
    -        static_nat_rule = StaticNATRule.enable(self.api_client,
    -                                               ipaddressid=public_ip.ipaddress.id,
    -                                               virtualmachineid=vm.id,
    -                                               networkid=network.id,
    -                                               vmguestip=vmguestip
    -                                               )
    -        self.debug("Static NAT rule enabled on public IP - %s for VM with ID - %s in network with ID - %s" %
    +        static_nat_rule = StaticNATRule.enable(
    +            self.api_client,
    +            ipaddressid=public_ip.ipaddress.id,
    +            virtualmachineid=vm.id,
    +            networkid=network.id,
    +            vmguestip=vmguestip
    +        )
    --- End diff --
    
    Please add assertions to validate that ``static_nat_rule`` was enabled as expected.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    <b>Trillian test result (tid-258)</b>
    Environment: xenserver-65sp1 (x2), Advanced Networking with Mgmt server 6
    Total time taken: 33873 seconds
    Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1578-t258-xenserver-65sp1.zip
    Test completed. 45 look ok, 3 have error(s)
    
    
    Test | Result | Time (s) | Test File
    --- | --- | --- | ---
    test_05_rvpc_multi_tiers | `Failure` | 552.72 | test_vpc_redundant.py
    test_04_rvpc_network_garbage_collector_nics | `Failure` | 1367.04 | test_vpc_redundant.py
    test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 658.75 | test_vpc_redundant.py
    test_01_snapshot_root_disk | `Failure` | 26.60 | test_snapshots.py
    test_04_rvpc_privategw_static_routes | `Failure` | 224.03 | test_privategw_acl.py
    test_01_vpc_site2site_vpn | Success | 316.86 | test_vpc_vpn.py
    test_01_vpc_remote_access_vpn | Success | 172.09 | test_vpc_vpn.py
    test_01_redundant_vpc_site2site_vpn | Success | 614.99 | test_vpc_vpn.py
    test_02_VPC_default_routes | Success | 367.14 | test_vpc_router_nics.py
    test_01_VPC_nics_after_destroy | Success | 701.96 | test_vpc_router_nics.py
    test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | Success | 841.40 | test_vpc_redundant.py
    test_02_redundant_VPC_default_routes | Success | 1092.08 | test_vpc_redundant.py
    test_09_delete_detached_volume | Success | 20.89 | test_volumes.py
    test_08_resize_volume | Success | 121.70 | test_volumes.py
    test_07_resize_fail | Success | 116.36 | test_volumes.py
    test_06_download_detached_volume | Success | 25.47 | test_volumes.py
    test_05_detach_volume | Success | 100.30 | test_volumes.py
    test_04_delete_attached_volume | Success | 15.30 | test_volumes.py
    test_03_download_attached_volume | Success | 20.39 | test_volumes.py
    test_02_attach_volume | Success | 10.79 | test_volumes.py
    test_01_create_volume | Success | 392.84 | test_volumes.py
    test_03_delete_vm_snapshots | Success | 280.29 | test_vm_snapshots.py
    test_02_revert_vm_snapshots | Success | 221.62 | test_vm_snapshots.py
    test_01_create_vm_snapshots | Success | 100.79 | test_vm_snapshots.py
    test_deploy_vm_multiple | Success | 188.63 | test_vm_life_cycle.py
    test_deploy_vm | Success | 0.03 | test_vm_life_cycle.py
    test_advZoneVirtualRouter | Success | 0.03 | test_vm_life_cycle.py
    test_10_attachAndDetach_iso | Success | 26.95 | test_vm_life_cycle.py
    test_09_expunge_vm | Success | 125.27 | test_vm_life_cycle.py
    test_08_migrate_vm | Success | 61.51 | test_vm_life_cycle.py
    test_07_restore_vm | Success | 0.15 | test_vm_life_cycle.py
    test_06_destroy_vm | Success | 15.24 | test_vm_life_cycle.py
    test_03_reboot_vm | Success | 20.28 | test_vm_life_cycle.py
    test_02_start_vm | Success | 25.30 | test_vm_life_cycle.py
    test_01_stop_vm | Success | 30.35 | test_vm_life_cycle.py
    test_CreateTemplateWithDuplicateName | Success | 151.50 | test_templates.py
    test_08_list_system_templates | Success | 0.04 | test_templates.py
    test_07_list_public_templates | Success | 0.05 | test_templates.py
    test_05_template_permissions | Success | 0.08 | test_templates.py
    test_04_extract_template | Success | 5.22 | test_templates.py
    test_03_delete_template | Success | 5.30 | test_templates.py
    test_02_edit_template | Success | 90.12 | test_templates.py
    test_01_create_template | Success | 96.06 | test_templates.py
    test_10_destroy_cpvm | Success | 201.77 | test_ssvm.py
    test_09_destroy_ssvm | Success | 199.93 | test_ssvm.py
    test_08_reboot_cpvm | Success | 151.90 | test_ssvm.py
    test_07_reboot_ssvm | Success | 174.11 | test_ssvm.py
    test_06_stop_cpvm | Success | 167.04 | test_ssvm.py
    test_05_stop_ssvm | Success | 139.07 | test_ssvm.py
    test_04_cpvm_internals | Success | 1.12 | test_ssvm.py
    test_03_ssvm_internals | Success | 3.42 | test_ssvm.py
    test_02_list_cpvm_vm | Success | 0.16 | test_ssvm.py
    test_01_list_sec_storage_vm | Success | 0.15 | test_ssvm.py
    test_04_change_offering_small | Success | 96.25 | test_service_offerings.py
    test_03_delete_service_offering | Success | 0.05 | test_service_offerings.py
    test_02_edit_service_offering | Success | 0.12 | test_service_offerings.py
    test_01_create_service_offering | Success | 0.12 | test_service_offerings.py
    test_02_sys_template_ready | Success | 0.15 | test_secondary_storage.py
    test_01_sys_vm_start | Success | 0.22 | test_secondary_storage.py
    test_01_scale_vm | Success | 5.26 | test_scale_vm.py
    test_09_reboot_router | Success | 65.62 | test_routers.py
    test_08_start_router | Success | 60.65 | test_routers.py
    test_07_stop_router | Success | 15.28 | test_routers.py
    test_06_router_advanced | Success | 0.07 | test_routers.py
    test_05_router_basic | Success | 0.05 | test_routers.py
    test_04_restart_network_wo_cleanup | Success | 5.64 | test_routers.py
    test_03_restart_network_cleanup | Success | 126.22 | test_routers.py
    test_02_router_internal_adv | Success | 0.91 | test_routers.py
    test_01_router_internal_basic | Success | 0.45 | test_routers.py
    test_router_dns_guestipquery | Success | 48.85 | test_router_dns.py
    test_router_dns_externalipquery | Success | 0.11 | test_router_dns.py
    test_router_dhcphosts | Success | 104.87 | test_router_dhcphosts.py
    test_01_updatevolumedetail | Success | 0.16 | test_resource_detail.py
    test_01_reset_vm_on_reboot | Success | 121.32 | test_reset_vm_on_reboot.py
    test_createRegion | Success | 0.08 | test_regions.py
    test_create_pvlan_network | Success | 5.34 | test_pvlan.py
    test_dedicatePublicIpRange | Success | 0.61 | test_public_ip_range.py
    test_03_vpc_privategw_restart_vpc_cleanup | Success | 917.86 | test_privategw_acl.py
    test_02_vpc_privategw_static_routes | Success | 720.56 | test_privategw_acl.py
    test_01_vpc_privategw_acl | Success | 139.53 | test_privategw_acl.py
    test_01_primary_storage_nfs | Success | 38.84 | test_primary_storage.py
    test_01_primary_storage_iscsi | Success | 78.38 | test_primary_storage.py
    test_createPortablePublicIPRange | Success | 15.25 | test_portable_publicip.py
    test_createPortablePublicIPAcquire | Success | 15.74 | test_portable_publicip.py
    test_isolate_network_password_server | Success | 36.22 | test_password_server.py
    test_UpdateStorageOverProvisioningFactor | Success | 0.19 | test_over_provisioning.py
    test_oobm_zchange_password | Success | 21.03 | test_outofbandmanagement.py
    test_oobm_multiple_mgmt_server_ownership | Success | 16.53 | test_outofbandmanagement.py
    test_oobm_issue_power_status | Success | 10.51 | test_outofbandmanagement.py
    test_oobm_issue_power_soft | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_issue_power_reset | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_issue_power_on | Success | 15.53 | test_outofbandmanagement.py
    test_oobm_issue_power_off | Success | 16.07 | test_outofbandmanagement.py
    test_oobm_issue_power_cycle | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_enabledisable_across_clusterzones | Success | 63.29 | test_outofbandmanagement.py
    test_oobm_enable_feature_valid | Success | 5.33 | test_outofbandmanagement.py
    test_oobm_enable_feature_invalid | Success | 0.17 | test_outofbandmanagement.py
    test_oobm_disable_feature_valid | Success | 5.28 | test_outofbandmanagement.py
    test_oobm_disable_feature_invalid | Success | 0.16 | test_outofbandmanagement.py
    test_oobm_configure_invalid_driver | Success | 0.13 | test_outofbandmanagement.py
    test_oobm_configure_default_driver | Success | 0.15 | test_outofbandmanagement.py
    test_oobm_background_powerstate_sync | Success | 23.66 | test_outofbandmanagement.py
    test_extendPhysicalNetworkVlan | Success | 15.44 | test_non_contigiousvlan.py
    test_01_nic | Success | 815.13 | test_nic.py
    test_releaseIP | Success | 274.63 | test_network.py
    test_reboot_router | Success | 541.25 | test_network.py
    test_public_ip_user_account | Success | 10.35 | test_network.py
    test_public_ip_admin_account | Success | 40.39 | test_network.py
    test_network_rules_acquired_public_ip_3_Load_Balancer_Rule | Success | 86.94 | test_network.py
    test_network_rules_acquired_public_ip_2_nat_rule | Success | 76.81 | test_network.py
    test_network_rules_acquired_public_ip_1_static_nat_rule | Success | 100.28 | test_network.py
    test_delete_account | Success | 360.13 | test_network.py
    test_02_port_fwd_on_non_src_nat | Success | 70.96 | test_network.py
    test_01_port_fwd_on_src_nat | Success | 83.98 | test_network.py
    test_nic_secondaryip_add_remove | Success | 269.51 | test_multipleips_per_nic.py
    login_test_saml_user | Success | 25.15 | test_login.py
    test_assign_and_removal_lb | Success | 149.00 | test_loadbalance.py
    test_02_create_lb_rule_non_nat | Success | 207.71 | test_loadbalance.py
    test_01_create_lb_rule_src_nat | Success | 208.39 | test_loadbalance.py
    test_03_list_snapshots | Success | 0.12 | test_list_ids_parameter.py
    test_02_list_templates | Success | 0.05 | test_list_ids_parameter.py
    test_01_list_volumes | Success | 0.03 | test_list_ids_parameter.py
    test_07_list_default_iso | Success | 0.14 | test_iso.py
    test_05_iso_permissions | Success | 0.14 | test_iso.py
    test_04_extract_Iso | Success | 5.21 | test_iso.py
    test_03_delete_iso | Success | 95.27 | test_iso.py
    test_02_edit_iso | Success | 0.07 | test_iso.py
    test_01_create_iso | Success | 22.07 | test_iso.py
    test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | Success | 563.26 | test_internal_lb.py
    test_03_vpc_internallb_haproxy_stats_on_all_interfaces | Success | 375.66 | test_internal_lb.py
    test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | Success | 940.81 | test_internal_lb.py
    test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | Success | 705.42 | test_internal_lb.py
    test_dedicateGuestVlanRange | Success | 10.37 | test_guest_vlan_range.py
    test_UpdateConfigParamWithScope | Success | 0.28 | test_global_settings.py
    test_rolepermission_lifecycle_update | Success | 7.26 | test_dynamicroles.py
    test_rolepermission_lifecycle_list | Success | 7.08 | test_dynamicroles.py
    test_rolepermission_lifecycle_delete | Success | 6.89 | test_dynamicroles.py
    test_rolepermission_lifecycle_create | Success | 6.92 | test_dynamicroles.py
    test_rolepermission_lifecycle_concurrent_updates | Success | 7.19 | test_dynamicroles.py
    test_role_lifecycle_update_role_inuse | Success | 7.21 | test_dynamicroles.py
    test_role_lifecycle_update | Success | 12.03 | test_dynamicroles.py
    test_role_lifecycle_list | Success | 6.94 | test_dynamicroles.py
    test_role_lifecycle_delete | Success | 12.14 | test_dynamicroles.py
    test_role_lifecycle_create | Success | 7.00 | test_dynamicroles.py
    test_role_inuse_deletion | Success | 6.89 | test_dynamicroles.py
    test_role_account_acls_multiple_mgmt_servers | Success | 9.66 | test_dynamicroles.py
    test_role_account_acls | Success | 9.79 | test_dynamicroles.py
    test_default_role_deletion | Success | 7.09 | test_dynamicroles.py
    test_04_create_fat_type_disk_offering | Success | 0.11 | test_disk_offerings.py
    test_03_delete_disk_offering | Success | 0.07 | test_disk_offerings.py
    test_02_edit_disk_offering | Success | 0.07 | test_disk_offerings.py
    test_02_create_sparse_type_disk_offering | Success | 0.10 | test_disk_offerings.py
    test_01_create_disk_offering | Success | 0.16 | test_disk_offerings.py
    test_deployvm_userdispersing | Success | 56.67 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_userconcentrated | Success | 111.66 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_firstfit | Success | 171.81 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_userdata_post | Success | 25.79 | test_deploy_vm_with_userdata.py
    test_deployvm_userdata | Success | 187.09 | test_deploy_vm_with_userdata.py
    test_02_deploy_vm_root_resize | Success | 7.08 | test_deploy_vm_root_resize.py
    test_01_deploy_vm_root_resize | Success | 6.85 | test_deploy_vm_root_resize.py
    test_00_deploy_vm_root_resize | Success | 7.07 | test_deploy_vm_root_resize.py
    test_deploy_vm_from_iso | Success | 159.28 | test_deploy_vm_iso.py
    test_DeployVmAntiAffinityGroup | Success | 182.25 | test_affinity_groups.py
    test_01_test_vm_volume_snapshot | Skipped | 0.00 | test_vm_snapshots.py
    test_06_copy_template | Skipped | 0.00 | test_templates.py
    test_static_role_account_acls | Skipped | 0.03 | test_staticroles.py
    test_11_ss_nfs_version_on_ssvm | Skipped | 0.02 | test_ssvm.py
    test_06_copy_iso | Skipped | 0.00 | test_iso.py
    test_deploy_vgpu_enabled_vm | Skipped | 0.04 | test_deploy_vgpu_enabled_vm.py
    test_3d_gpu_support | Skipped | 0.04 | test_deploy_vgpu_enabled_vm.py



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @prashanthvarma since those tests are passing for other PRs, something about this PR caused the failures.  Therefore, we need an explanation (either environmental, test case bug, or CloudStack bug) and a clean test run before this PR can be merged.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/1578


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by krissterckx <gi...@git.apache.org>.
Github user krissterckx commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    The PR only contains test LGTM for PR/feature specific changes. Since the PR brings with it several changes, a regression test LGTM is necessary i.e. smoke test results against kvm/xen/vmware environments. Thanks.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by krissterckx <gi...@git.apache.org>.
Github user krissterckx commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    LGTM
    
    Code is good, tests are good.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by fmaximus <gi...@git.apache.org>.
Github user fmaximus commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r76991270
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java ---
    @@ -403,4 +448,25 @@ private HostVO getNuageVspHost(long physicalNetworkId) {
             }
             return nuageVspHost;
         }
    +
    +    private boolean networkHasDns(Network network) {
    +
    +        if (network != null) {
    +            List<String> dnsProvider = _ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(network.getNetworkOfferingId(), Network.Service.Dns);
    +            if (dnsProvider.contains("VirtualRouter") || dnsProvider.contains("VpcVirtualRouter")) {
    +                return true;
    +            }
    +        }
    +        return false;
    +    }
    +
    +
    +    private NetworkVO getDefaultNetwork (long vmId) {
    +
    +        NicVO defaultNic = _nicDao.findDefaultNicForVM(vmId);
    +        if (defaultNic != null ) return _networkDao.findById(_nicDao.findById(defaultNic.getId()).getNetworkId());
    --- End diff --
    
    Not necessary to fetch the nic from DB twice.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by prashanthvarma <gi...@git.apache.org>.
Github user prashanthvarma commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    Marvin test code PEP8 & PyFlakes compliance:
    CloudStack$
    CloudStack$ pep8 test/integration/plugins/nuagevsp/*.py
    CloudStack$
    CloudStack$ pyflakes test/integration/plugins/nuagevsp/*.py
    CloudStack$


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77754766
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java ---
    @@ -242,6 +256,44 @@ public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, D
                     throw new IllegalStateException("The broadcast URI path " + network.getBroadcastUri() + " is empty or in an incorrect format.");
                 }
     
    +            HostVO nuageVspHost = getNuageVspHost(network.getPhysicalNetworkId());
    +            VspNetwork vspNetwork = _nuageVspEntityBuilder.buildVspNetwork(network, false);
    +
    +            // Set flags for dhcp options
    +            boolean networkHasDns = networkHasDns(network);
    +
    +            Map<Long, Boolean> networkHasDnsCache = Maps.newHashMap();
    +            networkHasDnsCache.put(network.getId(), networkHasDns);
    --- End diff --
    
    Is there any reason ``networkHasDnsCache`` can't be an ``ImmutableMap``?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77756212
  
    --- Diff: test/integration/plugins/nuagevsp/nuageTestCase.py ---
    @@ -175,45 +234,44 @@ def tearDown(self):
             return
     
         # create_VpcOffering - Creates VPC offering
    -    def create_VpcOffering(self, vpc_offering, suffix=None):
    -        self.debug("Creating VPC offering")
    +    @needscleanup
    +    def create_VpcOffering(cls, vpc_offering, suffix=None):
    +        cls.debug("Creating VPC offering")
             if suffix:
                 vpc_offering["name"] = "VPC_OFF-" + str(suffix)
    -        vpc_off = VpcOffering.create(self.api_client,
    +        vpc_off = VpcOffering.create(cls.api_client,
                                          vpc_offering
                                          )
             # Enable VPC offering
    -        vpc_off.update(self.api_client, state="Enabled")
    -        self.cleanup.append(vpc_off)
    -        self.debug("Created and Enabled VPC offering")
    +        vpc_off.update(cls.api_client, state="Enabled")
    +        cls.debug("Created and Enabled VPC offering")
             return vpc_off
     
         # create_Vpc - Creates VPC with the given VPC offering
    -    def create_Vpc(self, vpc_offering, cidr='10.1.0.0/16', testdata=None, account=None, networkDomain=None,
    -                   cleanup=True):
    +    @needscleanup
    +    def create_Vpc(cls, vpc_offering, cidr='10.1.0.0/16', testdata=None,
    +                   account=None, networkDomain=None):
             if not account:
    -            account = self.account
    -        self.debug("Creating a VPC in the account - %s" % account.name)
    +            account = cls.account
    +        cls.debug("Creating a VPC in the account - %s" % account.name)
             if not testdata:
    -            testdata = self.test_data["vpc"]
    +            testdata = cls.test_data["vpc"]
                 testdata["name"] = "TestVPC-" + cidr + "-" + str(vpc_offering.name)
                 testdata["displaytext"] = "Test VPC"
                 testdata["cidr"] = cidr
    -        vpc = VPC.create(self.api_client,
    +        vpc = VPC.create(cls.api_client,
                              testdata,
                              vpcofferingid=vpc_offering.id,
    -                         zoneid=self.zone.id,
    +                         zoneid=cls.zone.id,
                              account=account.name,
                              domainid=account.domainid,
                              networkDomain=networkDomain
                              )
    -        self.debug("Created VPC with ID - %s" % vpc.id)
    -        if cleanup:
    -            self.cleanup.append(vpc)
    +        cls.debug("Created VPC with ID - %s" % vpc.id)
             return vpc
     
         # restart_Vpc - Restarts the given VPC with/without cleanup
    -    def restart_Vpc(self, vpc, cleanup=None):
    +    def restart_Vpc(self, vpc, cleanup=False):
    --- End diff --
    
    Flag arguments are an anti-pattern.  Please consider refactoring to another method such as ``restartVpcWithCleanup``.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755589
  
    --- Diff: server/src/com/cloud/network/element/VirtualRouterElement.java ---
    @@ -922,10 +921,56 @@ public boolean release(final Network network, final NicProfile nic, final Virtua
             return true;
         }
     
    +
         @Override
         public boolean configDhcpSupportForSubnet(final Network network, final NicProfile nic, final VirtualMachineProfile vm, final DeployDestination dest,
    -            final ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    -        if (canHandle(network, Service.Dhcp)) {
    +                                              final ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    +            return configureDhcpSupport(network, nic, vm, dest, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean configDnsSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp, getProvider())) {
    +            return true;
    +        } else {
    +            return configureDhcpSupport(network, nic, vm, dest, Service.Dns);
    +        }
    +    }
    +
    +    @Override
    +    public boolean removeDhcpSupportForSubnet(final Network network) throws ResourceUnavailableException {
    +        return deleteDhcpSupportForSubnet(network, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean removeDnsSupportForSubnet(Network network) throws ResourceUnavailableException {
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp, getProvider())) {
    +            return true;
    +        } else {
    --- End diff --
    
    This ``else`` block is unnecessary since the ``if`` block returns.  Please remove it.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755263
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java ---
    @@ -242,6 +256,44 @@ public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, D
                     throw new IllegalStateException("The broadcast URI path " + network.getBroadcastUri() + " is empty or in an incorrect format.");
                 }
     
    +            HostVO nuageVspHost = getNuageVspHost(network.getPhysicalNetworkId());
    +            VspNetwork vspNetwork = _nuageVspEntityBuilder.buildVspNetwork(network, false);
    +
    +            // Set flags for dhcp options
    +            boolean networkHasDns = networkHasDns(network);
    +
    +            Map<Long, Boolean> networkHasDnsCache = Maps.newHashMap();
    +            networkHasDnsCache.put(network.getId(), networkHasDns);
    +
    +            // Determine if dhcp options of the other nics in the network need to be updated
    +            if (vm.getType() == VirtualMachine.Type.DomainRouter && network.getState() != State.Implementing) {
    +
    +                // Update dhcp options if a VR is added when we are not initiating the network
    +                if(s_logger.isDebugEnabled()) {
    +                    s_logger.debug(String.format("DomainRouter is added to an existing network: %s in state: %s", network.getName(), network.getState()));
    +                }
    +                List<VspDhcpVMOption> dhcpOptions = Lists.newLinkedList();
    +                for (NicVO userNic :_nicDao.listByNetworkId(network.getId())) {
    +                    if (userNic.getVmType() != VirtualMachine.Type.DomainRouter) {
    +                        boolean defaultHasDns = getDefaultHasDns(networkHasDnsCache, userNic);
    +                        dhcpOptions.add(_nuageVspEntityBuilder.buildVmDhcpOption(userNic, defaultHasDns, networkHasDns));
    +                    }
    +                }
    +
    +                if (!dhcpOptions.isEmpty()) {
    +                    UpdateDhcpOptionVspCommand cmd = new UpdateDhcpOptionVspCommand(dhcpOptions, vspNetwork);
    +                    Answer answer = _agentMgr.easySend(nuageVspHost.getId(), cmd);
    +
    +                    if (answer == null || !answer.getResult()) {
    +                        s_logger.error("UpdateDhcpOptionVspCommand failed at \"reserve\" for network " + vspNetwork.getName());
    +                        if ((null != answer) && (null != answer.getDetails())) {
    +                            s_logger.error(answer.getDetails());
    +                        }
    +                        throw new InsufficientVirtualNetworkCapacityException("Failed to reserve VM in Nuage VSP.", Network.class, network.getId());
    +                    }
    +                }
    +            }
    --- End diff --
    
    Consider extracting lines 262-295 to a separate method such as ``updateDhcpOptions`` to reduce the size of this method and increase readability.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77756445
  
    --- Diff: test/integration/plugins/nuagevsp/nuageTestCase.py ---
    @@ -490,57 +581,75 @@ def execute_cmd(self, ssh_client, cmd):
                 self.debug("SSH client executed command result is None")
             return ret_data
     
    -    # wget_from_server - Fetches index.html file from a web server listening on the given public IP address and port
    -    def wget_from_server(self, public_ip, port):
    +    # wget_from_server - Fetches file with the given file name from a web
    +    # server listening on the given public IP address and port
    +    def wget_from_server(self, public_ip, port, file_name="index.html"):
             import urllib
    -        self.debug("wget index.html file from a http web server listening on public IP address - %s and port - %s" %
    -                   (public_ip.ipaddress.ipaddress, port))
    -        filename, headers = urllib.urlretrieve("http://%s:%s/index.html" % (public_ip.ipaddress.ipaddress, port),
    -                                               filename="index.html"
    -                                               )
    +        self.debug("wget file - %s from a http web server listening on "
    +                   "public IP address - %s and port - %s" %
    +                   (file_name, public_ip.ipaddress.ipaddress, port))
    +        filename, headers = urllib.urlretrieve(
    +            "http://%s:%s/%s" %
    +            (public_ip.ipaddress.ipaddress, port, file_name),
    +            filename=file_name
    +        )
    --- End diff --
    
    Please add assertions that ``filename`` and ``header`` are as expected (e.g. not ``None``).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    <b>Trillian test result (tid-260)</b>
    Environment: vmware-55u3 (x2), Advanced Networking with Mgmt server 7
    Total time taken: 38810 seconds
    Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1578-t260-vmware-55u3.zip
    Test completed. 46 look ok, 2 have error(s)
    
    
    Test | Result | Time (s) | Test File
    --- | --- | --- | ---
    test_01_vpc_site2site_vpn | `Error` | 517.00 | test_vpc_vpn.py
    test_01_redundant_vpc_site2site_vpn | `Error` | 743.47 | test_vpc_vpn.py
    ContextSuite context=TestRVPCSite2SiteVpn>:teardown | `Error` | 889.61 | test_vpc_vpn.py
    test_01_VPC_nics_after_destroy | `Error` | 127.62 | test_vpc_router_nics.py
    test_01_vpc_remote_access_vpn | Success | 176.74 | test_vpc_vpn.py
    test_02_VPC_default_routes | Success | 391.31 | test_vpc_router_nics.py
    test_05_rvpc_multi_tiers | Success | 713.94 | test_vpc_redundant.py
    test_04_rvpc_network_garbage_collector_nics | Success | 1550.04 | test_vpc_redundant.py
    test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | Success | 821.10 | test_vpc_redundant.py
    test_02_redundant_VPC_default_routes | Success | 841.51 | test_vpc_redundant.py
    test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Success | 1448.10 | test_vpc_redundant.py
    test_09_delete_detached_volume | Success | 25.93 | test_volumes.py
    test_06_download_detached_volume | Success | 95.90 | test_volumes.py
    test_05_detach_volume | Success | 110.33 | test_volumes.py
    test_04_delete_attached_volume | Success | 20.27 | test_volumes.py
    test_03_download_attached_volume | Success | 20.32 | test_volumes.py
    test_02_attach_volume | Success | 58.90 | test_volumes.py
    test_01_create_volume | Success | 517.87 | test_volumes.py
    test_03_delete_vm_snapshots | Success | 275.21 | test_vm_snapshots.py
    test_02_revert_vm_snapshots | Success | 232.27 | test_vm_snapshots.py
    test_01_test_vm_volume_snapshot | Success | 201.60 | test_vm_snapshots.py
    test_01_create_vm_snapshots | Success | 161.75 | test_vm_snapshots.py
    test_deploy_vm_multiple | Success | 314.12 | test_vm_life_cycle.py
    test_deploy_vm | Success | 0.03 | test_vm_life_cycle.py
    test_advZoneVirtualRouter | Success | 0.03 | test_vm_life_cycle.py
    test_10_attachAndDetach_iso | Success | 26.85 | test_vm_life_cycle.py
    test_09_expunge_vm | Success | 125.27 | test_vm_life_cycle.py
    test_08_migrate_vm | Success | 91.19 | test_vm_life_cycle.py
    test_07_restore_vm | Success | 0.10 | test_vm_life_cycle.py
    test_06_destroy_vm | Success | 10.17 | test_vm_life_cycle.py
    test_03_reboot_vm | Success | 5.16 | test_vm_life_cycle.py
    test_02_start_vm | Success | 20.26 | test_vm_life_cycle.py
    test_01_stop_vm | Success | 10.15 | test_vm_life_cycle.py
    test_CreateTemplateWithDuplicateName | Success | 387.76 | test_templates.py
    test_08_list_system_templates | Success | 0.03 | test_templates.py
    test_07_list_public_templates | Success | 0.04 | test_templates.py
    test_05_template_permissions | Success | 0.06 | test_templates.py
    test_04_extract_template | Success | 15.32 | test_templates.py
    test_03_delete_template | Success | 5.11 | test_templates.py
    test_02_edit_template | Success | 90.15 | test_templates.py
    test_01_create_template | Success | 241.83 | test_templates.py
    test_10_destroy_cpvm | Success | 236.93 | test_ssvm.py
    test_09_destroy_ssvm | Success | 238.89 | test_ssvm.py
    test_08_reboot_cpvm | Success | 186.62 | test_ssvm.py
    test_07_reboot_ssvm | Success | 188.91 | test_ssvm.py
    test_06_stop_cpvm | Success | 206.93 | test_ssvm.py
    test_05_stop_ssvm | Success | 204.31 | test_ssvm.py
    test_04_cpvm_internals | Success | 1.22 | test_ssvm.py
    test_03_ssvm_internals | Success | 3.40 | test_ssvm.py
    test_02_list_cpvm_vm | Success | 0.12 | test_ssvm.py
    test_01_list_sec_storage_vm | Success | 0.13 | test_ssvm.py
    test_01_snapshot_root_disk | Success | 66.45 | test_snapshots.py
    test_04_change_offering_small | Success | 127.22 | test_service_offerings.py
    test_03_delete_service_offering | Success | 0.05 | test_service_offerings.py
    test_02_edit_service_offering | Success | 0.11 | test_service_offerings.py
    test_01_create_service_offering | Success | 0.11 | test_service_offerings.py
    test_02_sys_template_ready | Success | 0.16 | test_secondary_storage.py
    test_01_sys_vm_start | Success | 0.19 | test_secondary_storage.py
    test_09_reboot_router | Success | 176.20 | test_routers.py
    test_08_start_router | Success | 125.83 | test_routers.py
    test_07_stop_router | Success | 20.24 | test_routers.py
    test_06_router_advanced | Success | 0.06 | test_routers.py
    test_05_router_basic | Success | 0.04 | test_routers.py
    test_04_restart_network_wo_cleanup | Success | 5.66 | test_routers.py
    test_03_restart_network_cleanup | Success | 171.19 | test_routers.py
    test_02_router_internal_adv | Success | 1.02 | test_routers.py
    test_01_router_internal_basic | Success | 0.56 | test_routers.py
    test_router_dns_guestipquery | Success | 76.71 | test_router_dns.py
    test_router_dns_externalipquery | Success | 0.08 | test_router_dns.py
    test_router_dhcphosts | Success | 218.51 | test_router_dhcphosts.py
    test_01_updatevolumedetail | Success | 0.09 | test_resource_detail.py
    test_01_reset_vm_on_reboot | Success | 70.66 | test_reset_vm_on_reboot.py
    test_createRegion | Success | 0.05 | test_regions.py
    test_create_pvlan_network | Success | 5.23 | test_pvlan.py
    test_dedicatePublicIpRange | Success | 0.41 | test_public_ip_range.py
    test_04_rvpc_privategw_static_routes | Success | 1493.11 | test_privategw_acl.py
    test_03_vpc_privategw_restart_vpc_cleanup | Success | 1279.39 | test_privategw_acl.py
    test_02_vpc_privategw_static_routes | Success | 857.22 | test_privategw_acl.py
    test_01_vpc_privategw_acl | Success | 305.37 | test_privategw_acl.py
    test_01_primary_storage_nfs | Success | 38.54 | test_primary_storage.py
    test_createPortablePublicIPRange | Success | 15.46 | test_portable_publicip.py
    test_createPortablePublicIPAcquire | Success | 15.52 | test_portable_publicip.py
    test_isolate_network_password_server | Success | 95.67 | test_password_server.py
    test_UpdateStorageOverProvisioningFactor | Success | 0.16 | test_over_provisioning.py
    test_oobm_zchange_password | Success | 21.02 | test_outofbandmanagement.py
    test_oobm_multiple_mgmt_server_ownership | Success | 16.52 | test_outofbandmanagement.py
    test_oobm_issue_power_status | Success | 10.51 | test_outofbandmanagement.py
    test_oobm_issue_power_soft | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_issue_power_reset | Success | 15.48 | test_outofbandmanagement.py
    test_oobm_issue_power_on | Success | 15.57 | test_outofbandmanagement.py
    test_oobm_issue_power_off | Success | 11.02 | test_outofbandmanagement.py
    test_oobm_issue_power_cycle | Success | 15.52 | test_outofbandmanagement.py
    test_oobm_enabledisable_across_clusterzones | Success | 47.50 | test_outofbandmanagement.py
    test_oobm_enable_feature_valid | Success | 5.30 | test_outofbandmanagement.py
    test_oobm_enable_feature_invalid | Success | 0.19 | test_outofbandmanagement.py
    test_oobm_disable_feature_valid | Success | 5.23 | test_outofbandmanagement.py
    test_oobm_disable_feature_invalid | Success | 0.16 | test_outofbandmanagement.py
    test_oobm_configure_invalid_driver | Success | 0.10 | test_outofbandmanagement.py
    test_oobm_configure_default_driver | Success | 0.11 | test_outofbandmanagement.py
    test_oobm_background_powerstate_sync | Success | 29.45 | test_outofbandmanagement.py
    test_extendPhysicalNetworkVlan | Success | 15.34 | test_non_contigiousvlan.py
    test_01_nic | Success | 724.10 | test_nic.py
    test_releaseIP | Success | 284.06 | test_network.py
    test_reboot_router | Success | 620.89 | test_network.py
    test_public_ip_user_account | Success | 10.25 | test_network.py
    test_public_ip_admin_account | Success | 40.28 | test_network.py
    test_network_rules_acquired_public_ip_3_Load_Balancer_Rule | Success | 76.84 | test_network.py
    test_network_rules_acquired_public_ip_2_nat_rule | Success | 61.62 | test_network.py
    test_network_rules_acquired_public_ip_1_static_nat_rule | Success | 125.19 | test_network.py
    test_delete_account | Success | 359.45 | test_network.py
    test_02_port_fwd_on_non_src_nat | Success | 55.66 | test_network.py
    test_01_port_fwd_on_src_nat | Success | 111.76 | test_network.py
    test_nic_secondaryip_add_remove | Success | 279.19 | test_multipleips_per_nic.py
    login_test_saml_user | Success | 24.62 | test_login.py
    test_assign_and_removal_lb | Success | 148.42 | test_loadbalance.py
    test_02_create_lb_rule_non_nat | Success | 207.38 | test_loadbalance.py
    test_01_create_lb_rule_src_nat | Success | 208.23 | test_loadbalance.py
    test_03_list_snapshots | Success | 0.08 | test_list_ids_parameter.py
    test_02_list_templates | Success | 0.04 | test_list_ids_parameter.py
    test_01_list_volumes | Success | 0.03 | test_list_ids_parameter.py
    test_07_list_default_iso | Success | 0.06 | test_iso.py
    test_05_iso_permissions | Success | 0.07 | test_iso.py
    test_04_extract_Iso | Success | 5.17 | test_iso.py
    test_03_delete_iso | Success | 95.20 | test_iso.py
    test_02_edit_iso | Success | 0.18 | test_iso.py
    test_01_create_iso | Success | 21.92 | test_iso.py
    test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | Success | 625.64 | test_internal_lb.py
    test_03_vpc_internallb_haproxy_stats_on_all_interfaces | Success | 512.33 | test_internal_lb.py
    test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | Success | 1080.09 | test_internal_lb.py
    test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | Success | 850.60 | test_internal_lb.py
    test_dedicateGuestVlanRange | Success | 10.32 | test_guest_vlan_range.py
    test_UpdateConfigParamWithScope | Success | 0.14 | test_global_settings.py
    test_rolepermission_lifecycle_update | Success | 7.08 | test_dynamicroles.py
    test_rolepermission_lifecycle_list | Success | 6.90 | test_dynamicroles.py
    test_rolepermission_lifecycle_delete | Success | 6.87 | test_dynamicroles.py
    test_rolepermission_lifecycle_create | Success | 6.92 | test_dynamicroles.py
    test_rolepermission_lifecycle_concurrent_updates | Success | 7.07 | test_dynamicroles.py
    test_role_lifecycle_update_role_inuse | Success | 6.79 | test_dynamicroles.py
    test_role_lifecycle_update | Success | 11.87 | test_dynamicroles.py
    test_role_lifecycle_list | Success | 6.83 | test_dynamicroles.py
    test_role_lifecycle_delete | Success | 12.02 | test_dynamicroles.py
    test_role_lifecycle_create | Success | 6.79 | test_dynamicroles.py
    test_role_inuse_deletion | Success | 6.95 | test_dynamicroles.py
    test_role_account_acls_multiple_mgmt_servers | Success | 9.07 | test_dynamicroles.py
    test_role_account_acls | Success | 9.19 | test_dynamicroles.py
    test_default_role_deletion | Success | 7.08 | test_dynamicroles.py
    test_04_create_fat_type_disk_offering | Success | 0.08 | test_disk_offerings.py
    test_03_delete_disk_offering | Success | 0.04 | test_disk_offerings.py
    test_02_edit_disk_offering | Success | 0.06 | test_disk_offerings.py
    test_02_create_sparse_type_disk_offering | Success | 0.07 | test_disk_offerings.py
    test_01_create_disk_offering | Success | 0.11 | test_disk_offerings.py
    test_deployvm_userdispersing | Success | 121.17 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_userconcentrated | Success | 55.80 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_firstfit | Success | 216.72 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_userdata_post | Success | 30.58 | test_deploy_vm_with_userdata.py
    test_deployvm_userdata | Success | 186.59 | test_deploy_vm_with_userdata.py
    test_02_deploy_vm_root_resize | Success | 6.74 | test_deploy_vm_root_resize.py
    test_01_deploy_vm_root_resize | Success | 6.77 | test_deploy_vm_root_resize.py
    test_00_deploy_vm_root_resize | Success | 6.90 | test_deploy_vm_root_resize.py
    test_deploy_vm_from_iso | Success | 274.03 | test_deploy_vm_iso.py
    test_3d_gpu_support | Success | 491.27 | test_deploy_vgpu_enabled_vm.py
    test_DeployVmAntiAffinityGroup | Success | 317.74 | test_affinity_groups.py
    test_08_resize_volume | Skipped | 10.14 | test_volumes.py
    test_07_resize_fail | Skipped | 15.32 | test_volumes.py
    test_06_copy_template | Skipped | 0.00 | test_templates.py
    test_static_role_account_acls | Skipped | 0.02 | test_staticroles.py
    test_11_ss_nfs_version_on_ssvm | Skipped | 0.02 | test_ssvm.py
    test_01_scale_vm | Skipped | 66.33 | test_scale_vm.py
    test_01_primary_storage_iscsi | Skipped | 0.04 | test_primary_storage.py
    test_06_copy_iso | Skipped | 0.00 | test_iso.py
    test_deploy_vgpu_enabled_vm | Skipped | 2.01 | test_deploy_vgpu_enabled_vm.py



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by singalrahul <gi...@git.apache.org>.
Github user singalrahul commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    Added Marvin code PEP8 & PyFlakes compliance:
    cloudstack$ pep8 --max-line-length=150 test_internal_dns.py
    cloudstack$ pyflakes test_internal_dns.py
    cloudstack$
    
    
    Validations:-
    Marvin test run:
    nosetests --with-marvin --marvin-config=nuage.cfg plugins/nuagevsp/test_internal_dns.py
    
    Results:-
    [runinfo.txt](https://github.com/apache/cloudstack/files/295579/runinfo.txt)
    
    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
    ------------------------------
    [runinfo.txt](https://github.com/apache/cloudstack/files/295582/runinfo.txt)
    ----------------------------------------
    Ran 6 tests in 5736.562s
    OK


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @blueorangutan test matrix


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by fmaximus <gi...@git.apache.org>.
Github user fmaximus commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77831210
  
    --- Diff: test/integration/plugins/nuagevsp/nuageTestCase.py ---
    @@ -175,45 +234,44 @@ def tearDown(self):
             return
     
         # create_VpcOffering - Creates VPC offering
    -    def create_VpcOffering(self, vpc_offering, suffix=None):
    -        self.debug("Creating VPC offering")
    +    @needscleanup
    +    def create_VpcOffering(cls, vpc_offering, suffix=None):
    +        cls.debug("Creating VPC offering")
             if suffix:
                 vpc_offering["name"] = "VPC_OFF-" + str(suffix)
    -        vpc_off = VpcOffering.create(self.api_client,
    +        vpc_off = VpcOffering.create(cls.api_client,
                                          vpc_offering
                                          )
             # Enable VPC offering
    -        vpc_off.update(self.api_client, state="Enabled")
    -        self.cleanup.append(vpc_off)
    -        self.debug("Created and Enabled VPC offering")
    +        vpc_off.update(cls.api_client, state="Enabled")
    +        cls.debug("Created and Enabled VPC offering")
             return vpc_off
     
         # create_Vpc - Creates VPC with the given VPC offering
    -    def create_Vpc(self, vpc_offering, cidr='10.1.0.0/16', testdata=None, account=None, networkDomain=None,
    -                   cleanup=True):
    +    @needscleanup
    +    def create_Vpc(cls, vpc_offering, cidr='10.1.0.0/16', testdata=None,
    +                   account=None, networkDomain=None):
             if not account:
    -            account = self.account
    -        self.debug("Creating a VPC in the account - %s" % account.name)
    +            account = cls.account
    +        cls.debug("Creating a VPC in the account - %s" % account.name)
             if not testdata:
    -            testdata = self.test_data["vpc"]
    +            testdata = cls.test_data["vpc"]
                 testdata["name"] = "TestVPC-" + cidr + "-" + str(vpc_offering.name)
                 testdata["displaytext"] = "Test VPC"
                 testdata["cidr"] = cidr
    -        vpc = VPC.create(self.api_client,
    +        vpc = VPC.create(cls.api_client,
                              testdata,
                              vpcofferingid=vpc_offering.id,
    -                         zoneid=self.zone.id,
    +                         zoneid=cls.zone.id,
                              account=account.name,
                              domainid=account.domainid,
                              networkDomain=networkDomain
                              )
    -        self.debug("Created VPC with ID - %s" % vpc.id)
    -        if cleanup:
    -            self.cleanup.append(vpc)
    +        cls.debug("Created VPC with ID - %s" % vpc.id)
             return vpc
     
         # restart_Vpc - Restarts the given VPC with/without cleanup
    -    def restart_Vpc(self, vpc, cleanup=None):
    +    def restart_Vpc(self, vpc, cleanup=False):
    --- End diff --
    
    It's just a parameter passed into the restartVPC command.
    I'm more concerned about the fact that we need to set makeredundant to false, 
    as the default seems to be true.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by prashanthvarma <gi...@git.apache.org>.
Github user prashanthvarma commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @jburwell @rhtyd We have briefly investigated the above test failures, and here are our findings:
    1) No single test is failing across all the environments, and this PR doesn't contain any "hypervisor" specific changes.
    2) The failed test on KVM "test_01_create_template" looks more like a timing issue, and we might not always hit it (refer above comment).
    
    Is there a way, we can re-trigger the above failing tests on your CI environment, and also get the management server logs for them to further debug these failures ?
    
    It will also be handy for us to get the results and logs of these tests when ran against latest master.
    
    Hope, we are not asking to much :)
    
    Meanwhile, we will try to reproduce these failures on our setups.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755898
  
    --- 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"
    --- End diff --
    
    If the hypervisor list retrieval fails or returns an empty list, the error returned will be ambiguous.  Please split the retrieval of the list from the indexing operation and asserts that the hypervisor list is not ``None`` and expected length.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian. JID-132


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by fmaximus <gi...@git.apache.org>.
Github user fmaximus commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r76991083
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/guru/NuageVspGuestNetworkGuru.java ---
    @@ -242,6 +249,40 @@ public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, D
                     throw new IllegalStateException("The broadcast URI path " + network.getBroadcastUri() + " is empty or in an incorrect format.");
                 }
     
    +            HostVO nuageVspHost = getNuageVspHost(network.getPhysicalNetworkId());
    +            VspNetwork vspNetwork = _nuageVspEntityBuilder.buildVspNetwork(network, false);
    +
    +            // Set flags for dhcp options
    +            boolean networkHasDns = networkHasDns(network);
    +            Boolean defaultHasDns = null;
    +            // Determine if dhcp options of the other nics in the network need to be updated
    +            if (VirtualMachine.Type.DomainRouter.equals(vm.getType()) && !State.Implementing.equals(network.getState())) {
    +                // Update dhcp options if a VR is added when we are not initiating the network
    +                s_logger.debug(String.format("DomainRouter is added to an existing network: %s in state: %s", network.getName(), network.getState()));
    +                List<VspDhcpVMOption> dhcpOptions = Lists.newArrayList();
    +                for (NicVO userNic :_nicDao.listByNetworkId(network.getId())){
    +                    if (!VirtualMachine.Type.DomainRouter.equals(userNic.getVmType())) {
    +                        // Dhcp options for Domain router are handled later
    +                        VMInstanceVO userVm  = _vmInstanceDao.findById(userNic.getInstanceId());
    --- End diff --
    
    It is not necessary to fetch the vm here, as only the id is used.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by krissterckx <gi...@git.apache.org>.
Github user krissterckx commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    Thanks @karuturi 
    
    Kris


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by krissterckx <gi...@git.apache.org>.
Github user krissterckx commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @jburwell @rhtyd 
    I would appreciate your feedback.
     
    This PR is pending from early June, and we have more PR's pending. 
    
    Thanks,
    Cheers
    
    Kris Sterckx
    Nuage Networks


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
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.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by prashanthvarma <gi...@git.apache.org>.
Github user prashanthvarma commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @jburwell @rhtyd I have rebased this PR with latest master, and squashed commits.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @krissterckx could you please squash your commits and provide a clear explanation of the motivations for the change?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by prashanthvarma <gi...@git.apache.org>.
Github user prashanthvarma commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @jburwell @rhtyd We were able to successfully run the failing test "test_01_create_template" on our kvm-centos7 environment with this PR build after dealing with the issue on ACS-KVM agent (missing semi-colon in systemd file), which was fixed on master today. 
    
    Adding to our last two comments, all the above test failures are most likely test environment (or) timing issues. Please do reconsider this PR for review and merging into master for 4.10 RC.
    
    Here are the test run logs:
    
    [results.txt](https://github.com/apache/cloudstack/files/581418/results.txt)
    [runinfo.txt](https://github.com/apache/cloudstack/files/581417/runinfo.txt)
    
    Test create public & private template ... === TestName: test_01_create_template | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 1 test in 541.353s
    
    OK


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755409
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java ---
    @@ -386,6 +392,17 @@ private Answer executeRequest(TrashNetworkVspCommand cmd) {
             }
         }
     
    +    private Answer executeRequest(UpdateDhcpOptionVspCommand cmd) {
    +        try {
    +            isNuageVspManagerLoaded();
    +            _nuageVspGuruClient.applyDhcpOptions(cmd.getDhcpOptions(), cmd.getNetwork());
    +            return new Answer(cmd, true, "Update DhcpOptions on VM's in network: " + cmd.getNetwork().getName() + " on Nuage VSD " + _hostName);
    +        } catch (ExecutionException | ConfigurationException e) {
    +            s_logger.error("Failure during " + cmd + " on Nuage VSD " + _hostName, e);
    --- End diff --
    
    Please add ``cmd.getDhcpOptions`` to the log message to assist with operational debugging.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by krissterckx <gi...@git.apache.org>.
Github user krissterckx commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    Hi @jburwell  appreciating your view based on the comments addressed.
    
    Thanks
    
    Kris 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by singalrahul <gi...@git.apache.org>.
Github user singalrahul commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @jburwell  We analyze KVM run (as we do most of our testing on KVM :-) )..... On KVM there is only one script fail which is "test_01_create_template" and which fails during deletion of template. In this test case we are just creating template and then list it and then delete it.... All the other test case in this file (test_templates.py) also delete the template and everywhere it pass... like in testcase "test_02_edit_template" and "test_03_delete_template" we are creating the template with the same parameter and then deleting it which is successful....
    
    We doubt it is more related to timing issue, that in "test_01_create_template" it is too fast to delete.... May be when we run it second time it pass as in other test cases same scenario passing


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755671
  
    --- Diff: server/src/com/cloud/network/element/VirtualRouterElement.java ---
    @@ -988,6 +1016,21 @@ public boolean addDhcpEntry(final Network network, final NicProfile nic, final V
             return result;
         }
     
    +    protected boolean deleteDhcpSupportForSubnet(Network network, Network.Service service) throws ResourceUnavailableException {
    +        if (canHandle(network, service)) {
    +            final List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
    +            if (routers == null || routers.size() == 0) {
    --- End diff --
    
    Minor nit: Please consider using ``isEmpty`` rather than a size check as it is clearer intent and more idiomatic.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755434
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java ---
    @@ -431,6 +448,17 @@ private Answer executeRequest(ShutDownVpcVspCommand cmd) {
             }
         }
     
    +    private Answer executeRequest(ShutDownVspCommand cmd) {
    +        try {
    +            isNuageVspElementLoaded();
    +            _nuageVspElementClient.shutdownNetwork(cmd.getNetwork(), cmd.getDhcpOptions());
    +            return new Answer(cmd, true, "Shutdown VPC " + cmd.getNetwork().getUuid()+ " on Nuage VSD " + _hostName);
    +        } catch (ConfigurationException e) {
    +            s_logger.error("Failure during " + cmd + " on Nuage VSD " + _hostName, e);
    --- End diff --
    
    Please add ``cmd.getDhcpOptions`` to the log message to assist with operational debugging.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755754
  
    --- Diff: server/src/com/cloud/network/element/VirtualRouterElement.java ---
    @@ -988,6 +1016,21 @@ public boolean addDhcpEntry(final Network network, final NicProfile nic, final V
             return result;
         }
     
    +    protected boolean deleteDhcpSupportForSubnet(Network network, Network.Service service) throws ResourceUnavailableException {
    +        if (canHandle(network, service)) {
    +            final List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
    +            if (routers == null || routers.size() == 0) {
    +                throw new ResourceUnavailableException("Can't find at least one router!", DataCenter.class, network.getDataCenterId());
    +            }
    +            try {
    +                return _routerMgr.removeDhcpSupportForSubnet(network, routers);
    +            } catch (final ResourceUnavailableException e) {
    +                s_logger.debug("Router resource unavailable ");
    --- End diff --
    
    Why not log this information to ``ERROR`` or ``WARN``?  Please add context information about the ``routers`` and ``network`` to help operational debugging.  Finally, please add the exception to the log.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77754362
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/guru/ImplementNetworkVspCommand.java ---
    @@ -56,7 +56,7 @@ public boolean equals(Object o) {
     
             ImplementNetworkVspCommand that = (ImplementNetworkVspCommand) o;
     
    -        if (_dnsServers != null ? !_dnsServers.equals(that._dnsServers) : that._dnsServers != null) return false;
    +        if (_dhcpOption != null ? !_dhcpOption.equals(that._dhcpOption) : that._dhcpOption != null) return false;
    --- End diff --
    
    Please consider simplifying this ``if`` block with Guava's ``Objects.equals``.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by fmaximus <gi...@git.apache.org>.
Github user fmaximus commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77800584
  
    --- 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)
    --- End diff --
    
    If the datacenter, against which the tests are run, is not configured with Nuage VSP
    we want to skip the Nuage VSP related tests instead of failing.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77756386
  
    --- Diff: test/integration/plugins/nuagevsp/nuageTestCase.py ---
    @@ -461,22 +547,27 @@ def create_NetworkAclRule(self, rule, traffic_type="Ingress", network=None, acl_
                                          )
     
         # ssh_into_VM - Gets into the shell of the given VM using its public IP
    -    def ssh_into_VM(self, vm, public_ip, reconnect=True):
    -        self.debug("SSH into VM with ID - %s on public IP address - %s" % (vm.id, public_ip.ipaddress.ipaddress))
    -        tries = 0
    -        while tries < 3:
    +    def ssh_into_VM(self, vm, public_ip, reconnect=True, negative_test=False):
    +        self.debug("SSH into VM with ID - %s on public IP address - %s" %
    +                   (vm.id, public_ip.ipaddress.ipaddress))
    +        tries = 1 if negative_test else 3
    +        while True:
                 try:
    -                ssh_client = vm.get_ssh_client(ipaddress=public_ip.ipaddress.ipaddress, reconnect=reconnect)
    +                ssh_client = vm.get_ssh_client(
    +                    ipaddress=public_ip.ipaddress.ipaddress,
    +                    reconnect=reconnect,
    +                    retries=3 if negative_test else 30
    +                )
    +                self.debug("Successful to SSH into VM with ID - %s on "
    +                           "public IP address - %s" %
    +                           (vm.id, public_ip.ipaddress.ipaddress))
    +                return ssh_client
                 except Exception as e:
                     self.debug("Failed to SSH into VM: %s" % e)
    -                self.debug("Waiting for the VM to be fully resolved for SSH connection...")
    -                time.sleep(120)
    +                tries -= 1
    +                if tries == 0:
    +                    raise e
    --- End diff --
    
    Please consider separating the retry logic into a utility function to make the code more readable and promote reuse.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @nlivens I can run tests on this PR, if you can squash your changes. Thanks.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @nlivens I would like to get this PR into 4.10.0.0.  Could you please squash the commits?  Once this is done, I will trigger a regression test across VMware, KVM, and XenServer.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77755594
  
    --- Diff: server/src/com/cloud/network/element/VirtualRouterElement.java ---
    @@ -922,10 +921,56 @@ public boolean release(final Network network, final NicProfile nic, final Virtua
             return true;
         }
     
    +
         @Override
         public boolean configDhcpSupportForSubnet(final Network network, final NicProfile nic, final VirtualMachineProfile vm, final DeployDestination dest,
    -            final ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    -        if (canHandle(network, Service.Dhcp)) {
    +                                              final ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    +            return configureDhcpSupport(network, nic, vm, dest, Service.Dhcp);
    +    }
    +
    +    @Override
    +    public boolean configDnsSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
    +        // Ignore if virtual router is already dhcp provider
    +        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp, getProvider())) {
    +            return true;
    +        } else {
    --- End diff --
    
    This ``else`` block is unnecessary since the ``if`` block returns.  Please remove it.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by prashanthvarma <gi...@git.apache.org>.
Github user prashanthvarma commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @jburwell @rhtyd Ok, we will rebase the PR and squash our changes/commits, and let you know here. Moreover, we can re-run the added Marvin tests and share the results after the re-base.
    
    Generally, we have two commits in a PR, one for dev and one for test (Marvin). Is it fine to have this two commits per PR, and squash the other commits ?
    
    Our open PRs #1579 and #1580 have dependencies on this PR. Thus, we included this PR commits in those PRs.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

Posted by prashanthvarma <gi...@git.apache.org>.
Github user prashanthvarma commented on the issue:

    https://github.com/apache/cloudstack/pull/1578
  
    @rhtyd @jburwell Looks like, above test failures are not related to the code changes on this PR.
    
    Let me know, if you want us to do anything from our side to assist you in qualifying and merging this PR. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77754300
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVspCommand.java ---
    @@ -0,0 +1,73 @@
    +//
    +// Licensed to the Apache Software Foundation (ASF) under one
    +// or more contributor license agreements.  See the NOTICE file
    +// distributed with this work for additional information
    +// regarding copyright ownership.  The ASF licenses this file
    +// to you under the Apache License, Version 2.0 (the
    +// "License"); you may not use this file except in compliance
    +// with the License.  You may obtain a copy of the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing,
    +// software distributed under the License is distributed on an
    +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +// KIND, either express or implied.  See the License for the
    +// specific language governing permissions and limitations
    +// under the License.
    +//
    +
    +package com.cloud.agent.api.element;
    +
    +import net.nuage.vsp.acs.client.api.model.VspDhcpDomainOption;
    +import net.nuage.vsp.acs.client.api.model.VspNetwork;
    +
    +import com.cloud.agent.api.Command;
    +
    +public class ShutDownVspCommand extends Command {
    +
    +    private final VspNetwork _network;
    +    private final VspDhcpDomainOption _dhcpOptions;
    +
    +    public ShutDownVspCommand(VspNetwork network, VspDhcpDomainOption dhcpOptions) {
    +        super();
    +        this._network = network;
    +        this._dhcpOptions = dhcpOptions;
    +    }
    +
    +    public VspNetwork getNetwork() {
    +        return _network;
    +    }
    +
    +    public VspDhcpDomainOption getDhcpOptions() {
    +        return _dhcpOptions;
    +    }
    +
    +    @Override
    +    public boolean executeInSequence() {
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean equals(Object o) {
    +        if (this == o) return true;
    +        if (!(o instanceof ShutDownVspCommand)) return false;
    +        if (!super.equals(o)) return false;
    --- End diff --
    
    Per our coding standards, please wrap these ``if`` blocks with curly braces.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request #1578: CLOUDSTACK-9401 : Support for Internal DNS in...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77754323
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/agent/api/element/ShutDownVspCommand.java ---
    @@ -0,0 +1,73 @@
    +//
    +// Licensed to the Apache Software Foundation (ASF) under one
    +// or more contributor license agreements.  See the NOTICE file
    +// distributed with this work for additional information
    +// regarding copyright ownership.  The ASF licenses this file
    +// to you under the Apache License, Version 2.0 (the
    +// "License"); you may not use this file except in compliance
    +// with the License.  You may obtain a copy of the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing,
    +// software distributed under the License is distributed on an
    +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +// KIND, either express or implied.  See the License for the
    +// specific language governing permissions and limitations
    +// under the License.
    +//
    +
    +package com.cloud.agent.api.element;
    +
    +import net.nuage.vsp.acs.client.api.model.VspDhcpDomainOption;
    +import net.nuage.vsp.acs.client.api.model.VspNetwork;
    +
    +import com.cloud.agent.api.Command;
    +
    +public class ShutDownVspCommand extends Command {
    +
    +    private final VspNetwork _network;
    +    private final VspDhcpDomainOption _dhcpOptions;
    +
    +    public ShutDownVspCommand(VspNetwork network, VspDhcpDomainOption dhcpOptions) {
    +        super();
    +        this._network = network;
    +        this._dhcpOptions = dhcpOptions;
    +    }
    +
    +    public VspNetwork getNetwork() {
    +        return _network;
    +    }
    +
    +    public VspDhcpDomainOption getDhcpOptions() {
    +        return _dhcpOptions;
    +    }
    +
    +    @Override
    +    public boolean executeInSequence() {
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean equals(Object o) {
    +        if (this == o) return true;
    +        if (!(o instanceof ShutDownVspCommand)) return false;
    +        if (!super.equals(o)) return false;
    +
    +        ShutDownVspCommand that = (ShutDownVspCommand) o;
    +
    +        if (_dhcpOptions != null ? !_dhcpOptions.equals(that._dhcpOptions) : that._dhcpOptions != null)
    +            return false;
    +        if (_network != null ? !_network.equals(that._network) : that._network != null) return false;
    --- End diff --
    
    Please consider simplifying these two ``if`` blocks with Guava's ``Objects.equal``.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---