You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2013/04/15 15:10:49 UTC
[50/50] [abbrv] git commit: updated
refs/heads/cisco-vnmc-api-integration to 7ce45ea
Fixed indentation and line ending
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7ce45ea1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7ce45ea1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7ce45ea1
Branch: refs/heads/cisco-vnmc-api-integration
Commit: 7ce45ea1087407b87ff14d0f9ae5a7647c3f3ccc
Parents: 0232048
Author: Koushik Das <ko...@citrix.com>
Authored: Mon Apr 15 18:36:33 2013 +0530
Committer: Koushik Das <ko...@citrix.com>
Committed: Mon Apr 15 18:36:33 2013 +0530
----------------------------------------------------------------------
test/integration/component/test_asa1000v_fw.py | 267 ++++++++++---------
tools/marvin/marvin/integration/lib/base.py | 3 +-
2 files changed, 135 insertions(+), 135 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ce45ea1/test/integration/component/test_asa1000v_fw.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_asa1000v_fw.py b/test/integration/component/test_asa1000v_fw.py
index 58a971b..0b66f97 100755
--- a/test/integration/component/test_asa1000v_fw.py
+++ b/test/integration/component/test_asa1000v_fw.py
@@ -1,133 +1,134 @@
-# 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.
-
-""" Cisco ASA1000v external firewall
-"""
-#Import Local Modules
-import marvin
-from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.integration.lib.utils import *
-from marvin.integration.lib.base import *
-from marvin.integration.lib.common import *
-from marvin.remoteSSHClient import remoteSSHClient
-import datetime
-
-
-class Services:
- """Test Cisco ASA1000v services
- """
-
- def __init__(self):
- self.services = {
- "vnmc": {
- "ipaddress": '10.147.28.236',
- "username": 'admin',
- "password": 'Password_123',
- },
- "asa": {
- "ipaddress": '10.147.28.238',
- "insideportprofile": 'asa-in123',
- },
- "network_offering": {
- "name": 'CiscoVnmc',
- "displaytext": 'CiscoVnmc',
- "guestiptype": 'Isolated',
- "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Firewall,UserData,StaticNat',
- "traffictype": 'GUEST',
- "availability": 'Optional',
- "serviceProviderList": {
- "Dhcp": 'VirtualRouter',
- "Dns": 'VirtualRouter',
- "SourceNat": 'CiscoVnmc',
- "PortForwarding": 'CiscoVnmc',
- "Firewall": 'CiscoVnmc',
- "UserData": 'VirtualRouter',
- "StaticNat": 'CiscoVnmc',
- },
- },
- "network": {
- "name": "CiscoVnmc",
- "displaytext": "CiscoVnmc",
- },
- }
-
-class TestASASetup(cloudstackTestCase):
-
- @classmethod
- def setUpClass(cls):
- cls.apiclient = super(
- TestASASetup,
- cls
- ).getClsTestClient().getApiClient()
- cls.services = Services().services
- cls.network_offering = NetworkOffering.create(
- cls.apiclient,
- cls.services["network_offering"],
- conservemode=True)
- # Enable network offering
- cls.network_offering.update(cls.apiclient, state='Enabled')
-
- cls._cleanup = [
- cls.network_offering,
- ]
- return
-
- @classmethod
- def tearDownClass(cls):
- try:
- # Cleanup
- cleanup_resources(cls.apiclient, 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.zone = get_zone(self.apiclient, self.services)
- self.physicalnetworks = PhysicalNetwork.list(self.apiclient, zoneid=self.zone.id)
- self.assertNotEqual(len(self.physicalnetworks), 0, "Check if the list physical network API returns a non-empty response")
- self.clusters = Cluster.list(self.apiclient, hypervisor='VMware')
- self.assertNotEqual(len(self.clusters), 0, "Check if the list cluster API returns a non-empty response")
- return
-
- def tearDown(self):
- try:
- self.debug("Cleaning up the resources")
- # Cleanup
- cleanup_resources(self.apiclient, self._cleanup)
- self.debug("Cleanup complete!")
- except Exception as e:
- raise Exception("Warning: Exception during cleanup : %s" % e)
- return
-
- def test_registerVnmc(self):
- Vnmc = VNMC.create(self.apiclient, self.services["vnmc"]["ipaddress"], self.services["vnmc"]["username"], self.services["vnmc"]["password"], self.physicalnetworks[0].id)
- self.debug("Cisco VNMC appliance with id %s was deployed"%(Vnmc.id))
-
- VnmcList = VNMC.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id)
- self.assertNotEqual(len(VnmcList), 0, "Check if the list VNMC API returns a non-empty response")
-
- def test_registerAsa1000v(self):
- Asa = ASA1000V.create(self.apiclient, self.services["asa"]["ipaddress"], self.services["asa"]["insideportprofile"], self.clusters[0].id, self.physicalnetworks[0].id)
- self.debug("Cisco ASA 1000v appliance with id %s was deployed"%(Asa.id))
-
- AsaList = ASA1000V.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id)
- self.assertNotEqual(len(AsaList), 0, "Check if the list ASA 1000v API returns a non-empty response")
+# 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.
+
+""" Cisco ASA1000v external firewall
+"""
+#Import Local Modules
+import marvin
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.integration.lib.utils import *
+from marvin.integration.lib.base import *
+from marvin.integration.lib.common import *
+from marvin.remoteSSHClient import remoteSSHClient
+import datetime
+
+
+class Services:
+ """Test Cisco ASA1000v services
+ """
+
+ def __init__(self):
+ self.services = {
+ "vnmc": {
+ "ipaddress": '10.147.28.236',
+ "username": 'admin',
+ "password": 'Password_123',
+ },
+ "asa": {
+ "ipaddress": '10.147.28.238',
+ "insideportprofile": 'asa-in123',
+ },
+ "network_offering": {
+ "name": 'CiscoVnmc',
+ "displaytext": 'CiscoVnmc',
+ "guestiptype": 'Isolated',
+ "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Firewall,UserData,StaticNat',
+ "traffictype": 'GUEST',
+ "availability": 'Optional',
+ "serviceProviderList": {
+ "Dhcp": 'VirtualRouter',
+ "Dns": 'VirtualRouter',
+ "SourceNat": 'CiscoVnmc',
+ "PortForwarding": 'CiscoVnmc',
+ "Firewall": 'CiscoVnmc',
+ "UserData": 'VirtualRouter',
+ "StaticNat": 'CiscoVnmc',
+ },
+ },
+ "network": {
+ "name": "CiscoVnmc",
+ "displaytext": "CiscoVnmc",
+ },
+ }
+
+class TestASASetup(cloudstackTestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.apiclient = super(
+ TestASASetup,
+ cls
+ ).getClsTestClient().getApiClient()
+ cls.services = Services().services
+ cls.network_offering = NetworkOffering.create(
+ cls.apiclient,
+ cls.services["network_offering"],
+ conservemode=True)
+ # Enable network offering
+ cls.network_offering.update(cls.apiclient, state='Enabled')
+
+ cls._cleanup = [
+ cls.network_offering,
+ ]
+ return
+
+ @classmethod
+ def tearDownClass(cls):
+ try:
+ # Cleanup
+ cleanup_resources(cls.apiclient, 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.zone = get_zone(self.apiclient, self.services)
+ self.physicalnetworks = PhysicalNetwork.list(self.apiclient, zoneid=self.zone.id)
+ self.assertNotEqual(len(self.physicalnetworks), 0, "Check if the list physical network API returns a non-empty response")
+ self.clusters = Cluster.list(self.apiclient, hypervisor='VMware')
+ self.assertNotEqual(len(self.clusters), 0, "Check if the list cluster API returns a non-empty response")
+
+ return
+
+ def tearDown(self):
+ try:
+ self.debug("Cleaning up the resources")
+ # Cleanup
+ cleanup_resources(self.apiclient, self._cleanup)
+ self.debug("Cleanup complete!")
+ except Exception as e:
+ raise Exception("Warning: Exception during cleanup : %s" % e)
+ return
+
+ def test_registerVnmc(self):
+ Vnmc = VNMC.create(self.apiclient, self.services["vnmc"]["ipaddress"], self.services["vnmc"]["username"], self.services["vnmc"]["password"], self.physicalnetworks[0].id)
+ self.debug("Cisco VNMC appliance with id %s deployed"%(Vnmc.id))
+ VnmcList = VNMC.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id)
+ self.assertNotEqual(len(VnmcList), 0, "List VNMC API returned an empty response")
+ Vnmc.delete(self.apiclient)
+
+ def test_registerAsa1000v(self):
+ Asa = ASA1000V.create(self.apiclient, self.services["asa"]["ipaddress"], self.services["asa"]["insideportprofile"], self.clusters[0].id, self.physicalnetworks[0].id)
+ self.debug("Cisco ASA 1000v appliance with id %s deployed"%(Asa.id))
+ AsaList = ASA1000V.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id)
+ self.assertNotEqual(len(AsaList), 0, "List ASA 1000v API returned an empty response")
+ Asa.delete(self.apiclient)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ce45ea1/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index f3959b0..0185c87 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -2449,7 +2449,7 @@ class AffinityGroup:
self.__dict__.update(items)
@classmethod
- def create(cls, apiclient, services, account=None, domainid=None):
+ def create(cls, apiclient, services, account=None, domainid=None):
agCmd = createAffinityGroup.createAffinityGroupCmd()
agCmd.name = services['name']
agCmd.displayText = services['displaytext'] if 'displaytext' in services else services['name']
@@ -2466,7 +2466,6 @@ class AffinityGroup:
cmd.id = self.id
return apiclient.deleteVPC(cmd)
-
@classmethod
def list(cls, apiclient, **kwargs):
cmd = listAffinityGroups.listAffinityGroupsCmd()