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", "name": "Sandbox-simulator",
"guestcidraddress": "10.1.1.0/24", "guestcidraddress": "10.1.1.0/24",
"providers": [
{
"broadcastdomainrange": "ZONE",
"name": "VirtualRouter"
}
],
"dns1": "10.147.28.6", "dns1": "10.147.28.6",
"vlan": "100-200", "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": [ "ipranges": [
{ {
"startip": "10.147.31.2", "startip": "192.168.2.2",
"endip": "10.147.31.200", "endip": "192.168.2.200",
"netmask": "255.255.255.0", "netmask": "255.255.255.0",
"vlan": "31", "vlan": "50",
"gateway": "10.147.31.1" "gateway": "192.168.2.1"
} }
], ],
"networktype": "Advanced", "networktype": "Advanced",
"pods": [ "pods": [
{ {
"endip": "10.147.29.200", "endip": "172.16.15.200",
"name": "POD0", "name": "POD0",
"startip": "10.147.29.2", "startip": "172.16.15.2",
"netmask": "255.255.255.0", "netmask": "255.255.255.0",
"clusters": [ "clusters": [
{ {
@ -55,7 +76,7 @@
"username": "root", "username": "root",
"url": "http://sim/c0/h0", "url": "http://sim/c0/h0",
"password": "password" "password": "password"
}, },
{ {
"username": "root", "username": "root",
"url": "http://sim/c0/h1", "url": "http://sim/c0/h1",
@ -71,7 +92,7 @@
] ]
} }
], ],
"gateway": "10.147.29.1" "gateway": "172.16.15.1"
} }
], ],
"internaldns1": "10.147.28.6", "internaldns1": "10.147.28.6",
@ -100,6 +121,10 @@
} }
], ],
"globalConfig": [ "globalConfig": [
{
"name": "network.gc.wait",
"value": "60"
},
{ {
"name": "storage.cleanup.interval", "name": "storage.cleanup.interval",
"value": "300" "value": "300"
@ -112,6 +137,10 @@
"name": "default.page.size", "name": "default.page.size",
"value": "10000" "value": "10000"
}, },
{
"name": "network.gc.interval",
"value": "60"
},
{ {
"name": "instance.name", "name": "instance.name",
"value": "QA" "value": "QA"
@ -136,14 +165,6 @@
"name": "expunge.delay", "name": "expunge.delay",
"value": "60" "value": "60"
}, },
{
"name": "network.gc.wait",
"value": "60"
},
{
"name": "network.gc.interval",
"value": "60"
},
{ {
"name": "vm.allocation.algorithm", "name": "vm.allocation.algorithm",
"value": "random" "value": "random"

View File

@ -17,9 +17,10 @@
# under the License. # under the License.
import marvin
from ConfigParser import SafeConfigParser from ConfigParser import SafeConfigParser
from optparse import OptionParser from optparse import OptionParser
from configGenerator import * from marvin.configGenerator import *
import random import random
@ -41,6 +42,16 @@ def describeResources(config):
z.networktype = 'Advanced' z.networktype = 'Advanced'
z.guestcidraddress = '10.1.1.0/24' z.guestcidraddress = '10.1.1.0/24'
z.vlan = config.get('cloudstack', 'zone.vlan') 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 = pod()
p.name = 'POD0' p.name = 'POD0'
@ -96,8 +107,9 @@ def describeResources(config):
'''Add a database''' '''Add a database'''
db = dbServer() db = dbServer()
db.dbSvr = config.get('environment', 'dbhost') db.dbSvr = config.get('environment', 'mysql.host')
db.passwd = config.get('environment', 'dbpasswd') db.user = config.get('environment', 'mysql.cloud.user')
db.passwd = config.get('environment', 'mysql.cloud.passwd')
zs.dbSvr = db zs.dbSvr = db
'''Add some configuration''' '''Add some configuration'''

View File

@ -31,12 +31,15 @@ instance.name=QA
direct.agent.load.size=1000 direct.agent.load.size=1000
default.page.size=10000 default.page.size=10000
check.pod.cidrs=true check.pod.cidrs=true
network.gc.interval=60
network.gc.wait=60
secstorage.allowed.internal.sites=10.147.28.0/24 secstorage.allowed.internal.sites=10.147.28.0/24
[environment] [environment]
dns=4.2.2.2 dns=10.147.28.6
mshost=10.223.132.171 mshost=localhost
dbhost=10.223.132.171 mysql.host=localhost
dbpasswd= mysql.cloud.user=cloud
mysql.cloud.passwd=cloud
hypervisor=simulator hypervisor=simulator
[cloudstack] [cloudstack]
zone.vlan=100-200 zone.vlan=100-200
@ -50,8 +53,8 @@ public.vlan=50
public.vlan.startip=192.168.2.2 public.vlan.startip=192.168.2.2
public.vlan.endip=192.168.2.200 public.vlan.endip=192.168.2.200
#hosts #hosts
host=simulator.host.vmops.com host=sim/c0/h0
host2=simulator-2.host.vmops.com host2=sim/c0/h1
#pools #pools
pool=nfs://172.16.15.30/export/share/primary pool=nfs://10.147.28.6:/export/home/sandbox/primary
secondary=nfs://172.16.15.30/export/share/secondary secondary=nfs://10.147.28.6:/export/home/sandbox/secondary