adding isolation methods l3/vlan/gre

also some defaults for factories:
cluster, domain, user, vpn, zone

Signed-off-by: Prasanna Santhanam <[email protected]>


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

Branch: refs/heads/marvin_refactor
Commit: 284581fe42f79f1b2d16514ac98ce745f306d871
Parents: fa9b387
Author: Prasanna Santhanam <[email protected]>
Authored: Tue Apr 16 21:56:20 2013 +0530
Committer: Prasanna Santhanam <[email protected]>
Committed: Tue Apr 16 21:58:21 2013 +0530

----------------------------------------------------------------------
 setup/dev/advanced.cfg                             |    3 +
 setup/dev/basic.cfg                                |    3 +
 tools/marvin/marvin/cloudstackConnection.py        |   20 +++---
 tools/marvin/marvin/configGenerator.py             |    1 +
 tools/marvin/marvin/deployDataCenter.py            |    1 +
 .../integration/lib/factory/ClusterFactory.py      |   25 ++++----
 .../integration/lib/factory/DomainFactory.py       |    2 +-
 .../marvin/integration/lib/factory/UserFactory.py  |   21 ++++--
 .../integration/lib/factory/VpnUserFactory.py      |   22 ++++++-
 .../marvin/integration/lib/factory/ZoneFactory.py  |   18 ++++-
 .../integration/lib/factory/test/testFactories.py  |   21 ++++++-
 tools/marvin/marvin/jsonHelper.py                  |   51 ++++++---------
 .../marvin/marvin/sandbox/advanced/advanced_env.py |    3 +
 tools/marvin/marvin/sandbox/basic/basic_env.py     |    1 +
 .../sandbox/demo/simulator/simulator_setup.py      |    1 +
 15 files changed, 123 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/setup/dev/advanced.cfg
----------------------------------------------------------------------
diff --git a/setup/dev/advanced.cfg b/setup/dev/advanced.cfg
index c031c2a..d1d276c 100644
--- a/setup/dev/advanced.cfg
+++ b/setup/dev/advanced.cfg
@@ -46,6 +46,9 @@
                             "broadcastdomainrange": "ZONE",
                             "name": "VpcVirtualRouter"
                         }
+                    ],  
+                    "isolationmethods": [
+                        "VLAN"
                     ]
                 }
             ],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/setup/dev/basic.cfg
----------------------------------------------------------------------
diff --git a/setup/dev/basic.cfg b/setup/dev/basic.cfg
index 3f56a3c..1cb7282 100644
--- a/setup/dev/basic.cfg
+++ b/setup/dev/basic.cfg
@@ -42,6 +42,9 @@
                             "broadcastdomainrange": "Pod",
                             "name": "SecurityGroupProvider"
                         }
+                    ],  
+                    "isolationmethods": [
+                        "L3"
                     ]
                 }
             ],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/cloudstackConnection.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackConnection.py 
b/tools/marvin/marvin/cloudstackConnection.py
index 1caeef3..03bc180 100644
--- a/tools/marvin/marvin/cloudstackConnection.py
+++ b/tools/marvin/marvin/cloudstackConnection.py
@@ -118,12 +118,14 @@ class cloudConnection(object):
         timeout = self.asyncTimeout
         
         while timeout > 0:
-            asyncResonse = self.make_request(cmd, response, True)
-            
-            if asyncResonse.jobstatus == 2:
-                raise cloudstackException.cloudstackAPIException("asyncquery", 
asyncResonse.jobresult)
-            elif asyncResonse.jobstatus == 1:
-                return asyncResonse
+            asyncResponse = self.make_request(cmd, response, True)
+            if not hasattr(asyncResponse, "jobstatus"):
+                return asyncResponse
+
+            if asyncResponse.jobstatus == 2:
+                raise cloudstackException.cloudstackAPIException("asyncquery", 
asyncResponse.jobresult)
+            elif asyncResponse.jobstatus == 1:
+                return asyncResponse
             
             time.sleep(5)
             if self.logging is not None:
@@ -182,10 +184,10 @@ class cloudConnection(object):
         if raw or isAsync == "false":
             return result
         else:
