THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
prasanna@cloud:~cloudstack-oss# cat demo/demo.cfg { "dbSvr": { "dbSvr": "automation.lab.vmops.com", "passwd": "cloud", "db": "cloud", "port": 3306, "user": "cloud" }, "logger": [ { "name": "TestClient", "file": "/var/log/testclient.log" }, { "name": "TestCase", "file": "/var/log/testcase.log" } ], "mgtSvr": [ { "mgtSvrIp": "automation.lab.vmops.com", "port": 8096 } ] } |
dbSvr
is the location where mysql server is running and passwd is the password for user cloud.Code Block |
---|
In [1]: import marvin In [2]: from marvin.cloudstackTestCase import * |
Code Block |
---|
In [2]: import marvin.deployDataCenter |
Code Block |
---|
In [3]: config = marvin.deployDataCenter.deployDataCenters('demo/demo.cfg') In [4]: config.loadCfg() |
Code Block |
---|
In [5]: apiClient = config.testClient.getApiClient() |
Code Block |
---|
In [6]: listconfig = listConfigurations.listConfigurationsCmd() |
deployVirtualMachineCmd
method inside the deployVirtualMachine
object. Simple, ain't it?Code Block |
---|
In [7]: listconfig.name = 'expunge' |
Code Block |
---|
In [8]: listconfigresponse = apiClient.listConfigurations(listconfig) |
Code Block |
---|
In [9]: print listconfigresponse [ {category : u'Advanced', name : u'expunge.delay', value : u'60', description : u'Determines how long (in seconds) to wait before actually expunging destroyed vm. The default value = the default value of expunge.interval'}, {category : u'Advanced', name : u'expunge.interval', value : u'60', description : u'The interval (in seconds) to wait before running the expunge thread.'}, {category : u'Advanced', name : u'expunge.workers', value : u'3', description : u'Number of workers performing expunge '}] |
...