...
dbSvr
is the location where mysql server is running and passwd is the password for user cloud....
#Enter an interactive python shell and follow along with the steps listed below. We've used the ipython shell in our example because it has a very handy auto-complete feature
...
#We will import a few essential libraries to start with.
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 '}]
|
The response is presented to us the way our UI receives it, as a JSON object. The object comprises of a list of configurations, each configuration showing the detailed dictionary (key, value) pairs of each config setting.
...