-            asynJobId = result.jobid
-            result = self.pollAsyncJob(asynJobId, response)
+            asyncJobId = result.jobid
+            result = self.pollAsyncJob(asyncJobId, response)
             return result.jobresult
-        
+
 if __name__ == '__main__':
     xml = '<?xml version="1.0" 
encoding="ISO-8859-1"?><deployVirtualMachineResponse><virtualmachine><id>407</id><name>i-1-407-RS3</name><displayname>i-1-407-RS3</displayname><account>system</account><domainid>1</domainid><domain>ROOT</domain><created>2011-07-30T14:45:19-0700</created><state>Running</state><haenable>false</haenable><zoneid>1</zoneid><zonename>CA1</zonename><hostid>3</hostid><hostname>kvm-50-205</hostname><templateid>4</templateid><templatename>CentOS
 5.5(64-bit) no GUI (KVM)</templatename><templatedisplaytext>CentOS 5.5(64-bit) 
no GUI 
(KVM)</templatedisplaytext><passwordenabled>false</passwordenabled><serviceofferingid>1</serviceofferingid><serviceofferingname>Small
 
Instance</serviceofferingname><cpunumber>1</cpunumber><cpuspeed>500</cpuspeed><memory>512</memory><guestosid>112</guestosid><rootdeviceid>0</rootdeviceid><rootdevicetype>NetworkFilesystem</rootdevicetype><nic><id>380</id><networkid>203</networkid><netmask>255.255.255.0</netmask><gateway>65.19.181.1</gatew
 
ay><ipaddress>65.19.181.110</ipaddress><isolationuri>vlan://65</isolationuri><broadcasturi>vlan://65</broadcasturi><traffictype>Guest</traffictype><type>Direct</type><isdefault>true</isdefault><macaddress>06:52:da:00:00:08</macaddress></nic><hypervisor>KVM</hypervisor></virtualmachine></deployVirtualMachineResponse>'
     conn = cloudConnection(None)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/configGenerator.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/configGenerator.py 
b/tools/marvin/marvin/configGenerator.py
index e2a6a24..4e82bbe 100644
--- a/tools/marvin/marvin/configGenerator.py
+++ b/tools/marvin/marvin/configGenerator.py
@@ -133,6 +133,7 @@ class physical_network():
         self.traffictypes = []
         self.broadcastdomainrange = 'Zone'
         self.vlan = None
+        self.isolationmethods = []
         '''enable default virtual router provider'''
         vrouter = provider()
         vrouter.name = 'VirtualRouter'

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/deployDataCenter.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/deployDataCenter.py 
b/tools/marvin/marvin/deployDataCenter.py
index 2e270a7..ad11a40 100644
--- a/tools/marvin/marvin/deployDataCenter.py
+++ b/tools/marvin/marvin/deployDataCenter.py
@@ -169,6 +169,7 @@ class deployDataCenters():
         phynet = createPhysicalNetwork.createPhysicalNetworkCmd()
         phynet.zoneid = zoneid
         phynet.name = net.name
+        phynet.isolationmethods = net.isolationmethods
         phynetwrk = self.apiClient.createPhysicalNetwork(phynet)
         self.addTrafficTypes(phynetwrk.id, net.traffictypes)
         return phynetwrk

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/integration/lib/factory/ClusterFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/ClusterFactory.py 
b/tools/marvin/marvin/integration/lib/factory/ClusterFactory.py
index eaf7daa..e8e2e22 100644
--- a/tools/marvin/marvin/integration/lib/factory/ClusterFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/ClusterFactory.py
@@ -1,6 +1,9 @@
 import factory
 from marvin.integration.lib.base import Cluster
-class ClusterFactory(factory.Factory):
+from marvin.integration.lib.factory.CloudStackBaseFactory import 
CloudStackBaseFactory
+from marvin.integration.lib.utils import random_gen
+
+class ClusterFactory(CloudStackBaseFactory):
 
     FACTORY_FOR = Cluster
 
@@ -10,16 +13,12 @@ class ClusterFactory(factory.Factory):
     podid = None
     zoneid = None
 
