You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/03/12 13:59:37 UTC

[1/2] git commit: updated refs/heads/master to 602fafd

Repository: cloudstack
Updated Branches:
  refs/heads/master 5cdb25f41 -> 602fafd0a


README: tell the world we've OVM power :fist:

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/163eac57
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/163eac57
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/163eac57

Branch: refs/heads/master
Commit: 163eac575ff67d8a428f37619ba15128ede1d3c2
Parents: 5cdb25f
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Thu Mar 12 18:13:39 2015 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Mar 12 18:13:39 2015 +0530

----------------------------------------------------------------------
 README.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/163eac57/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 4ea9224..3a7d051 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,8 @@ Network-as-a-Service, user and account management, a full and open native API,
 resource accounting, and a first-class User Interface (UI).
 
 CloudStack currently supports the most popular hypervisors:
-VMware vSphere, KVM, XenServer, XenProject and Hyper-V as well as LXC containers.
+VMware vSphere, KVM, XenServer, XenProject and Hyper-V as well as
+OVM and LXC containers.
 
 Users can manage their cloud with an easy to use Web interface, command line
 tools, and/or a full-featured query based API.


[2/2] git commit: updated refs/heads/master to 602fafd

Posted by bh...@apache.org.
CLOUDSTACK-8323: Adding BVT to test NIC Adapter for Vmware

This closes #116

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/602fafd0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/602fafd0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/602fafd0

Branch: refs/heads/master
Commit: 602fafd0a14a2ba41f8b8ed9a7ebb4d6c96c1087
Parents: 163eac5
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Thu Mar 12 17:28:41 2015 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Mar 12 18:28:54 2015 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_nic_adapter_type.py | 175 +++++++++++++++++++
 tools/marvin/marvin/config/test_data.py         |  16 +-
 tools/marvin/marvin/lib/base.py                 |   5 +-
 3 files changed, 194 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/602fafd0/test/integration/smoke/test_nic_adapter_type.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_nic_adapter_type.py b/test/integration/smoke/test_nic_adapter_type.py
