mirror of https://github.com/apache/cloudstack.git
1. More fixes for smoke and component tests
2. Removed test_data.cfg file
3. Fixes to marvin libraries
(cherry picked from commit 9bba24812e)
This commit is contained in:
parent
4a99cf8519
commit
ee9613b650
|
|
@ -150,7 +150,7 @@ class TestBasicOperations(cloudstackTestCase):
|
|||
cls.services["shared_network_offering_all_services"])
|
||||
cls._cleanup.append(cls.shared_network_offering)
|
||||
cls.mode = cls.zone.networktype
|
||||
if cls.mode == "advanced":
|
||||
if cls.mode.lower() == "advanced":
|
||||
cls.isolated_network_offering = CreateEnabledNetworkOffering(cls.api_client,
|
||||
cls.services["isolated_network_offering"])
|
||||
cls._cleanup.append(cls.isolated_network_offering)
|
||||
|
|
@ -501,7 +501,7 @@ class TestNetworkRules(cloudstackTestCase):
|
|||
cls.services["shared_network_offering_all_services"])
|
||||
cls._cleanup.append(cls.shared_network_offering)
|
||||
cls.mode = cls.zone.networktype
|
||||
if cls.mode == "advanced":
|
||||
if cls.mode.lower() == "advanced":
|
||||
cls.isolated_network_offering = CreateEnabledNetworkOffering(cls.api_client, cls.services["isolated_network_offering"])
|
||||
cls._cleanup.append(cls.isolated_network_offering)
|
||||
cls.isolated_network_offering_vpc = CreateEnabledNetworkOffering(cls.api_client, cls.services["nw_offering_isolated_vpc"])
|
||||
|
|
@ -876,7 +876,7 @@ class TestVmNetworkOperations(cloudstackTestCase):
|
|||
cls.services["shared_network_offering_all_services"])
|
||||
cls._cleanup.append(cls.shared_network_offering)
|
||||
cls.mode = cls.zone.networktype
|
||||
if cls.mode == "advanced":
|
||||
if cls.mode.lower() == "advanced":
|
||||
cls.isolated_network_offering = CreateEnabledNetworkOffering(cls.api_client, cls.services["isolated_network_offering"])
|
||||
cls._cleanup.append(cls.isolated_network_offering)
|
||||
cls.isolated_network_offering_vpc = CreateEnabledNetworkOffering(cls.api_client, cls.services["nw_offering_isolated_vpc"])
|
||||
|
|
|
|||
|
|
@ -122,7 +122,8 @@ class TestDeployVM(cloudstackTestCase):
|
|||
domainid=self.account.domainid,
|
||||
serviceofferingid=self.service_offering.id,
|
||||
templateid=self.template.id,
|
||||
rootdisksize=newrootsize
|
||||
rootdisksize=newrootsize,
|
||||
hypervisor=self.hypervisor
|
||||
)
|
||||
|
||||
list_vms = VirtualMachine.list(self.apiclient, id=self.virtual_machine.id)
|
||||
|
|
@ -192,7 +193,8 @@ class TestDeployVM(cloudstackTestCase):
|
|||
domainid=self.account.domainid,
|
||||
serviceofferingid=self.service_offering.id,
|
||||
templateid=self.template.id,
|
||||
rootdisksize=newrootsize
|
||||
rootdisksize=newrootsize,
|
||||
hypervisor=self.hypervisor
|
||||
)
|
||||
except Exception as ex:
|
||||
if "Hypervisor XenServer does not support rootdisksize override" in str(ex):
|
||||
|
|
@ -218,7 +220,8 @@ class TestDeployVM(cloudstackTestCase):
|
|||
domainid=self.account.domainid,
|
||||
serviceofferingid=self.service_offering.id,
|
||||
templateid=self.template.id,
|
||||
rootdisksize=newrootsize
|
||||
rootdisksize=newrootsize,
|
||||
hypervisor=self.hypervisor
|
||||
)
|
||||
except Exception as ex:
|
||||
if "rootdisk size should be a non zero number" in str(ex):
|
||||
|
|
@ -249,7 +252,8 @@ class TestDeployVM(cloudstackTestCase):
|
|||
domainid=self.account.domainid,
|
||||
serviceofferingid=self.service_offering.id,
|
||||
templateid=self.template.id,
|
||||
rootdisksize=newrootsize
|
||||
rootdisksize=newrootsize,
|
||||
hypervisor=self.hypervisor
|
||||
)
|
||||
except Exception as ex:
|
||||
if "rootdisksize override is smaller than template size" in str(ex):
|
||||
|
|
|
|||
|
|
@ -340,18 +340,6 @@ class TestISO(cloudstackTestCase):
|
|||
cmd.mode = self.services["iso2"]["mode"]
|
||||
cmd.zoneid = self.services["iso2"]["zoneid"]
|
||||
list_extract_response = self.apiclient.extractIso(cmd)
|
||||
|
||||
try:
|
||||
#Format URL to ASCII to retrieve response code
|
||||
formatted_url = urllib.unquote_plus(list_extract_response.url)
|
||||
url_response = urllib.urlopen(formatted_url)
|
||||
response_code = url_response.getcode()
|
||||
except Exception:
|
||||
self.fail(
|
||||
"Extract ISO Failed with invalid URL %s (ISO id: %s)" \
|
||||
% (formatted_url, self.iso_2.id)
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
list_extract_response.id,
|
||||
self.iso_2.id,
|
||||
|
|
@ -367,6 +355,18 @@ class TestISO(cloudstackTestCase):
|
|||
self.services["iso2"]["zoneid"],
|
||||
"Check zone ID of extraction"
|
||||
)
|
||||
|
||||
try:
|
||||
#Format URL to ASCII to retrieve response code
|
||||
formatted_url = urllib.unquote_plus(list_extract_response.url)
|
||||
url_response = urllib.urlopen(formatted_url)
|
||||
response_code = url_response.getcode()
|
||||
except Exception:
|
||||
self.fail(
|
||||
"Extract ISO Failed with invalid URL %s (ISO id: %s)" \
|
||||
% (formatted_url, self.iso_2.id)
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
response_code,
|
||||
200,
|
||||
|
|
|
|||
|
|
@ -633,7 +633,8 @@ class TestRebootRouter(cloudstackTestCase):
|
|||
routers = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(routers, list),
|
||||
|
|
@ -949,7 +950,8 @@ class TestDeleteAccount(cloudstackTestCase):
|
|||
routers = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
routers,
|
||||
|
|
|
|||
|
|
@ -111,13 +111,14 @@ class TestRouterServices(cloudstackTestCase):
|
|||
if self.zone.networktype == "Basic":
|
||||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
listall="true"
|
||||
listall=True
|
||||
)
|
||||
else:
|
||||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -196,7 +197,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -303,7 +305,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -351,7 +354,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -413,7 +417,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -495,7 +500,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -561,7 +567,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -642,7 +649,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -659,7 +667,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
#List routers to check state of router
|
||||
router_response = list_routers(
|
||||
self.apiclient,
|
||||
id=router.id
|
||||
id=router.id,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(router_response, list),
|
||||
|
|
@ -685,7 +694,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -704,7 +714,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
#List routers to check state of router
|
||||
router_response = list_routers(
|
||||
self.apiclient,
|
||||
id=router.id
|
||||
id=router.id,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(router_response, list),
|
||||
|
|
@ -737,7 +748,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
list_router_response = list_routers(
|
||||
self.apiclient,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
domainid=self.account.domainid,
|
||||
listall=True
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_router_response, list),
|
||||
|
|
@ -759,7 +771,8 @@ class TestRouterServices(cloudstackTestCase):
|
|||
while retries_cnt >= 0:
|
||||
router_response = list_routers(
|
||||
self.apiclient,
|
||||
id=router.id
|
||||
id=router.id,
|
||||
listall=True
|
||||
)
|
||||
if self.verifyRouterResponse(router_response,public_ip):
|
||||
self.debug("Router is running successfully after reboot")
|
||||
|
|
|
|||
|
|
@ -159,7 +159,8 @@ class TestDeployVM(cloudstackTestCase):
|
|||
3. Has a linklocalip, publicip and a guestip
|
||||
@return:
|
||||
"""
|
||||
routers = list_routers(self.apiclient, account=self.account.name)
|
||||
routers = list_routers(self.apiclient, account=self.account.name,
|
||||
listall=True)
|
||||
self.assertTrue(len(routers) > 0, msg = "No virtual router found")
|
||||
router = routers[0]
|
||||
|
||||
|
|
@ -181,7 +182,8 @@ class TestDeployVM(cloudstackTestCase):
|
|||
2. is in the account the VM was deployed in
|
||||
@return:
|
||||
"""
|
||||
routers = list_routers(self.apiclient, account=self.account.name)
|
||||
routers = list_routers(self.apiclient, account=self.account.name,
|
||||
listall=True)
|
||||
self.assertTrue(len(routers) > 0, msg = "No virtual router found")
|
||||
router = routers[0]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,427 +0,0 @@
|
|||
# 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.
|
||||
|
||||
{
|
||||
"region": {
|
||||
"regionid": "2",
|
||||
"regionname": "Region2",
|
||||
"regionendpoint": "http://region2:8080/client"
|
||||
},
|
||||
"zone": "NA",
|
||||
|
||||
"domain": { "name": "domain" },
|
||||
|
||||
"project": {
|
||||
"name": "Project",
|
||||
"displaytext": "Test project"
|
||||
},
|
||||
"account": {
|
||||
"email": "test-account@test.com",
|
||||
"firstname": "test",
|
||||
"lastname": "test",
|
||||
"username": "test-account",
|
||||
"password": "password"
|
||||
},
|
||||
"small": {
|
||||
"displayname": "testserver",
|
||||
"username": "root",
|
||||
"password": "password",
|
||||
"ssh_port": 22,
|
||||
"hypervisor": "XenServer",
|
||||
"privateport": 22,
|
||||
"publicport": 22,
|
||||
"protocol": 'TCP',
|
||||
},
|
||||
"medium": {
|
||||
"displayname": "testserver",
|
||||
"username": "root",
|
||||
"password": "password",
|
||||
"ssh_port": 22,
|
||||
"hypervisor": 'XenServer',
|
||||
"privateport": 22,
|
||||
"publicport": 22,
|
||||
"protocol": 'TCP',
|
||||
},
|
||||
"service_offerings": {
|
||||
"name": "Tiny Instance",
|
||||
"displaytext": "Tiny Instance",
|
||||
"cpunumber": 1,
|
||||
"cpuspeed": 100,
|
||||
"memory": 128,
|
||||
|
||||
"tiny": {
|
||||
"name": "Tiny Instance",
|
||||
"displaytext": "Tiny Instance",
|
||||
"cpunumber": 1,
|
||||
"cpuspeed": 100,
|
||||
"memory": 128,
|
||||
},
|
||||
"small": {
|
||||
"name": "Small Instance",
|
||||
"displaytext": "Small Instance",
|
||||
"cpunumber": 1,
|
||||
"cpuspeed": 100,
|
||||
"memory": 256
|
||||
},
|
||||
"medium": {
|
||||
"name": "Medium Instance",
|
||||
"displaytext": "Medium Instance",
|
||||
"cpunumber": 1,
|
||||
"cpuspeed": 100,
|
||||
"memory": 256,
|
||||
},
|
||||
"big": {
|
||||
"name": "BigInstance",
|
||||
"displaytext": "BigInstance",
|
||||
"cpunumber": 1,
|
||||
"cpuspeed": 100,
|
||||
"memory": 512,
|
||||
}
|
||||
},
|
||||
"disk_offering": {
|
||||
"name": "Disk offering",
|
||||
"displaytext": "Disk offering",
|
||||
"disksize": 1
|
||||
},
|
||||
'resized_disk_offering': {
|
||||
"displaytext": "Resized",
|
||||
"name": "Resized",
|
||||
"disksize": 3
|
||||
},
|
||||
"network": {
|
||||
"name": "Test Network",
|
||||
"displaytext": "Test Network",
|
||||
"acltype": "Account",
|
||||
},
|
||||
"network2": {
|
||||
"name": "Test Network Shared",
|
||||
"displaytext": "Test Network Shared",
|
||||
"vlan" :1201,
|
||||
"gateway" :"172.16.15.1",
|
||||
"netmask" :"255.255.255.0",
|
||||
"startip" :"172.16.15.21",
|
||||
"endip" :"172.16.15.41",
|
||||
"acltype": "Account",
|
||||
},
|
||||
"network_offering": {
|
||||
"name": 'Test Network offering',
|
||||
"displaytext": 'Test Network offering',
|
||||
"guestiptype": 'Isolated',
|
||||
"supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding',
|
||||
"traffictype": 'GUEST',
|
||||
"availability": 'Optional',
|
||||
"serviceProviderList" : {
|
||||
"Dhcp": 'VirtualRouter',
|
||||
"Dns": 'VirtualRouter',
|
||||
"SourceNat": 'VirtualRouter',
|
||||
"PortForwarding": 'VirtualRouter',
|
||||
},
|
||||
},
|
||||
"isolated_network_offering": {
|
||||
"name": "Network offering-DA services",
|
||||
"displaytext": "Network offering-DA services",
|
||||
"guestiptype": "Isolated",
|
||||
"supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat",
|
||||
"traffictype": "GUEST",
|
||||
"availability": "Optional'",
|
||||
"serviceProviderList": {
|
||||
"Dhcp": "VirtualRouter",
|
||||
"Dns": "VirtualRouter",
|
||||
"SourceNat": "VirtualRouter",
|
||||
"PortForwarding": "VirtualRouter",
|
||||
"Vpn": "VirtualRouter",
|
||||
"Firewall": "VirtualRouter",
|
||||
"Lb": "VirtualRouter",
|
||||
"UserData": "VirtualRouter",
|
||||
"StaticNat": "VirtualRouter"
|
||||
}
|
||||
},
|
||||
"isolated_network": {
|
||||
"name": "Isolated Network",
|
||||
"displaytext": "Isolated Network"
|
||||
},
|
||||
"virtual_machine": {
|
||||
"displayname": "Test VM",
|
||||
"username": "root",
|
||||
"password": "password",
|
||||
"ssh_port": 22,
|
||||
"privateport": 22,
|
||||
"publicport": 22,
|
||||
"protocol": "TCP",
|
||||
"affinity": {
|
||||
"name": "webvms",
|
||||
"type": "host anti-affinity",
|
||||
},
|
||||
},
|
||||
"server_without_disk": {
|
||||
"displayname": "Test VM-No Disk",
|
||||
"username": "root",
|
||||
"password": "password",
|
||||
"ssh_port": 22,
|
||||
"hypervisor": 'XenServer',
|
||||
"privateport": 22,
|
||||
"publicport": 22,
|
||||
"protocol": 'TCP',
|
||||
},
|
||||
"shared_network": {
|
||||
"name": "MySharedNetwork - Test",
|
||||
"displaytext": "MySharedNetwork",
|
||||
"vlan" : "",
|
||||
"gateway" :"",
|
||||
"netmask" :"",
|
||||
"startip" :"",
|
||||
"endip" :"",
|
||||
"acltype" : "Domain",
|
||||
"scope":"all"
|
||||
},
|
||||
"shared_network_offering_sg": {
|
||||
"name": "MySharedOffering-sg",
|
||||
"displaytext": "MySharedOffering-sg",
|
||||
"guestiptype": "Shared",
|
||||
"supportedservices": "Dhcp,Dns,UserData,SecurityGroup",
|
||||
"specifyVlan" : "False",
|
||||
"specifyIpRanges" : "False",
|
||||
"traffictype": "GUEST",
|
||||
"serviceProviderList" : {
|
||||
"Dhcp": "VirtualRouter",
|
||||
"Dns": "VirtualRouter",
|
||||
"UserData": "VirtualRouter",
|
||||
"SecurityGroup": "SecurityGroupProvider"
|
||||
}
|
||||
},
|
||||
"shared_network_sg": {
|
||||
"name": "Shared-Network-SG-Test",
|
||||
"displaytext": "Shared-Network_SG-Test",
|
||||
"networkofferingid":"1",
|
||||
"vlan" : "",
|
||||
"gateway" :"",
|
||||
"netmask" :"255.255.255.0",
|
||||
"startip" :"",
|
||||
"endip" :"",
|
||||
"acltype" : "Domain",
|
||||
"scope":"all"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"clusters": {
|
||||
0: {
|
||||
"clustername": "Xen Cluster",
|
||||
"clustertype": "CloudManaged",
|
||||
"hypervisor": "XenServer",
|
||||
},
|
||||
1: {
|
||||
"clustername": "KVM Cluster",
|
||||
"clustertype": "CloudManaged",
|
||||
"hypervisor": "KVM",
|
||||
},
|
||||
2: {
|
||||
"hypervisor": 'VMware',
|
||||
"clustertype": 'ExternalManaged',
|
||||
"username": 'administrator',
|
||||
"password": 'fr3sca',
|
||||
"url": 'http://192.168.100.17/CloudStack-Clogeny-Pune/Pune-1',
|
||||
"clustername": 'VMWare Cluster',
|
||||
},
|
||||
},
|
||||
"hosts": {
|
||||
"xenserver": {
|
||||
"hypervisor": 'XenServer',
|
||||
"clustertype": 'CloudManaged',
|
||||
"url": 'http://192.168.100.211',
|
||||
"username": "root",
|
||||
"password": "fr3sca",
|
||||
},
|
||||
"kvm": {
|
||||
"hypervisor": 'KVM',
|
||||
"clustertype": 'CloudManaged',
|
||||
"url": 'http://192.168.100.212',
|
||||
"username": "root",
|
||||
"password": "fr3sca",
|
||||
},
|
||||
"vmware": {
|
||||
"hypervisor": 'VMware',
|
||||
"clustertype": 'ExternalManaged',
|
||||
"url": 'http://192.168.100.203',
|
||||
"username": "administrator",
|
||||
"password": "fr3sca",
|
||||
},
|
||||
},
|
||||
"network_offering_shared": {
|
||||
"name": 'Test Network offering shared',
|
||||
"displaytext": 'Test Network offering Shared',
|
||||
"guestiptype": 'Shared',
|
||||
"supportedservices": 'Dhcp,Dns,UserData',
|
||||
"traffictype": 'GUEST',
|
||||
"specifyVlan" : "True",
|
||||
"specifyIpRanges" : "True",
|
||||
"serviceProviderList" : {
|
||||
"Dhcp": 'VirtualRouter',
|
||||
"Dns": 'VirtualRouter',
|
||||
"UserData": 'VirtualRouter',
|
||||
},
|
||||
},
|
||||
"network_offering_internal_lb": {
|
||||
"name": "Network offering for internal lb service",
|
||||
"displaytext": "Network offering for internal lb service",
|
||||
"guestiptype": "Isolated",
|
||||
"traffictype": "Guest",
|
||||
"supportedservices": "Vpn,Dhcp,Dns,Lb,UserData,SourceNat,StaticNat,PortForwarding,NetworkACL",
|
||||
"serviceProviderList": {
|
||||
"Dhcp": "VpcVirtualRouter",
|
||||
"Dns": "VpcVirtualRouter",
|
||||
"Vpn": "VpcVirtualRouter",
|
||||
"UserData": "VpcVirtualRouter",
|
||||
"Lb": "InternalLbVM",
|
||||
"SourceNat": "VpcVirtualRouter",
|
||||
"StaticNat": "VpcVirtualRouter",
|
||||
"PortForwarding": "VpcVirtualRouter",
|
||||
"NetworkACL": "VpcVirtualRouter",
|
||||
},
|
||||
"serviceCapabilityList": {
|
||||
"SourceNat": {"SupportedSourceNatTypes": "peraccount"},
|
||||
"Lb": {"lbSchemes": "internal", "SupportedLbIsolation": "dedicated"}
|
||||
}
|
||||
},
|
||||
|
||||
"natrule": {
|
||||
"privateport": 22,
|
||||
"publicport": 2222,
|
||||
"protocol": "TCP"
|
||||
},
|
||||
"lbrule": {
|
||||
"name": "SSH",
|
||||
"alg": "roundrobin",
|
||||
"privateport": 22,
|
||||
"publicport": 2222,
|
||||
"protocol": 'TCP'
|
||||
},
|
||||
|
||||
"iso1": {
|
||||
"displaytext": "Test ISO 1",
|
||||
"name": "ISO 1",
|
||||
"url": "http://people.apache.org/~tsp/dummy.iso",
|
||||
"isextractable": True,
|
||||
"isfeatured": True,
|
||||
"ispublic": True,
|
||||
"ostype": "CentOS 5.3 (64-bit)",
|
||||
},
|
||||
"iso2": {
|
||||
"displaytext": "Test ISO 2",
|
||||
"name": "ISO 2",
|
||||
"url": "http://people.apache.org/~tsp/dummy.iso",
|
||||
"isextractable": True,
|
||||
"isfeatured": True,
|
||||
"ispublic": True,
|
||||
"ostype": "CentOS 5.3 (64-bit)",
|
||||
"mode": 'HTTP_DOWNLOAD',
|
||||
},
|
||||
"isfeatured": True,
|
||||
"ispublic": True,
|
||||
"isextractable": True,
|
||||
"bootable": True,
|
||||
"passwordenabled": True,
|
||||
|
||||
"template": {
|
||||
"displaytext": "xs",
|
||||
"name": "xs",
|
||||
"passwordenabled": False,
|
||||
},
|
||||
"template_2": {
|
||||
"displaytext": "Public Template",
|
||||
"name": "Public template",
|
||||
"ostype": "CentOS 5.3 (64-bit)",
|
||||
"isfeatured": True,
|
||||
"ispublic": True,
|
||||
"isextractable": True,
|
||||
"mode": "HTTP_DOWNLOAD",
|
||||
},
|
||||
"templatefilter": 'self',
|
||||
|
||||
"security_group" : { "name": "custom_Sec_Grp" },
|
||||
"ingress_rule": {
|
||||
"protocol": "TCP",
|
||||
"startport": "22",
|
||||
"endport": "22",
|
||||
"cidrlist": "0.0.0.0/0"
|
||||
},
|
||||
"ostype": "CentOS 5.3 (64-bit)",
|
||||
"sleep": 90,
|
||||
"timeout": 10,
|
||||
"advanced_sg": {
|
||||
"zone": {
|
||||
"name": "",
|
||||
"dns1": "8.8.8.8",
|
||||
"internaldns1": "192.168.100.1",
|
||||
"networktype": "Advanced",
|
||||
"securitygroupenabled": "true"
|
||||
},
|
||||
"securitygroupenabled": "true"
|
||||
},
|
||||
"vlan": {
|
||||
"part": ["4090-4091", "4092-4095"],
|
||||
"full": "4090-4095",
|
||||
},
|
||||
"nfs": {
|
||||
"url": "nfs://10.147.28.7/export/home/talluri/testprimary",
|
||||
"name": "Primary XEN"
|
||||
},
|
||||
"iscsi": {
|
||||
"url": "iscsi://192.168.100.21/iqn.2012-01.localdomain.clo-cstack-cos6:iser/1",
|
||||
"name": "Primary iSCSI"
|
||||
},
|
||||
"volume": {"diskname": "Test Volume"},
|
||||
"volume_offerings": {
|
||||
0: {"diskname": "TestDiskServ"},
|
||||
},
|
||||
"diskdevice": ['/dev/vdc', '/dev/vdb', '/dev/hdb', '/dev/hdc', '/dev/xvdd', '/dev/cdrom', '/dev/sr0', '/dev/cdrom1' ],
|
||||
|
||||
#test_vpc_vpn.py
|
||||
"vpn_user": {
|
||||
"username": "test",
|
||||
"password": "password",
|
||||
},
|
||||
"vpc": {
|
||||
"name": "vpc_vpn",
|
||||
"displaytext": "vpc-vpn",
|
||||
"cidr": "10.1.1.0/24"
|
||||
},
|
||||
"ntwk": {
|
||||
"name": "tier1",
|
||||
"displaytext": "vpc-tier1",
|
||||
"gateway" : "10.1.1.1",
|
||||
"netmask" : "255.255.255.192"
|
||||
},
|
||||
"vpc2": {
|
||||
"name": "vpc2_vpn",
|
||||
"displaytext": "vpc2-vpn",
|
||||
"cidr": "10.2.1.0/24"
|
||||
},
|
||||
"ntwk2": {
|
||||
"name": "tier2",
|
||||
"displaytext": "vpc-tier2",
|
||||
"gateway" : "10.2.1.1",
|
||||
"netmask" : "255.255.255.192"
|
||||
}
|
||||
}
|
||||
|
|
@ -27,6 +27,7 @@ test_data = {
|
|||
"vdomain": {
|
||||
"name": "domain"
|
||||
},
|
||||
"domain": { "name": "domain" },
|
||||
"email": "test@test.com",
|
||||
"gateway": "172.1.1.1",
|
||||
"netmask": "255.255.255.0",
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ class VirtualMachine:
|
|||
projectid=None, startvm=None, diskofferingid=None,
|
||||
affinitygroupnames=None, affinitygroupids=None, group=None,
|
||||
hostid=None, keypair=None, ipaddress=None, mode='default',
|
||||
method='GET', hypervisor=None, customcpunumber=None,
|
||||
method='GET', hypervisor="XenServer", customcpunumber=None,
|
||||
customcpuspeed=None, custommemory=None, rootdisksize=None):
|
||||
"""Create the instance"""
|
||||
|
||||
|
|
|
|||
|
|
@ -366,7 +366,7 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid):
|
|||
)
|
||||
cmds = [
|
||||
"mkdir -p %s /mnt/tmp",
|
||||
"mount -t %s %s%s /mnt/tmp" % (
|
||||
"mount -t %s %s:%s /mnt/tmp" % (
|
||||
'nfs',
|
||||
host,
|
||||
path,
|
||||
|
|
|
|||
Loading…
Reference in New Issue