+class XenClusterFactory(ClusterFactory):
+    clustername = factory.Sequence(lambda n: "xencluster" + random_gen())
+    clustertype = "XenServer"
+    hypervisor = "XenServer"
 
-    FACTORY_FOR = Cluster
-
-
-
-    FACTORY_FOR = Cluster
-
-    id = None
-
-
-    FACTORY_FOR = Cluster
-
-    id = None
+class KvmClusterFactory(ClusterFactory):
+    clustername = factory.Sequence(lambda n: "kvmcluster" + random_gen())
+    clustertype = "KVM"
+    hypervisor = "KVM"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/integration/lib/factory/DomainFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/DomainFactory.py 
b/tools/marvin/marvin/integration/lib/factory/DomainFactory.py
index 1c51170..337f9f2 100644
--- a/tools/marvin/marvin/integration/lib/factory/DomainFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/DomainFactory.py
@@ -21,4 +21,4 @@ class DomainFactory(factory.Factory):
 
     FACTORY_FOR = Domain
 
-    name = "Domain" + factory.Sequence(lambda n : random_gen())
+    name = factory.Sequence(lambda n : "Domain" + random_gen())

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/integration/lib/factory/UserFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/UserFactory.py 
b/tools/marvin/marvin/integration/lib/factory/UserFactory.py
index eb2cafb..9f0cc77 100644
--- a/tools/marvin/marvin/integration/lib/factory/UserFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/UserFactory.py
@@ -16,14 +16,19 @@
 # under the License.
 import factory
 from marvin.integration.lib.base import User
+from marvin.integration.lib.factory import CloudStackBaseFactory
+from marvin.integration.lib.factory.AccountFactory import AccountFactory
 
-class UserFactory(factory.Factory):
+class UserFactory(CloudStackBaseFactory):
 
-    FACTORY_FOR = User
+    FACTORY_FOR = User.User
 
-    account = None
-    email = None
-    firstname = None
-    lastname = None
-    password = None
-    username = None
+    account = factory.SubFactory(AccountFactory)
+    email = account.email
+    firstname = account.firstname
+    lastname = account.lastname
+    password = account.password
+    username = account.username
+
+class AdminUserFactory(UserFactory):
+    account = factory.SubFactory(AccountFactory, accounttype=1)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/integration/lib/factory/VpnUserFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/VpnUserFactory.py 
b/tools/marvin/marvin/integration/lib/factory/VpnUserFactory.py
index 8a7121e..8647ea9 100644
--- a/tools/marvin/marvin/integration/lib/factory/VpnUserFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/VpnUserFactory.py
@@ -1,8 +1,24 @@
+# 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.
 import factory
 from marvin.integration.lib.base import VpnUser
 class VpnUserFactory(factory.Factory):
 
-    FACTORY_FOR = VpnUser
+    FACTORY_FOR = VpnUser.VpnUser
 
-    password = None
-    username = None
+    password = "password"
+    username = "vpnuser"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py 
b/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py
index c1aa0f0..81f7576 100644
--- a/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py
+++ b/tools/marvin/marvin/integration/lib/factory/ZoneFactory.py
@@ -16,11 +16,23 @@
 # under the License.
 import factory
 from marvin.integration.lib.base import Zone
-class ZoneFactory(factory.Factory):
+from marvin.integration.lib.factory.CloudStackBaseFactory import 
CloudStackBaseFactory
+from marvin.integration.lib.utils import random_gen
+
+class ZoneFactory(CloudStackBaseFactory):
 
     FACTORY_FOR = Zone
 
-    dns1 = None
-    internaldns1 = None
+    dns1 = "8.8.8.8"
+    internaldns1 = "8.8.8.8"
     name = None
     networktype = None
