Changes to simulator setup files

for provider + traffic type changes in marvin
This commit is contained in:
Prasanna Santhanam 2012-08-09 15:06:24 +05:30
parent aa8fee4fac
commit f72146e96f
3 changed files with 69 additions and 33 deletions

View File

@ -22,29 +22,50 @@
{
"name": "Sandbox-simulator",
"guestcidraddress": "10.1.1.0/24",
"providers": [
{
"broadcastdomainrange": "ZONE",
"name": "VirtualRouter"
}
],
"dns1": "10.147.28.6",
"vlan": "100-200",
"physical_networks": [
{
"broadcastdomainrange": "Zone",
"name": "Sandbox-pnet",
"traffictypes": [
{
"typ": "Guest"
},
{
"typ": "Management"
},
{
"typ": "Public"
}
],
"providers": [
{
"broadcastdomainrange": "ZONE",
"name": "VirtualRouter"
},
{
"broadcastdomainrange": "ZONE",
"name": "VpcVirtualRouter"
}
]
}
],
"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",
@ -100,6 +121,10 @@
}
],
"globalConfig": [
{
"name": "network.gc.wait",
"value": "60"
},
{
"name": "storage.cleanup.interval",
"value": "300"
@ -112,6 +137,10 @@
"name": "default.page.size",
"value": "10000"
},
{
"name": "network.gc.interval",
"value": "60"
},
{
"name": "instance.name",
"value": "QA"
@ -136,14 +165,6 @@
"name": "expunge.delay",
"value": "60"
},
{
"name": "network.gc.wait",
"value": "60"
},
{
"name": "network.gc.interval",
"value": "60"
},
{
"name": "vm.allocation.algorithm",
"value": "random"

View File

@ -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'''

View File

@ -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