new file mode 100644
index 0000000..262dab5
--- /dev/null
+++ b/test/integration/smoke/test_nic_adapter_type.py
@@ -0,0 +1,175 @@
+# 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.
+
+"""
+    P1 test for testing specific adapter type
+    for added network for vmware
+"""
+
+# Import Local Modules
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.base import (
+                             Account,
+                             ServiceOffering,
+                             VirtualMachine,
+                             NetworkOffering,
+                             Network,
+                             Template
+                             )
+from marvin.lib.common import (get_domain,
+                               get_zone,
+                               get_template
+                               )
+from marvin.lib.utils import (
+                              get_hypervisor_type,
+                              cleanup_resources,
+                              validateList)
+from marvin.codes import PASS
+
+
+class TestAdapterTypeForNic(cloudstackTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        cls.testClient = super(TestAdapterTypeForNic, cls).getClsTestClient()
+        cls.api_client = cls.testClient.getApiClient()
+
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
+        cls.hypervisor = get_hypervisor_type(cls.api_client)
+
+        # 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.testdata["ostype"])
+
+        # Create Accounts & networks
+        cls.testdata["isolated_network"]["zoneid"] = cls.zone.id
+        cls._cleanup = []
+
+        cls.account = Account.create(
+            cls.api_client,
+            cls.testdata["account"],
+            domainid=cls.domain.id)
+        cls._cleanup.append(cls.account)
+
+        cls.userapiclient = cls.testClient.getUserApiClient(
+            UserName=cls.account.name,
+            DomainName=cls.account.domain
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.api_client,
+            cls.testdata["service_offering"])
+        cls._cleanup.append(cls.service_offering)
+
+        # Create Shared Network Offering
+        cls.isolated_network_offering = NetworkOffering.create(
+            cls.api_client,
+            cls.testdata["isolated_network_offering"])
+        cls._cleanup.append(cls.isolated_network_offering)
+        # Enable Isolated Network offering
+        cls.isolated_network_offering.update(cls.api_client, state='Enabled')
+        return
+
+    def setUp(self):
+        self.apiclient = self.testClient.getApiClient()
+        self.cleanup = []
+
+    def tearDown(self):
+        try:
+            cleanup_resources(self.apiclient, self.cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        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
+
+    @unittest.skip("VCenter API Integration Remaining")
+    @attr(tags=["advanced"])
+    def test_vm_nic_adapter_vmxnet3(self):
+        """
+
+        # 1. Register a template for VMware with nicAdapter vmxnet3
+        # 2. Deploy a VM using this template
+        # 3. Create an isolated network
+        # 4. Add network to VM
+        # 5. Verify that the NIC adapter for VM for both the nics
+        #    is vmxnet3
+        """
+
+        if self.hypervisor.lower() not in ["vmware"]:
+            raise unittest.SkipTest("This test case is written specifically\
+                    for Vmware hypervisor")
+
+        # Register a private template in the account with nic adapter vmxnet3
+        template = Template.register(
+            self.userapiclient,
+            self.testdata["configurableData"]["vmxnet3template"],
+            zoneid=self.zone.id,
+            account=self.account.name,
+            domainid=self.account.domainid,
+            details=[{"nicAdapter": self.testdata["configurableData"]["vmxnet3template"]["nicadapter"]}]
+        )
+        self.cleanup.append(template)
+        template.download(self.apiclient)
+
+        templates = Template.list(
+            self.userapiclient,
+            listall=True,
+            id=template.id,
+            templatefilter="self")
+
+        self.assertEqual(
+            validateList(templates)[0],
+            PASS,
+            "Templates list validation failed")
+
+        self.testdata["virtual_machine"]["zoneid"] = self.zone.id
+        self.testdata["virtual_machine"]["template"] = template.id
+
+        virtual_machine = VirtualMachine.create(
+            self.apiclient,
+            self.testdata["virtual_machine"],
+            accountid=self.account.name,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering.id)
+
+        isolated_network = Network.create(
+            self.apiclient,
+            self.testdata["isolated_network"],
+            self.account.name,
+            self.account.domainid,
+            networkofferingid=self.isolated_network_offering.id)
+
+        virtual_machine.add_nic(self.apiclient, isolated_network.id)
+
+        # TODO: Add steps to check the Nic Adapter type in VCenter
+        # using VCenter APIs
+        return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/602fafd0/tools/marvin/marvin/config/test_data.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py
index a43021b..80ead64 100644
--- a/tools/marvin/marvin/config/test_data.py
+++ b/tools/marvin/marvin/config/test_data.py
@@ -1509,6 +1509,20 @@ test_data = {
                     "ostype": 'CentOS 6.3 (64-bit)',
                     "mode": 'HTTP_DOWNLOAD'
         },
-     "setHostConfigurationForIngressRule": False
+     "setHostConfigurationForIngressRule": False,
+     "vmxnet3template": {
+            "displaytext": "VMXNET3 Template",
+            "name": "VMXNET3 template",
+            "ostype": "CentOS 5.6 (64-bit)",
+            "isfeatured": True,
+            "ispublic": False,
+            "isextractable": True,
+            "mode": "HTTP_DOWNLOAD",
+            "templatefilter": "self",
+            "url": "http://10.147.28.7/templates/4.3.0.2/systemvm64template-2014-09-30-4.3-vmware.ova",
+            "hypervisor": "vmware",
+            "format": "OVA",
+            "nicadapter": "vmxnet3"
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/602fafd0/tools/marvin/marvin/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py
index db2f3a8..5ca1bc2 100755
--- a/tools/marvin/marvin/lib/base.py
+++ b/tools/marvin/marvin/lib/base.py
@@ -1086,7 +1086,7 @@ class Template:
     @classmethod
     def register(cls, apiclient, services, zoneid=None,
                  account=None, domainid=None, hypervisor=None,
-                 projectid=None):
+                 projectid=None, details=None):
         """Create template from URL"""
 
         # Create template from Virtual machine and Volume ID
@@ -1143,6 +1143,9 @@ class Template:
         elif "projectid" in services:
             cmd.projectid = services["projectid"]
 
+        if details:
+            cmd.details = details
+
         # Register Template
         template = apiclient.registerTemplate(cmd)