+
+class AdvancedZoneFactory(ZoneFactory):
+    name = factory.Sequence(lambda n: "advzone" + random_gen())
+    networktype = "Advanced"
+
+class BasicZoneFactory(ZoneFactory):
+    name = factory.Sequence(lambda n: "basiczone" + random_gen())
+    networktype = "Basic"
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/integration/lib/factory/test/testFactories.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/factory/test/testFactories.py 
b/tools/marvin/marvin/integration/lib/factory/test/testFactories.py
index 7e682c2..c7a0a2c 100644
--- a/tools/marvin/marvin/integration/lib/factory/test/testFactories.py
+++ b/tools/marvin/marvin/integration/lib/factory/test/testFactories.py
@@ -35,6 +35,9 @@ from marvin.integration.lib.factory.TemplateFactory import *
 from marvin.integration.lib.factory.VirtualMachineFactory import *
 from marvin.integration.lib.base.VirtualMachine import VirtualMachine
 
+from marvin.integration.lib.factory.UserFactory import *
+from marvin.integration.lib.base.User import User
+
 class AccountFactoryTest(unittest.TestCase):
     def setUp(self):
         self.apiClient = 
cloudstackTestClient(mgtSvr='localhost').getApiClient()
@@ -116,4 +119,20 @@ class VirtualMachineFactoryTest(unittest.TestCase):
         template = get_template(apiclient=self.apiClient, zoneid = 
zones[0].id, ostype=tf.ostype)
         vmf = VirtualMachineFactory(serviceofferingid = sf.id, templateid = 
template.id, zoneid = zones[0].id)
 
-        vm = VirtualMachine.create(apiclient=self.apiClient, 
VirtualMachineFactory=vmf)
\ No newline at end of file
+        vm = VirtualMachine.create(apiclient=self.apiClient, 
VirtualMachineFactory=vmf)
+
+class UserFactorySubFactoryTest(unittest.TestCase):
+    def setUp(self):
+        self.apiClient = 
cloudstackTestClient(mgtSvr='localhost').getApiClient()
+
+    def tearDown(self):
+        pass
+
+    def test_userSubFactory(self):
+        uf = UserFactory()
+        account = AccountFactory.create(apiclient=self.apiClient, 
AccountFactory=uf.account)
+        self.assertTrue(account is not None, msg="no account was created")
+        users = User.list(apiclient=self.apiClient, account=account.name)
+        self.assertTrue(users is not None, msg="no users were found in the 
account")
+        self.assertTrue(len(users) > 0, msg="user list is empty")
+        self.assertEqual(users[0].username, uf.username, msg="usernames are 
not same")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/jsonHelper.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/jsonHelper.py 
b/tools/marvin/marvin/jsonHelper.py
index 1c98726..5ceeac4 100644
--- a/tools/marvin/marvin/jsonHelper.py
+++ b/tools/marvin/marvin/jsonHelper.py
@@ -16,10 +16,9 @@
 # under the License.
 
 import cloudstackException
-import json
+import simplejson as json
 import inspect
 from cloudstackAPI import *
-import pdb
 
 class jsonLoader:
     '''The recursive class for building and representing objects with.'''
@@ -89,35 +88,32 @@ def finalizeResultObj(result, responseName, responsecls):
             pass
     
     if responseName is not None and responseName == 
"queryasyncjobresultresponse" and responsecls is not None and result.jobresult 
is not None:
-        return finalizeResultObj(result.jobresult, None, responsecls)
+        result.jobresult = finalizeResultObj(result.jobresult, None, 
responsecls)
+        return result
     elif responsecls is not None:
         attr = result.__dict__.keys()[0]
         value = getattr(result, attr)
         if not isinstance(value, jsonLoader):
             return result
-        
-        findObj = False
+
+        mirrorObj = True
         for k,v in value.__dict__.iteritems():
-            if k in responsecls.__dict__:
-                findObj = True
+            if k not in responsecls.__dict__:
+                mirrorObj = False
                 break
-        if findObj:
+        if mirrorObj:
             return value
         else:
             return result
     else:
         return result
                     
-            
-        
-def getResultObj(returnObj, responsecls=None):
-    returnObj = json.loads(returnObj)
-    
-    if len(returnObj) == 0:
+def getResultObj(jsonResponse, responsecls=None):
+    objDict = json.loads(jsonResponse)
+    if len(objDict) == 0:
         return None
-    responseName = filter(lambda a: a!=u'cloudstack-version', 
returnObj.keys())[0]
-    
-    response = returnObj[responseName]
+    responseName = filter(lambda a: a!=u'cloudstack-version', 
objDict.keys())[0]
+    response = objDict[responseName]
     if len(response) == 0:
         return None
     
@@ -125,7 +121,7 @@ def getResultObj(returnObj, responsecls=None):
     if result.errorcode is not None:
         errMsg = "errorCode: %s, errorText:%s"%(result.errorcode, 
result.errortext)
         raise 
cloudstackException.cloudstackAPIException(responseName.replace("response", 
""), errMsg)
-    
+
     if result.count is not None:
         for key in result.__dict__.iterkeys():
             if key == "count":
@@ -138,17 +134,8 @@ def getResultObj(returnObj, responsecls=None):
 if __name__ == "__main__":
 
     result = '{ "listnetworkserviceprovidersresponse" : { "count":1 
,"networkserviceprovider" : [ 
{"name":"VirtualRouter","physicalnetworkid":"ad2948fc-1054-46c7-b1c7-61d990b86710","destinationphysicalnetworkid":"0","state":"Disabled","id":"d827cae4-4998-4037-95a2-55b92b6318b1","servicelist":["Vpn","Dhcp","Dns","Gateway","Firewall","Lb","SourceNat","StaticNat","PortForwarding","UserData"]}
 ] } }'
