You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by sanju1010 <gi...@git.apache.org> on 2016/01/07 08:26:37 UTC

[GitHub] cloudstack pull request: [CLOUDSTACK-9215]Test to verify vm deploy...

GitHub user sanju1010 opened a pull request:

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

    [CLOUDSTACK-9215]Test to verify vm deployment in vpc tier if nic type is Vmxnet3

    Please check bug CLOUDSTACK-9215 for more details.
    
    Test Results:
    ==========
    Test to create vpc tier with nic type as Vmxnet3 ... === TestName: test_01_create_tier_Vmxnet3 | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 1 test in 591.630s
    
    OK


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

    $ git pull https://github.com/sanju1010/cloudstack vmxnet3

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

    https://github.com/apache/cloudstack/pull/1316.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 #1316
    
----
commit 6fa6a2b5d818fde5761ceb6e28fa7d4949b70751
Author: sanjeevn <sa...@citrix.com>
Date:   2016-01-06T06:03:58Z

    New marvin test to validate CS-40430
    Bug-Id: CS-40430
    Reviewed-by: Self

----


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-175690062
  
    @sanju1010 please squash changes in to a single commit and comment if all outstanding issues are resolved 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 pull request: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-201894891
  
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 132
     Hypervisor xenserver
     NetworkType Advanced
     Passed=99
     Failed=5
     Skipped=4
    
    
    **Failed tests:**
    * integration.smoke.test_service_offerings.TestCreateServiceOffering
    
     * ContextSuite context=TestServiceOfferings>:setup Failed
    
    * integration.smoke.test_loadbalance.TestLoadBalance
    
     * test_01_create_lb_rule_src_nat Failed
    
     * test_02_create_lb_rule_non_nat Failed
    
     * test_assign_and_removal_lb Failed
    
    * integration.smoke.test_volumes.TestCreateVolume
    
     * test_06_download_detached_volume Failed
    
    
    **Skipped tests:**
    test_vm_nic_adapter_vmxnet3
    test_deploy_vgpu_enabled_vm
    test_06_copy_template
    test_06_copy_iso
    
    **Passed test suits:**
    integration.smoke.test_deploy_vm_with_userdata.TestDeployVmWithUserData
    integration.smoke.test_affinity_groups_projects.TestDeployVmWithAffinityGroup
    integration.smoke.test_portable_publicip.TestPortablePublicIPAcquire
    integration.smoke.test_over_provisioning.TestUpdateOverProvision
    integration.smoke.test_global_settings.TestUpdateConfigWithScope
    integration.smoke.test_guest_vlan_range.TestDedicateGuestVlanRange
    integration.smoke.test_scale_vm.TestScaleVm
    integration.smoke.test_routers.TestRouterServices
    integration.smoke.test_reset_vm_on_reboot.TestResetVmOnReboot
    integration.smoke.test_snapshots.TestSnapshotRootDisk
    integration.smoke.test_deploy_vms_with_varied_deploymentplanners.TestDeployVmWithVariedPlanners
    integration.smoke.test_network.TestDeleteAccount
    integration.smoke.test_non_contigiousvlan.TestUpdatePhysicalNetwork
    integration.smoke.test_deploy_vm_iso.TestDeployVMFromISO
    integration.smoke.test_public_ip_range.TestDedicatePublicIPRange
    integration.smoke.test_multipleips_per_nic.TestDeployVM
    integration.smoke.test_regions.TestRegions
    integration.smoke.test_affinity_groups.TestDeployVmWithAffinityGroup
    integration.smoke.test_network_acl.TestNetworkACL
    integration.smoke.test_pvlan.TestPVLAN
    integration.smoke.test_ssvm.TestSSVMs
    integration.smoke.test_nic.TestNic
    integration.smoke.test_deploy_vm_root_resize.TestDeployVM
    integration.smoke.test_resource_detail.TestResourceDetail
    integration.smoke.test_secondary_storage.TestSecStorageServices
    integration.smoke.test_vm_life_cycle.TestDeployVM
    integration.smoke.test_disk_offerings.TestCreateDiskOffering


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by sanju1010 <gi...@git.apache.org>.
Github user sanju1010 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-206313506
  
    Squashed changed into single commit and addressed all the review comments and also posted test run results after making changes. Can somebody please merge 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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-206664435
  
    I am not sure how that tests this code though.  I have that same setup, but I don't think I have the ability to test this configuration.  Am I wrong?


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-169611983
  
    @sanju1010 can you move CS-40430 to the apache jira and refer that one? the ticket in your commit message is not public (to me)


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by sanju1010 <gi...@git.apache.org>.
Github user sanju1010 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-169654041
  
    @DaanHoogland Cloudstack-9215 is the one I created for 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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-206751818
  
    No, you are right. I no longer have that 'hardware' so I can rerun the test but as I stated earlier the test was basing itself on an exception not being throw at the time I did the test and therefore not as useful as would be expected. The test has improved but I have no longer access to the  virtualised environment in which I ran it.
    
    However; this is a test, not production code. What do you want from the test other then the test writer being able to use it to verify ACS? Unless testcode can harm production environments I'd say merge @swill @wilderrodrigues @remibergsma @bhaisaab 


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-169661295
  
    Can you change the commit message with this id, then?


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-206934467
  
    Since this is a net new test that I do not have the ability to test and because the tests that have been run are passing, I think this PR is ready.  Are we in agreement on this?


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

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

    https://github.com/apache/cloudstack/pull/1316#discussion_r49191905
  
    --- Diff: test/integration/component/maint/test_vpc.py ---
    @@ -0,0 +1,360 @@
    +# 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.
    +
    +""" Component tests for VPC functionality
    +"""
    +# Import Local Modules
    +from nose.plugins.attrib import attr
    +from marvin.cloudstackTestCase import cloudstackTestCase
    +from marvin.lib.utils import cleanup_resources, validateList
    +from marvin.lib.base import (Account,
    +                             VPC,
    +                             VpcOffering,
    +                             VirtualMachine,
    +                             ServiceOffering,
    +                             Network,
    +                             NetworkOffering,
    +                             Configurations)
    +from marvin.lib.common import (get_domain,
    +                               get_zone,
    +                               get_template)
    +from marvin.sshClient import SshClient
    +from marvin.codes import PASS
    +import time
    +
    +class Services:
    +
    +    """Test VPC services
    +    """
    +
    +    def __init__(self):
    +        self.services = {
    +            "account": {
    +                "email": "test@test.com",
    +                "firstname": "Test",
    +                "lastname": "User",
    +                "username": "test",
    +                # Random characters are appended for unique
    +                # username
    +                "password": "password",
    +            },
    +            "domain_admin": {
    +                "email": "domain@admin.com",
    +                "firstname": "Domain",
    +                "lastname": "Admin",
    +                "username": "DoA",
    +                # Random characters are appended for unique
    +                # username
    +                "password": "password",
    +            },
    +            "service_offering": {
    +                "name": "Tiny Instance",
    +                "displaytext": "Tiny Instance",
    +                "cpunumber": 1,
    +                "cpuspeed": 100,
    +                "memory": 128,
    +            },
    +            "network_offering": {
    +                "name": 'VPC Network offering',
    +                "displaytext": 'VPC Network off',
    +                "guestiptype": 'Isolated',
    +                "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
    +                "traffictype": 'GUEST',
    +                "availability": 'Optional',
    +                "useVpc": 'on',
    +                "serviceProviderList": {
    +                    "Vpn": 'VpcVirtualRouter',
    +                    "Dhcp": 'VpcVirtualRouter',
    +                    "Dns": 'VpcVirtualRouter',
    +                    "SourceNat": 'VpcVirtualRouter',
    +                    "PortForwarding": 'VpcVirtualRouter',
    +                    "Lb": 'VpcVirtualRouter',
    +                    "UserData": 'VpcVirtualRouter',
    +                    "StaticNat": 'VpcVirtualRouter',
    +                    "NetworkACL": 'VpcVirtualRouter'
    +                },
    +            },
    +            "network_offering_no_lb": {
    +                "name": 'VPC Network offering',
    +                "displaytext": 'VPC Network off',
    +                "guestiptype": 'Isolated',
    +                "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL',
    +                "traffictype": 'GUEST',
    +                "availability": 'Optional',
    +                "useVpc": 'on',
    +                "serviceProviderList": {
    +                    "Vpn": 'VpcVirtualRouter',
    +                    "Dhcp": 'VpcVirtualRouter',
    +                    "Dns": 'VpcVirtualRouter',
    +                    "SourceNat": 'VpcVirtualRouter',
    +                    "PortForwarding": 'VpcVirtualRouter',
    +                    "UserData": 'VpcVirtualRouter',
    +                    "StaticNat": 'VpcVirtualRouter',
    +                    "NetworkACL": 'VpcVirtualRouter'
    +                },
    +            },
    +            "vpc_offering": {
    +                "name": 'VPC off',
    +                "displaytext": 'VPC off',
    +                "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat,NetworkACL',
    +            },
    +            "vpc": {
    +                "name": "TestVPC",
    +                "displaytext": "TestVPC",
    +                "cidr": '10.0.0.1/24'
    +            },
    +            "vpc_no_name": {
    +                "displaytext": "TestVPC",
    +                "cidr": '10.0.0.1/24'
    +            },
    +            "network": {
    +                "name": "Test Network",
    +                "displaytext": "Test Network",
    +                "netmask": '255.255.255.0'
    +            },
    +            "lbrule": {
    +                "name": "SSH",
    +                "alg": "leastconn",
    +                # Algorithm used for load balancing
    +                "privateport": 22,
    +                "publicport": 2222,
    +                "openfirewall": False,
    +                "startport": 22,
    +                "endport": 2222,
    +                "protocol": "TCP",
    +                "cidrlist": '0.0.0.0/0',
    +            },
    +            "natrule": {
    +                "privateport": 22,
    +                "publicport": 22,
    +                "startport": 22,
    +                "endport": 22,
    +                "protocol": "TCP",
    +                "cidrlist": '0.0.0.0/0',
    +            },
    +            "fw_rule": {
    +                "startport": 1,
    +                "endport": 6000,
    +                "cidr": '0.0.0.0/0',
    +                # Any network (For creating FW rule)
    +                "protocol": "TCP"
    +            },
    +            "icmp_rule": {
    +                "icmptype": -1,
    +                "icmpcode": -1,
    +                "cidrlist": '0.0.0.0/0',
    +                "protocol": "ICMP"
    +            },
    +            "virtual_machine": {
    +                "displayname": "Test VM",
    +                "username": "root",
    +                "password": "password",
    +                "ssh_port": 22,
    +                "hypervisor": 'XenServer',
    +                # Hypervisor type should be same as
    +                # hypervisor type of cluster
    +                "privateport": 22,
    +                "publicport": 22,
    +                "protocol": 'TCP',
    +            },
    +            "domain": {
    +                "name": "TestDomain"
    +            },
    +            "vpn_customer_gw": {
    +                "ipsecpsk": "s2svpn",
    +                "ikepolicy": "3des-md5",
    +                "ikelifetime": "86400",
    +                "esppolicy": "3des-md5",
    +                "esplifetime": "3600",
    +            },
    +            "ostype": 'CentOS 5.3 (64-bit)',
    +            # Cent OS 5.3 (64 bit)
    +            "sleep": 90,
    +            "timeout": 10,
    +            "mode": 'advanced'
    +        }
    +
    +
    +class TestVPC(cloudstackTestCase):
    +
    +    @classmethod
    +    def setUpClass(cls):
    +        cls.testClient = super(TestVPC, cls).getClsTestClient()
    +        cls.api_client = cls.testClient.getApiClient()
    +        cls.hypervisor = cls.testClient.getHypervisorInfo()
    +        cls.mgtSvrDetails = cls.config.__dict__["mgtSvr"][0].__dict__
    +        cls.unsupportedHypervisor = False
    +        if cls.hypervisor.lower() == 'hyperv':
    +            cls._cleanup = []
    +            cls.unsupportedHypervisor = True
    +            return
    +        cls.services = Services().services
    +        # Get Zone, Domain and templates
    +        cls.domain = get_domain(cls.api_client)
    +        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
    +        cls.template = get_template(
    +            cls.api_client,
    +            cls.zone.id,
    +            cls.services["ostype"]
    +        )
    +        cls.services["virtual_machine"]["zoneid"] = cls.zone.id
    +        cls.services["virtual_machine"]["template"] = cls.template.id
    +
    +        cls.service_offering = ServiceOffering.create(
    +            cls.api_client,
    +            cls.services["service_offering"]
    +        )
    +        cls.vpc_off = VpcOffering.create(
    +            cls.api_client,
    +            cls.services["vpc_offering"]
    +        )
    +        cls.vpc_off.update(cls.api_client, state='Enabled')
    +        cls._cleanup = [
    +            cls.service_offering,
    +        ]
    +        return
    +
    +    @classmethod
    +    def tearDownClass(cls):
    +        try:
    +            # Cleanup resources used
    +            cleanup_resources(cls.api_client, cls._cleanup)
    +        except Exception as e:
    +            raise Exception("Warning: Exception during cleanup : %s" % e)
    +        return
    +
    +    def setUp(self):
    +        self.apiclient = self.testClient.getApiClient()
    +        self.dbclient = self.testClient.getDbConnection()
    +        self.account = Account.create(
    +            self.apiclient,
    +            self.services["account"],
    +            admin=True,
    +            domainid=self.domain.id
    +        )
    +        self.cleanup = []
    +        self.cleanup.insert(0, self.account)
    +        if self.unsupportedHypervisor:
    +            self.skipTest("not supported on %s" % self.hypervisor)
    +        return
    +
    +    def tearDown(self):
    +        try:
    +            cleanup_resources(self.apiclient, self.cleanup)
    +        except Exception as e:
    +            self.debug("Warning: Exception during cleanup : %s" % e)
    +        return
    +
    +    def updateConfigurAndRestart(self, name, value):
    +        Configurations.update(self.apiclient, name, value)
    +        self.RestartServers()
    +        time.sleep(self.services["sleep"])
    +
    +    def RestartServers(self):
    +        """ Restart management server and usage server """
    +        sshClient = SshClient(
    +            self.mgtSvrDetails["mgtSvrIp"],
    +            22,
    +            self.mgtSvrDetails["user"],
    +            self.mgtSvrDetails["passwd"]
    +        )
    +        command = "service cloudstack-management restart"
    +        sshClient.execute(command)
    +        return
    +
    +    @attr(tags=["advanced", "intervlan", "dvs"], required_hardware="true")
    +    def test_01_create_tier_Vmxnet3(self):
    +        """
    +            Test to create vpc tier with nic type as Vmxnet3
    +            #1.Set global setting parameter "vmware.systemvm.nic.device.type"
    +            to "Vmxnet3"
    +            #2.Create VPC
    +            #3.Create one tier
    +            #4.Deploy one guest vm in the tier created in step3
    +        """
    +        if self.hypervisor.lower() not in ['vmware']:
    +            self.skipTest("This test can only run on vmware setup")
    +
    +        nic_types = Configurations.list(
    +            self.apiclient,
    +            name="vmware.systemvm.nic.device.type"
    +        )
    +        self.assertEqual(validateList(nic_types)[0], PASS, "Invalid list config")
    +        nic_type = nic_types[0].value
    +        reset = False
    +        if nic_type.lower() != "vmxnet3":
    +            self.updateConfigurAndRestart("vmware.systemvm.nic.device.type", "Vmxnet3")
    +            reset = True
    +
    +        self.services["vpc"]["cidr"] = "10.1.1.1/16"
    +        self.debug("creating a VPC network in the account: %s" %
    +                   self.account.name)
    +        try:
    +            vpc = VPC.create(
    +                self.apiclient,
    +                self.services["vpc"],
    +                vpcofferingid=self.vpc_off.id,
    +                zoneid=self.zone.id,
    +                account=self.account.name,
    +                domainid=self.account.domainid
    +            )
    +            vpc_res = VPC.list(self.apiclient, id=vpc.id)
    +            self.assertEqual(validateList(vpc_res)[0], PASS, "Invalid response from listvpc")
    +
    +            self.network_offering = NetworkOffering.create(
    +                self.apiclient,
    +                self.services["network_offering"],
    +                conservemode=False
    +            )
    +            # Enable Network offering
    +            self.network_offering.update(self.apiclient, state='Enabled')
    +            self.cleanup.append(self.network_offering)
    +
    +            gateway = vpc.cidr.split('/')[0]
    +            # Split the cidr to retrieve gateway
    +            # for eg. cidr = 10.0.0.1/24
    +            # Gateway = 10.0.0.1
    +            # Creating network using the network offering created
    +            self.debug("Creating network with network offering: %s" %
    +                       self.network_offering.id)
    +            network = Network.create(
    +                self.apiclient,
    +                self.services["network"],
    +                accountid=self.account.name,
    +                domainid=self.account.domainid,
    +                networkofferingid=self.network_offering.id,
    +                zoneid=self.zone.id,
    +                gateway=gateway,
    +                vpcid=vpc.id
    +            )
    +            self.debug("Created network with ID: %s" % network.id)
    +            VirtualMachine.create(
    +                self.apiclient,
    +                self.services["virtual_machine"],
    +                accountid=self.account.name,
    +                domainid=self.account.domainid,
    +                serviceofferingid=self.service_offering.id,
    +                networkids=[str(network.id)]
    +            )
    +            self.debug("Deployed VM in network: %s" % network.id)
    +        except Exception as e:
    --- End diff --
    
    why rely on the valid implementation by the developer of the error handling in CloudStack? shouldn't you assert that it is actually created? A programmer might have silently ignored an exception.


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-206441793
  
    @DaanHoogland you ran this against real hardware correct?


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

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

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


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by sanju1010 <gi...@git.apache.org>.
Github user sanju1010 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-169674309
  
    @DaanHoogland , modified the commit message as per your review comment.


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-206578492
  
    real virtualized hardware (advanced zone with 2 kvm hosts, bubble style).


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

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

    https://github.com/apache/cloudstack/pull/1316#discussion_r58840282
  
    --- Diff: test/integration/component/maint/test_vpc.py ---
    @@ -0,0 +1,400 @@
    +# 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.
    +
    +""" Component tests for VPC functionality
    +"""
    +# Import Local Modules
    +from nose.plugins.attrib import attr
    +from marvin.cloudstackTestCase import cloudstackTestCase
    +from marvin.lib.utils import cleanup_resources, validateList, get_process_status
    +from marvin.lib.base import (Account,
    +                             VPC,
    +                             VpcOffering,
    +                             VirtualMachine,
    +                             ServiceOffering,
    +                             Network,
    +                             NetworkOffering,
    +                             Configurations,
    +                             Router)
    +from marvin.lib.common import (get_domain,
    +                               get_zone,
    +                               get_template)
    +from marvin.sshClient import SshClient
    +from marvin.codes import PASS
    +import re
    +import time
    +
    +class Services:
    +
    +    """Test VPC services
    +    """
    +
    +    def __init__(self):
    +        self.services = {
    +            "account": {
    +                "email": "test@test.com",
    +                "firstname": "Test",
    +                "lastname": "User",
    +                "username": "test",
    +                # Random characters are appended for unique
    +                # username
    +                "password": "password",
    +            },
    +            "domain_admin": {
    +                "email": "domain@admin.com",
    +                "firstname": "Domain",
    +                "lastname": "Admin",
    +                "username": "DoA",
    +                # Random characters are appended for unique
    +                # username
    +                "password": "password",
    +            },
    +            "service_offering": {
    +                "name": "Tiny Instance",
    +                "displaytext": "Tiny Instance",
    +                "cpunumber": 1,
    +                "cpuspeed": 100,
    +                "memory": 128,
    +            },
    +            "network_offering": {
    +                "name": 'VPC Network offering',
    +                "displaytext": 'VPC Network off',
    +                "guestiptype": 'Isolated',
    +                "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL',
    +                "traffictype": 'GUEST',
    +                "availability": 'Optional',
    +                "useVpc": 'on',
    +                "serviceProviderList": {
    +                    "Vpn": 'VpcVirtualRouter',
    +                    "Dhcp": 'VpcVirtualRouter',
    +                    "Dns": 'VpcVirtualRouter',
    +                    "SourceNat": 'VpcVirtualRouter',
    +                    "PortForwarding": 'VpcVirtualRouter',
    +                    "Lb": 'VpcVirtualRouter',
    +                    "UserData": 'VpcVirtualRouter',
    +                    "StaticNat": 'VpcVirtualRouter',
    +                    "NetworkACL": 'VpcVirtualRouter'
    +                },
    +            },
    +            "network_offering_no_lb": {
    +                "name": 'VPC Network offering',
    +                "displaytext": 'VPC Network off',
    +                "guestiptype": 'Isolated',
    +                "supportedservices": 'Vpn,Dhcp,Dns,SourceNat,PortForwarding,UserData,StaticNat,NetworkACL',
    +                "traffictype": 'GUEST',
    +                "availability": 'Optional',
    +                "useVpc": 'on',
    +                "serviceProviderList": {
    +                    "Vpn": 'VpcVirtualRouter',
    +                    "Dhcp": 'VpcVirtualRouter',
    +                    "Dns": 'VpcVirtualRouter',
    +                    "SourceNat": 'VpcVirtualRouter',
    +                    "PortForwarding": 'VpcVirtualRouter',
    +                    "UserData": 'VpcVirtualRouter',
    +                    "StaticNat": 'VpcVirtualRouter',
    +                    "NetworkACL": 'VpcVirtualRouter'
    +                },
    +            },
    +            "vpc_offering": {
    +                "name": 'VPC off',
    +                "displaytext": 'VPC off',
    +                "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Lb,UserData,StaticNat,NetworkACL',
    +            },
    +            "vpc": {
    +                "name": "TestVPC",
    +                "displaytext": "TestVPC",
    +                "cidr": '10.0.0.1/24'
    +            },
    +            "vpc_no_name": {
    +                "displaytext": "TestVPC",
    +                "cidr": '10.0.0.1/24'
    +            },
    +            "network": {
    +                "name": "Test Network",
    +                "displaytext": "Test Network",
    +                "netmask": '255.255.255.0'
    +            },
    +            "lbrule": {
    +                "name": "SSH",
    +                "alg": "leastconn",
    +                # Algorithm used for load balancing
    +                "privateport": 22,
    +                "publicport": 2222,
    +                "openfirewall": False,
    +                "startport": 22,
    +                "endport": 2222,
    +                "protocol": "TCP",
    +                "cidrlist": '0.0.0.0/0',
    +            },
    +            "natrule": {
    +                "privateport": 22,
    +                "publicport": 22,
    +                "startport": 22,
    +                "endport": 22,
    +                "protocol": "TCP",
    +                "cidrlist": '0.0.0.0/0',
    +            },
    +            "fw_rule": {
    +                "startport": 1,
    +                "endport": 6000,
    +                "cidr": '0.0.0.0/0',
    +                # Any network (For creating FW rule)
    +                "protocol": "TCP"
    +            },
    +            "icmp_rule": {
    +                "icmptype": -1,
    +                "icmpcode": -1,
    +                "cidrlist": '0.0.0.0/0',
    +                "protocol": "ICMP"
    +            },
    +            "virtual_machine": {
    +                "displayname": "Test VM",
    +                "username": "root",
    +                "password": "password",
    +                "ssh_port": 22,
    +                # Hypervisor type should be same as
    +                # hypervisor type of cluster
    +                "privateport": 22,
    +                "publicport": 22,
    +                "protocol": 'TCP',
    +            },
    +            "domain": {
    +                "name": "TestDomain"
    +            },
    +            "vpn_customer_gw": {
    +                "ipsecpsk": "s2svpn",
    +                "ikepolicy": "3des-md5",
    +                "ikelifetime": "86400",
    +                "esppolicy": "3des-md5",
    +                "esplifetime": "3600",
    +            },
    +            "ostype": 'CentOS 5.3 (64-bit)',
    +            # Cent OS 5.3 (64 bit)
    +            "sleep": 90,
    +            "timeout": 10,
    +            "mode": 'advanced'
    +        }
    +
    +
    +class TestVPC(cloudstackTestCase):
    +
    +    @classmethod
    +    def setUpClass(cls):
    +        cls.testClient = super(TestVPC, cls).getClsTestClient()
    +        cls.api_client = cls.testClient.getApiClient()
    +        cls.hypervisor = cls.testClient.getHypervisorInfo()
    +        cls.mgtSvrDetails = cls.config.__dict__["mgtSvr"][0].__dict__
    +        cls.unsupportedHypervisor = False
    +        if cls.hypervisor.lower() == 'hyperv':
    +            cls._cleanup = []
    +            cls.unsupportedHypervisor = True
    +            return
    +        cls.services = Services().services
    +        # Get Zone, Domain and templates
    +        cls.domain = get_domain(cls.api_client)
    +        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
    +        cls.template = get_template(
    +            cls.api_client,
    +            cls.zone.id,
    +            cls.services["ostype"]
    +        )
    +        cls.services["virtual_machine"]["zoneid"] = cls.zone.id
    +        cls.services["virtual_machine"]["template"] = cls.template.id
    +
    +        cls.service_offering = ServiceOffering.create(
    +            cls.api_client,
    +            cls.services["service_offering"]
    +        )
    +        cls.vpc_off = VpcOffering.create(
    +            cls.api_client,
    +            cls.services["vpc_offering"]
    +        )
    +        cls.vpc_off.update(cls.api_client, state='Enabled')
    +        cls._cleanup = [
    +            cls.service_offering,
    +        ]
    +        return
    +
    +    @classmethod
    +    def tearDownClass(cls):
    +        try:
    +            # Cleanup resources used
    +            cleanup_resources(cls.api_client, cls._cleanup)
    +        except Exception as e:
    +            raise Exception("Warning: Exception during cleanup : %s" % e)
    +        return
    +
    +    def setUp(self):
    +        self.apiclient = self.testClient.getApiClient()
    +        self.dbclient = self.testClient.getDbConnection()
    +        self.account = Account.create(
    +            self.apiclient,
    +            self.services["account"],
    +            admin=True,
    +            domainid=self.domain.id
    +        )
    +        self.cleanup = []
    +        self.cleanup.insert(0, self.account)
    +        if self.unsupportedHypervisor:
    +            self.skipTest("not supported on %s" % self.hypervisor)
    +        return
    +
    +    def tearDown(self):
    +        try:
    +            cleanup_resources(self.apiclient, self.cleanup)
    +        except Exception as e:
    +            self.debug("Warning: Exception during cleanup : %s" % e)
    +        return
    +
    +    def updateConfigurAndRestart(self, name, value):
    +        Configurations.update(self.apiclient, name, value)
    +        self.RestartServers()
    +        time.sleep(self.services["sleep"])
    +
    +    def RestartServers(self):
    +        """ Restart management
    +        server and usage server """
    +        sshClient = SshClient(
    +            self.mgtSvrDetails["mgtSvrIp"],
    +            22,
    +            self.mgtSvrDetails["user"],
    +            self.mgtSvrDetails["passwd"]
    +        )
    +        command = "service cloudstack-management restart"
    +        sshClient.execute(command)
    +        return
    +
    +    @attr(tags=["advanced", "intervlan", "dvs", "test"], required_hardware="true")
    +    def test_01_create_tier_Vmxnet3(self):
    +        """
    +            Test to create vpc tier with nic type as Vmxnet3
    +            #1.Set global setting parameter "vmware.systemvm.nic.device.type"
    +            to "Vmxnet3"
    +            #2.Create VPC
    +            #3.Create one tier
    +            #4.Deploy one guest vm in the tier created in step3
    +        """
    +        if self.hypervisor.lower() not in ['vmware']:
    +            self.skipTest("This test can only run on vmware setup")
    --- End diff --
    
    @DaanHoogland @swill to run this test, you'll need a vmware environment. I read the code, LGTM.
    
    Looking at the test this is testing that a particular nic type works in a VPC, than test VPC itself. Ideally, we would want few tests for VPC that can be run against any of the major 3 hypervisors (xen, vmware, kvm) but it's a good start. 


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

