You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2012/08/09 14:08:30 UTC

[2/4] git commit: Changes to simulator setup files

Changes to simulator setup files

for provider + traffic type changes in marvin


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

Branch: refs/heads/master
Commit: f72146e96f693dcf28a626cc5970632f9cf0d1a6
Parents: aa8fee4
Author: Prasanna Santhanam <Pr...@citrix.com>
Authored: Thu Aug 9 15:06:24 2012 +0530
Committer: Prasanna Santhanam <Pr...@citrix.com>
Committed: Thu Aug 9 15:31:58 2012 +0530

----------------------------------------------------------------------
 .../marvin/sandbox/demo/simulator/simulator.cfg    |   63 ++++++++++-----
 .../sandbox/demo/simulator/simulator_setup.py      |   18 ++++-
 .../demo/simulator/simulatordemo.properties        |   19 +++--
 3 files changed, 68 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f72146e9/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg b/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg
index 9cb904c..7d250c8 100644
--- a/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg
+++ b/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg
@@ -22,29 +22,50 @@
         {
             "name": "Sandbox-simulator", 
             "guestcidraddress": "10.1.1.0/24", 
-            "providers": [
+            "dns1": "10.147.28.6", 
+            "vlan": "100-200", 
+            "physical_networks": [
                 {
-                    "broadcastdomainrange": "ZONE", 
-                    "name": "VirtualRouter"
+                    "broadcastdomainrange": "Zone", 
+                    "name": "Sandbox-pnet", 
+                    "traffictypes": [
+                        {
+                            "typ": "Guest"
+                        }, 
+                        {
+                            "typ": "Management"
+                        }, 
+                        {
+                            "typ": "Public"
+                        }
+                    ], 
+                    "providers": [
+                        {
+                            "broadcastdomainrange": "ZONE", 
+                            "name": "VirtualRouter"
+                        }, 
+                        {
+                            "broadcastdomainrange": "ZONE", 
+                            "name": "VpcVirtualRouter"
+                        }
+                    ]
                 }
             ], 
-            "dns1": "10.147.28.6", 
-            "vlan": "100-200", 
             "ipranges": [
                 {
-                    "startip": "10.147.31.2", 
-                    "endip": "10.147.31.200", 
+                    "startip": "192.168.2.2", 
+                    "endip": "192.168.2.200", 
                     "netmask": "255.255.255.0", 
-                    "vlan": "31", 
-                    "gateway": "10.147.31.1"
+                    "vlan": "50", 
+                    "gateway": "192.168.2.1"
                 }
             ], 
             "networktype": "Advanced", 
             "pods": [
                 {
-                    "endip": "10.147.29.200", 
+                    "endip": "172.16.15.200", 
                     "name": "POD0", 
-                    "startip": "10.147.29.2", 
+                    "startip": "172.16.15.2", 
                     "netmask": "255.255.255.0", 
                     "clusters": [
                         {
@@ -55,7 +76,7 @@
                                     "username": "root", 
                                     "url": "http://sim/c0/h0", 
                                     "password": "password"
-                                },
+                                }, 
                                 {
                                     "username": "root", 
                                     "url": "http://sim/c0/h1", 
@@ -71,7 +92,7 @@
                             ]
                         }
                     ], 
-                    "gateway": "10.147.29.1"
+                    "gateway": "172.16.15.1"
                 }
             ], 
             "internaldns1": "10.147.28.6", 
@@ -101,6 +122,10 @@
     ], 
     "globalConfig": [
         {
+            "name": "network.gc.wait", 
+            "value": "60"
+        }, 
+        {
             "name": "storage.cleanup.interval", 
             "value": "300"
         }, 
@@ -113,6 +138,10 @@
             "value": "10000"
         }, 
         {
+            "name": "network.gc.interval", 
+            "value": "60"
+        }, 
+        {
             "name": "instance.name", 
             "value": "QA"
         }, 
@@ -137,14 +166,6 @@
             "value": "60"
         }, 
         {
-            "name": "network.gc.wait", 
-            "value": "60"
-        }, 
-        {
-            "name": "network.gc.interval", 
-            "value": "60"
-        }, 
-        {
             "name": "vm.allocation.algorithm", 
             "value": "random"
         }, 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f72146e9/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 0b9c01d..2bd52f1 100644
--- a/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
+++ b/tools/marvin/marvin/sandbox/demo/simulator/simulator_setup.py
@@ -17,9 +17,10 @@
 # under the License.
 
 
+import marvin
 from ConfigParser import SafeConfigParser
 from optparse import OptionParser
-from configGenerator import *
+from marvin.configGenerator import *
 import random
 
 
@@ -41,6 +42,16 @@ def describeResources(config):
     z.networktype = 'Advanced'
     z.guestcidraddress = '10.1.1.0/24'
     z.vlan = config.get('cloudstack', 'zone.vlan')
+    
+    vpcprovider = provider()
+    vpcprovider.name = 'VpcVirtualRouter'
+    
+    pn = physical_network()
+    pn.name = "Sandbox-pnet"
+    pn.traffictypes = [traffictype("Guest"), traffictype("Management"), traffictype("Public")]
+    pn.providers.append(vpcprovider)
+    
+    z.physical_networks.append(pn)
 
     p = pod()
     p.name = 'POD0'
@@ -96,8 +107,9 @@ def describeResources(config):
 
     '''Add a database'''
     db = dbServer()
-    db.dbSvr = config.get('environment', 'dbhost')
-    db.passwd = config.get('environment', 'dbpasswd')
+    db.dbSvr = config.get('environment', 'mysql.host')
+    db.user = config.get('environment', 'mysql.cloud.user')
+    db.passwd = config.get('environment', 'mysql.cloud.passwd')
     zs.dbSvr = db
 
     '''Add some configuration'''

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f72146e9/tools/marvin/marvin/sandbox/demo/simulator/simulatordemo.properties
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sandbox/demo/simulator/simulatordemo.properties b/tools/marvin/marvin/sandbox/demo/simulator/simulatordemo.properties
index 5a476b4..aa3deb0 100644
--- a/tools/marvin/marvin/sandbox/demo/simulator/simulatordemo.properties
+++ b/tools/marvin/marvin/sandbox/demo/simulator/simulatordemo.properties
@@ -31,12 +31,15 @@ instance.name=QA
 direct.agent.load.size=1000
 default.page.size=10000
 check.pod.cidrs=true
+network.gc.interval=60
+network.gc.wait=60
 secstorage.allowed.internal.sites=10.147.28.0/24
 [environment]
-dns=4.2.2.2
-mshost=10.223.132.171
-dbhost=10.223.132.171
-dbpasswd=
+dns=10.147.28.6
+mshost=localhost
+mysql.host=localhost
+mysql.cloud.user=cloud
+mysql.cloud.passwd=cloud
 hypervisor=simulator
 [cloudstack]
 zone.vlan=100-200
@@ -50,8 +53,8 @@ public.vlan=50
 public.vlan.startip=192.168.2.2
 public.vlan.endip=192.168.2.200
 #hosts
-host=simulator.host.vmops.com
-host2=simulator-2.host.vmops.com
+host=sim/c0/h0
+host2=sim/c0/h1
 #pools
-pool=nfs://172.16.15.30/export/share/primary
-secondary=nfs://172.16.15.30/export/share/secondary
+pool=nfs://10.147.28.6:/export/home/sandbox/primary
+secondary=nfs://10.147.28.6:/export/home/sandbox/secondary