-    nsp = getResultObj(result)
-    print nsp[0].id
-
-    result = '{ "listzonesresponse" : { "count":1 ,"zone" : [  
{"id":1,"name":"test0","dns1":"8.8.8.8","dns2":"4.4.4.4","internaldns1":"192.168.110.254","internaldns2":"192.168.110.253","networktype":"Basic","securitygroupsenabled":true,"allocationstate":"Enabled","zonetoken":"5e818a11-6b00-3429-9a07-e27511d3169a","dhcpprovider":"DhcpServer"}
 ] } }'
-    zones = getResultObj(result)
-    print zones[0].id
-    res = authorizeSecurityGroupIngress.authorizeSecurityGroupIngressResponse()
-    result = '{ "queryasyncjobresultresponse" : 
{"jobid":10,"jobstatus":1,"jobprocstatus":0,"jobresultcode":0,"jobresulttype":"object","jobresult":{"securitygroup":{"id":1,"name":"default","description":"Default
 Security 
Group","account":"admin","domainid":1,"domain":"ROOT","ingressrule":[{"ruleid":1,"protocol":"tcp","startport":22,"endport":22,"securitygroupname":"default","account":"a"},{"ruleid":2,"protocol":"tcp","startport":22,"endport":22,"securitygroupname":"default","account":"b"}]}}}
 }'
-    asynJob = getResultObj(result, res)
-    print asynJob.jobid, repr(asynJob.jobresult)
-    print asynJob.jobresult.ingressrule[0].account
+    nsp = getResultObj(result, 
listNetworkServiceProviders.listNetworkServiceProvidersResponse)
+    print nsp
 
     result = '{ "queryasyncjobresultresponse" : {"errorcode" : 431, 
"errortext" : "Unable to execute API command queryasyncjobresultresponse due to 
missing parameter jobid"}  }'
     try:
@@ -164,13 +151,13 @@ if __name__ == "__main__":
     asynJob = getResultObj(result)
     print asynJob
 
-    result = '{ "createzoneresponse" :  { "zone" : 
{"id":1,"name":"test0","dns1":"8.8.8.8","dns2":"4.4.4.4","internaldns1":"192.168.110.254","internaldns2":"192.168.110.253","networktype":"Basic","securitygroupsenabled":true,"allocationstate":"Enabled","zonetoken":"3442f287-e932-3111-960b-514d1f9c4610","dhcpprovider":"DhcpServer"}
 }  }'
+    result = '{ "createzoneresponse" :  { "zone" : 
{"id":"88e796cd-953a-44b9-9445-a7c3ee205cc2","name":"Sandbox-simul","dns1":"10.147.28.6","internaldns1":"10.147.28.6","guestcidraddress":"10.1.1.0/24","networktype":"Advanced","securitygroupsenabled":false,"allocationstate":"Disabled","zonetoken":"ad051d80-17d3-35bf-bc44-77e500132a45","dhcpprovider":"VirtualRouter","localstorageenabled":false}
 }  }'
     res = createZone.createZoneResponse()
     zone = getResultObj(result, res)
     print zone.id
 