Re: [GitHub] cloudstack pull request: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by Sanjeev N <sa...@apache.org>.
Will add some validations

On Fri, Jan 8, 2016 at 7:51 PM, DaanHoogland <gi...@git.apache.org> wrote:

> Github user DaanHoogland commented on the pull request:
>
>     https://github.com/apache/cloudstack/pull/1316#issuecomment-170016433
>
>     test succeeds as is :
>     ```
>     [root@daans-dev-machinina ~]# ssh cs1 nosetests --with-marvin
> --marvin-config=/data/shared/marvin/mct-zone1-kvm1-kvm2.cfg  -s -a
> tags=advanced,required_hardware=true
> /data/git/cs1/cloudstack/test/integration/component/maint/test_vpc.py
>     root@cs1's password:
>
>     ==== Marvin Init Started ====
>
>     === Marvin Parse Config Successful ===
>
>     === Marvin Setting TestData Successful===
>
>     ==== Log Folder Path: /tmp//MarvinLogs//Jan_08_2016_14_17_12_EBMCRT.
> All logs will be available here ====
>
>     === Marvin Init Logging Successful===
>
>     ==== Marvin Init Successful ====
>     ===final results are now copied to: /tmp//MarvinLogs/test_vpc_1F4ULR===
>     ```
>
>     LGTM but seems less useful due to my remark on line 354
>
>
> ---
> 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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-170016433
  
    test succeeds as is : 
    ```
    [root@daans-dev-machinina ~]# ssh cs1 nosetests --with-marvin --marvin-config=/data/shared/marvin/mct-zone1-kvm1-kvm2.cfg  -s -a tags=advanced,required_hardware=true /data/git/cs1/cloudstack/test/integration/component/maint/test_vpc.py
    root@cs1's password:
    
    ==== Marvin Init Started ====
    
    === Marvin Parse Config Successful ===
    
    === Marvin Setting TestData Successful===
    
    ==== Log Folder Path: /tmp//MarvinLogs//Jan_08_2016_14_17_12_EBMCRT. All logs will be available here ====
    
    === Marvin Init Logging Successful===
    
    ==== Marvin Init Successful ====
    ===final results are now copied to: /tmp//MarvinLogs/test_vpc_1F4ULR===
    ```
    
    LGTM but seems less useful due to my remark on line 354


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-206769730
  
    Agree with @DaanHoogland though looks like it ran no tests (skipped them)


---
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: [CLOUDSTACK-9215]Test to verify vm deploy...

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/1316#issuecomment-169708457
  
    great, thanks
    I will try and find a free env to run 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.
---