-    result = '{ "attachvolumeresponse" : {"jobid":24} }'
-    res = attachVolume.attachVolumeResponse()
+    result = '{ "queryasyncjobresultresponse" : 
{"accountid":"4a8c3cd0-a696-11e2-b7a5-1aab0c3b0463","userid":"4a8c671e-a696-11e2-b7a5-1aab0c3b0463","cmd":"org.apache.cloudstack.api.command.admin.network.CreatePhysicalNetworkCmd","jobstatus":1,"jobprocstatus":0,"jobresultcode":0,"jobresulttype":"object","jobresult":{"physicalnetwork":{"id":"e0bc9017-9ba8-4551-a6f9-6b3b2ac1d59c","name":"Sandbox-pnet","broadcastdomainrange":"ZONE","zoneid":"88e796cd-953a-44b9-9445-a7c3ee205cc2","state":"Disabled"}},"created":"2013-04-16T18:37:01+0530","jobid":"8fc09350-f42a-4e04-9427-3d1b68f73dd0"}
 }'
+    res = createPhysicalNetwork.createPhysicalNetworkResponse()
     res = getResultObj(result, res)
     print res
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/sandbox/advanced/advanced_env.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sandbox/advanced/advanced_env.py 
b/tools/marvin/marvin/sandbox/advanced/advanced_env.py
index db78a84..5a6c760 100644
--- a/tools/marvin/marvin/sandbox/advanced/advanced_env.py
+++ b/tools/marvin/marvin/sandbox/advanced/advanced_env.py
@@ -46,6 +46,7 @@ def describeResources(config):
     z.name = 'Sandbox-%s'%(config.get('cloudstack', 'hypervisor'))
     z.networktype = 'Advanced'
     z.guestcidraddress = '10.1.1.0/24'
+    z.securitygroupenabled = 'false'
     
     vpcprovider = provider()
     vpcprovider.name = 'VpcVirtualRouter'
@@ -57,6 +58,7 @@ def describeResources(config):
     pn.traffictypes = [traffictype("Guest"),
             traffictype("Management", {"simulator" : "cloud-simulator-mgmt"}),
             traffictype("Public", {"simulator":"cloud-simulator-public"})]
+    pn.isolationmethods = ["VLAN"]
     pn.providers.append(vpcprovider)
 
     pn2 = physical_network()
@@ -64,6 +66,7 @@ def describeResources(config):
     pn2.vlan = config.get('cloudstack', 'pnet2.vlan')
     pn2.tags = ["cloud-simulator-guest"]
     pn2.traffictypes = [traffictype('Guest', {'simulator': 
'cloud-simulator-guest'})]
+    pn.isolationmethods = ["VLAN"]
     pn2.providers.append(vpcprovider)
     
     z.physical_networks.append(pn)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/sandbox/basic/basic_env.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sandbox/basic/basic_env.py 
b/tools/marvin/marvin/sandbox/basic/basic_env.py
index e588fdc..cf1869f 100644
--- a/tools/marvin/marvin/sandbox/basic/basic_env.py
+++ b/tools/marvin/marvin/sandbox/basic/basic_env.py
@@ -55,6 +55,7 @@ def describeResources(config):
     pn = physical_network()
     pn.name = "Sandbox-pnet"
     pn.traffictypes = [traffictype("Guest"), traffictype("Management")]
+    pn.isolationmethods = ["L3"]
     pn.providers.append(sgprovider)
     
     z.physical_networks.append(pn)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/284581fe/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py 
b/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
index e4ec9b7..bdacd6b 100644
--- a/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
+++ b/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
@@ -50,6 +50,7 @@ def describeResources(config):
     pn.traffictypes = [traffictype("Guest"), traffictype("Management"), 
traffictype("Public")]
     pn.providers.append(vpcprovider)
     pn.vlan = config.get('cloudstack', 'zone.vlan')
+    pn.isolationmethods = ['VLAN']
     
     z.physical_networks.append(pn)
 

Reply via email to