You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/11/08 19:08:44 UTC
[28/76] [abbrv] CLOUSTACK-5099: Utils.py-has-wrong-reference,
cleaned it. As well added Uniform naming convention Signed-off-by:
SrikanteswaraRao Talluri
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index f204595..09d6437 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -21,7 +21,7 @@ import marvin
from marvin.cloudstackException import cloudstackAPIException
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
-from marvin import remoteSSHClient
+from marvin.sshClient import SshClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
@@ -460,7 +460,7 @@ class TestPortForwarding(cloudstackTestCase):
"SSHing into VM with IP address %s after NAT rule deletion" %
self.virtual_machine.ipaddress)
- remoteSSHClient(
+ SshClient(
src_nat_ip_addr.ipaddress,
self.virtual_machine.ssh_port,
self.virtual_machine.username,
@@ -578,7 +578,7 @@ class TestPortForwarding(cloudstackTestCase):
"SSHing into VM with IP address %s after NAT rule deletion" %
self.virtual_machine.ipaddress)
- remoteSSHClient(
+ SshClient(
ip_address.ipaddress.ipaddress,
self.virtual_machine.ssh_port,
self.virtual_machine.username,
@@ -741,7 +741,7 @@ class TestRebootRouter(cloudstackTestCase):
try:
self.debug("SSH into VM (ID : %s ) after reboot" % self.vm_1.id)
- remoteSSHClient(
+ SshClient(
self.public_ip.ipaddress.ipaddress,
self.services["natrule"]["publicport"],
self.vm_1.username,
@@ -883,7 +883,7 @@ class TestReleaseIP(cloudstackTestCase):
# SSH Attempt though public IP should fail
with self.assertRaises(Exception):
- ssh_2 = remoteSSHClient(
+ ssh_2 = SshClient(
self.ip_addr.ipaddress,
self.services["natrule"]["publicport"],
self.virtual_machine.username,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/test/integration/smoke/test_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_nic.py b/test/integration/smoke/test_nic.py
index 583fc29..ac95685 100644
--- a/test/integration/smoke/test_nic.py
+++ b/test/integration/smoke/test_nic.py
@@ -18,7 +18,7 @@
import marvin
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
-from marvin.remoteSSHClient import remoteSSHClient
+from marvin.sshClient import SshClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/test/integration/smoke/test_pvlan.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_pvlan.py b/test/integration/smoke/test_pvlan.py
index 0a427ba..aeb47f9 100644
--- a/test/integration/smoke/test_pvlan.py
+++ b/test/integration/smoke/test_pvlan.py
@@ -20,7 +20,7 @@
import marvin
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
-from marvin import remoteSSHClient
+from marvin.sshClient import SshClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/test/integration/smoke/test_resource_detail.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_resource_detail.py b/test/integration/smoke/test_resource_detail.py
index 93bc2ff..00a7b5c 100644
--- a/test/integration/smoke/test_resource_detail.py
+++ b/test/integration/smoke/test_resource_detail.py
@@ -20,7 +20,7 @@
import marvin
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
-from marvin.remoteSSHClient import remoteSSHClient
+from marvin.sshClient import SshClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/test/integration/smoke/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py
index 0f32e27..7d32413 100644
--- a/test/integration/smoke/test_routers.py
+++ b/test/integration/smoke/test_routers.py
@@ -20,7 +20,7 @@
import marvin
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
-from marvin import remoteSSHClient
+from marvin.sshClient import SshClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/test/integration/smoke/test_ssvm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_ssvm.py b/test/integration/smoke/test_ssvm.py
index 9fa59a9..a2b9eab 100644
--- a/test/integration/smoke/test_ssvm.py
+++ b/test/integration/smoke/test_ssvm.py
@@ -20,7 +20,7 @@
import marvin
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
-from marvin import remoteSSHClient
+from marvin.sshClient import SshClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/test/integration/smoke/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py
index 9478440..e371ad4 100644
--- a/test/integration/smoke/test_templates.py
+++ b/test/integration/smoke/test_templates.py
@@ -20,7 +20,7 @@
import marvin
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
-from marvin.remoteSSHClient import remoteSSHClient
+from marvin.sshClient import SshClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index b60b70e..816ae03 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -21,7 +21,7 @@ import marvin
from marvin.cloudstackTestCase import *
from marvin.cloudstackException import *
from marvin.cloudstackAPI import *
-from marvin.remoteSSHClient import remoteSSHClient
+from marvin.sshClient import SshClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/TestCaseExecuteEngine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/TestCaseExecuteEngine.py b/tools/marvin/build/lib/marvin/TestCaseExecuteEngine.py
new file mode 100644
index 0000000..f5af1fe
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/TestCaseExecuteEngine.py
@@ -0,0 +1,102 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import unittest
+import os
+import sys
+import logging
+from functools import partial
+
+
+def testCaseLogger(message, logger=None):
+ if logger is not None:
+ logger.debug(message)
+
+
+class TestCaseExecuteEngine(object):
+ def __init__(self, testclient, config, testcaseLogFile=None,
+ testResultLogFile=None):
+ """
+ Initialize the testcase execution engine, just the basics here
+ @var testcaseLogFile: client log file
+ @var testResultLogFile: summary report file
+ """
+ self.testclient = testclient
+ self.config = config
+ self.logformat =\
+ logging.Formatter(
+ "%(asctime)s - %(levelname)s - %(name)s - %(message)s")
+ self.loader = unittest.loader.TestLoader()
+ self.suite = None
+
+ if testcaseLogFile is not None:
+ self.logfile = testcaseLogFile
+ self.logger = logging.getLogger("TestCaseExecuteEngine")
+ fh = logging.FileHandler(self.logfile)
+ fh.setFormatter(self.logformat)
+ self.logger.addHandler(fh)
+ self.logger.setLevel(logging.DEBUG)
+ if testResultLogFile is not None:
+ ch = logging.StreamHandler()
+ ch.setLevel(logging.ERROR)
+ ch.setFormatter(self.logformat)
+ self.logger.addHandler(ch)
+ fp = open(testResultLogFile, "w")
+ self.testResultLogFile = fp
+ else:
+ self.testResultLogFile = sys.stdout
+
+ def loadTestsFromDir(self, testDirectory):
+ """ Load the test suites from a package with multiple test files """
+ self.suite = self.loader.discover(testDirectory)
+ self.injectTestCase(self.suite)
+
+ def loadTestsFromFile(self, file_name):
+ """ Load the tests from a single script/module """
+ if os.path.isfile(file_name):
+ self.suite = self.loader.discover(os.path.dirname(file_name),
+ os.path.basename(file_name))
+ self.injectTestCase(self.suite)
+
+ def injectTestCase(self, testSuites):
+ for test in testSuites:
+ if isinstance(test, unittest.BaseTestSuite):
+ self.injectTestCase(test)
+ else:
+ #logger bears the name of the test class
+ testcaselogger = logging.getLogger("%s" % (test))
+ fh = logging.FileHandler(self.logfile)
+ fh.setFormatter(self.logformat)
+ testcaselogger.addHandler(fh)
+ testcaselogger.setLevel(logging.DEBUG)
+
+ #inject testclient and logger into each unittest
+ setattr(test, "testClient", self.testclient)
+ setattr(test, "config", self.config)
+ setattr(test, "debug", partial(testCaseLogger,
+ logger=testcaselogger))
+ setattr(test.__class__, "clstestclient", self.testclient)
+ if hasattr(test, "user"):
+ # attribute when test is entirely executed as user
+ self.testclient.createUserApiClient(test.UserName,
+ test.DomainName,
+ test.AcctType)
+
+ def run(self):
+ if self.suite:
+ unittest.TextTestRunner(stream=self.testResultLogFile,
+ verbosity=2).run(self.suite)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/__init__.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/__init__.py b/tools/marvin/build/lib/marvin/__init__.py
new file mode 100644
index 0000000..7af168e
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/__init__.py
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+#Marvin - The cloudstack test client
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/asyncJobMgr.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/asyncJobMgr.py b/tools/marvin/build/lib/marvin/asyncJobMgr.py
new file mode 100644
index 0000000..25818a6
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/asyncJobMgr.py
@@ -0,0 +1,261 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import threading
+import cloudstackException
+import time
+import Queue
+import copy
+import sys
+import jsonHelper
+import datetime
+
+
+class job(object):
+ def __init__(self):
+ self.id = None
+ self.cmd = None
+
+
+class jobStatus(object):
+ def __init__(self):
+ self.result = None
+ self.status = None
+ self.startTime = None
+ self.endTime = None
+ self.duration = None
+ self.jobId = None
+ self.responsecls = None
+
+ def __str__(self):
+ return '{%s}' % str(', '.join('%s : %s' % (k, repr(v)) for (k, v)
+ in self.__dict__.iteritems()))
+
+
+class workThread(threading.Thread):
+ def __init__(self, in_queue, outqueue, apiClient, db=None, lock=None):
+ threading.Thread.__init__(self)
+ self.inqueue = in_queue
+ self.output = outqueue
+ self.connection = apiClient.connection.__copy__()
+ self.db = None
+ self.lock = lock
+
+ def queryAsynJob(self, job):
+ if job.jobId is None:
+ return job
+
+ try:
+ self.lock.acquire()
+ result = self.connection.poll(job.jobId, job.responsecls).jobresult
+ except cloudstackException.cloudstackAPIException, e:
+ result = str(e)
+ finally:
+ self.lock.release()
+
+ job.result = result
+ return job
+
+ def executeCmd(self, job):
+ cmd = job.cmd
+
+ jobstatus = jobStatus()
+ jobId = None
+ try:
+ self.lock.acquire()
+
+ if cmd.isAsync == "false":
+ jobstatus.startTime = datetime.datetime.now()
+
+ result = self.connection.make_request(cmd)
+ jobstatus.result = result
+ jobstatus.endTime = datetime.datetime.now()
+ jobstatus.duration =\
+ time.mktime(jobstatus.endTime.timetuple()) - time.mktime(
+ jobstatus.startTime.timetuple())
+ else:
+ result = self.connection.make_request(cmd, None, True)
+ if result is None:
+ jobstatus.status = False
+ else:
+ jobId = result.jobid
+ jobstatus.jobId = jobId
+ try:
+ responseName =\
+ cmd.__class__.__name__.replace("Cmd", "Response")
+ jobstatus.responsecls =\
+ jsonHelper.getclassFromName(cmd, responseName)
+ except:
+ pass
+ jobstatus.status = True
+ except cloudstackException.cloudstackAPIException, e:
+ jobstatus.result = str(e)
+ jobstatus.status = False
+ except:
+ jobstatus.status = False
+ jobstatus.result = sys.exc_info()
+ finally:
+ self.lock.release()
+
+ return jobstatus
+
+ def run(self):
+ while self.inqueue.qsize() > 0:
+ job = self.inqueue.get()
+ if isinstance(job, jobStatus):
+ jobstatus = self.queryAsynJob(job)
+ else:
+ jobstatus = self.executeCmd(job)
+
+ self.output.put(jobstatus)
+ self.inqueue.task_done()
+
+ '''release the resource'''
+ self.connection.close()
+
+
+class jobThread(threading.Thread):
+ def __init__(self, inqueue, interval):
+ threading.Thread.__init__(self)
+ self.inqueue = inqueue
+ self.interval = interval
+
+ def run(self):
+ while self.inqueue.qsize() > 0:
+ job = self.inqueue.get()
+ try:
+ job.run()
+ '''release the api connection'''
+ job.apiClient.connection.close()
+ except:
+ pass
+
+ self.inqueue.task_done()
+ time.sleep(self.interval)
+
+
+class outputDict(object):
+ def __init__(self):
+ self.lock = threading.Condition()
+ self.dict = {}
+
+
+class asyncJobMgr(object):
+ def __init__(self, apiClient, db):
+ self.inqueue = Queue.Queue()
+ self.output = outputDict()
+ self.outqueue = Queue.Queue()
+ self.apiClient = apiClient
+ self.db = db
+
+ def submitCmds(self, cmds):
+ if not self.inqueue.empty():
+ return False
+ id = 0
+ ids = []
+ for cmd in cmds:
+ asyncjob = job()
+ asyncjob.id = id
+ asyncjob.cmd = cmd
+ self.inqueue.put(asyncjob)
+ id += 1
+ ids.append(id)
+ return ids
+
+ def updateTimeStamp(self, jobstatus):
+ jobId = jobstatus.jobId
+ if jobId is not None and self.db is not None:
+ result = self.db.execute(
+ "select job_status, created, last_updated from async_job where\
+ id='%s'" % str(jobId))
+ if result is not None and len(result) > 0:
+ if result[0][0] == 1:
+ jobstatus.status = True
+ else:
+ jobstatus.status = False
+ jobstatus.startTime = result[0][1]
+ jobstatus.endTime = result[0][2]
+ delta = jobstatus.endTime - jobstatus.startTime
+ jobstatus.duration = delta.total_seconds()
+
+ def waitForComplete(self, workers=10):
+ self.inqueue.join()
+ lock = threading.Lock()
+ resultQueue = Queue.Queue()
+ '''intermediate result is stored in self.outqueue'''
+ for i in range(workers):
+ worker = workThread(self.outqueue, resultQueue, self.apiClient,
+ self.db, lock)
+ worker.start()
+
+ self.outqueue.join()
+
+ asyncJobResult = []
+ while resultQueue.qsize() > 0:
+ jobstatus = resultQueue.get()
+ self.updateTimeStamp(jobstatus)
+ asyncJobResult.append(jobstatus)
+
+ return asyncJobResult
+
+ def submitCmdsAndWait(self, cmds, workers=10):
+ '''
+ put commands into a queue at first, then start workers numbers
+ threads to execute this commands
+ '''
+ self.submitCmds(cmds)
+ lock = threading.Lock()
+ for i in range(workers):
+ worker = workThread(self.inqueue, self.outqueue, self.apiClient,
+ self.db, lock)
+ worker.start()
+
+ return self.waitForComplete(workers)
+
+ def submitJobExecuteNtimes(self, job, ntimes=1, nums_threads=1,
+ interval=1):
+ '''
+ submit one job and execute the same job ntimes, with nums_threads
+ of threads
+ '''
+ inqueue1 = Queue.Queue()
+ lock = threading.Condition()
+ for i in range(ntimes):
+ newjob = copy.copy(job)
+ setattr(newjob, "apiClient", copy.copy(self.apiClient))
+ setattr(newjob, "lock", lock)
+ inqueue1.put(newjob)
+
+ for i in range(nums_threads):
+ work = jobThread(inqueue1, interval)
+ work.start()
+ inqueue1.join()
+
+ def submitJobs(self, jobs, nums_threads=1, interval=1):
+ '''submit n jobs, execute them with nums_threads of threads'''
+ inqueue1 = Queue.Queue()
+ lock = threading.Condition()
+
+ for job in jobs:
+ setattr(job, "apiClient", copy.copy(self.apiClient))
+ setattr(job, "lock", lock)
+ inqueue1.put(job)
+
+ for i in range(nums_threads):
+ work = jobThread(inqueue1, interval)
+ work.start()
+ inqueue1.join()
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/__init__.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/__init__.py b/tools/marvin/build/lib/marvin/cloudstackAPI/__init__.py
new file mode 100644
index 0000000..ad0c1e5
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/__init__.py
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+__all__ = ["createAccount","deleteAccount","updateAccount","disableAccount","enableAccount","lockAccount","listAccounts","markDefaultZoneForAccount","createUser","deleteUser","updateUser","listUsers","lockUser","disableUser","enableUser","getUser","createDomain","updateDomain","deleteDomain","listDomains","listDomainChildren","getCloudIdentifier","updateResourceLimit","updateResourceCount","listResourceLimits","deployVirtualMachine","destroyVirtualMachine","rebootVirtualMachine","startVirtualMachine","stopVirtualMachine","resetPasswordForVirtualMachine","resetSSHKeyForVirtualMachine","updateVirtualMachine","listVirtualMachines","getVMPassword","restoreVirtualMachine","changeServiceForVirtualMachine","scaleVirtualMachine","assignVirtualMachine","migrateVirtualMachine","migrateVirtualMachineWithVolume","recoverVirtualMachine","createSnapshot","listSnapshots","deleteSnapshot","createSnapshotPolicy","deleteSnapshotPolicies","listSnapshotPolicies","revertSnapshot","createTemplate","regis
terTemplate","updateTemplate","copyTemplate","deleteTemplate","listTemplates","updateTemplatePermissions","listTemplatePermissions","extractTemplate","prepareTemplate","attachIso","detachIso","listIsos","registerIso","updateIso","deleteIso","copyIso","updateIsoPermissions","listIsoPermissions","extractIso","listOsTypes","listOsCategories","createServiceOffering","deleteServiceOffering","updateServiceOffering","listServiceOfferings","createDiskOffering","updateDiskOffering","deleteDiskOffering","listDiskOfferings","createVlanIpRange","deleteVlanIpRange","listVlanIpRanges","dedicatePublicIpRange","releasePublicIpRange","dedicateGuestVlanRange","releaseDedicatedGuestVlanRange","listDedicatedGuestVlanRanges","associateIpAddress","disassociateIpAddress","listPublicIpAddresses","listPortForwardingRules","createPortForwardingRule","deletePortForwardingRule","updatePortForwardingRule","enableStaticNat","createIpForwardingRule","deleteIpForwardingRule","listIpForwardingRules","disableStaticN
at","createLoadBalancerRule","deleteLoadBalancerRule","removeFromLoadBalancerRule","assignToLoadBalancerRule","createLBStickinessPolicy","deleteLBStickinessPolicy","listLoadBalancerRules","listLBStickinessPolicies","listLBHealthCheckPolicies","createLBHealthCheckPolicy","deleteLBHealthCheckPolicy","listLoadBalancerRuleInstances","updateLoadBalancerRule","createCounter","createCondition","createAutoScalePolicy","createAutoScaleVmProfile","createAutoScaleVmGroup","deleteCounter","deleteCondition","deleteAutoScalePolicy","deleteAutoScaleVmProfile","deleteAutoScaleVmGroup","listCounters","listConditions","listAutoScalePolicies","listAutoScaleVmProfiles","listAutoScaleVmGroups","enableAutoScaleVmGroup","disableAutoScaleVmGroup","updateAutoScalePolicy","updateAutoScaleVmProfile","updateAutoScaleVmGroup","startRouter","rebootRouter","stopRouter","destroyRouter","changeServiceForRouter","listRouters","listVirtualRouterElements","configureVirtualRouterElement","createVirtualRouterElement","s
tartSystemVm","rebootSystemVm","stopSystemVm","destroySystemVm","listSystemVms","migrateSystemVm","changeServiceForSystemVm","scaleSystemVm","updateConfiguration","listConfigurations","listCapabilities","listDeploymentPlanners","cleanVMReservations","createPod","updatePod","deletePod","listPods","createZone","updateZone","deleteZone","listZones","listEvents","listEventTypes","archiveEvents","deleteEvents","listAlerts","archiveAlerts","deleteAlerts","listCapacity","addSwift","listSwifts","addS3","listS3s","addImageStore","listImageStores","deleteImageStore","createSecondaryStagingStore","listSecondaryStagingStores","deleteSecondaryStagingStore","addHost","addCluster","deleteCluster","updateCluster","reconnectHost","updateHost","deleteHost","prepareHostForMaintenance","cancelHostMaintenance","listHosts","findHostsForMigration","addSecondaryStorage","updateHostPassword","releaseHostReservation","attachVolume","uploadVolume","detachVolume","createVolume","deleteVolume","listVolumes","ex
tractVolume","migrateVolume","resizeVolume","updateVolume","registerUserKeys","queryAsyncJobResult","listAsyncJobs","listStoragePools","listStorageProviders","createStoragePool","updateStoragePool","deleteStoragePool","listClusters","enableStorageMaintenance","cancelStorageMaintenance","findStoragePoolsForMigration","createSecurityGroup","deleteSecurityGroup","authorizeSecurityGroupIngress","revokeSecurityGroupIngress","authorizeSecurityGroupEgress","revokeSecurityGroupEgress","listSecurityGroups","createInstanceGroup","deleteInstanceGroup","updateInstanceGroup","listInstanceGroups","uploadCustomCertificate","listHypervisors","createRemoteAccessVpn","deleteRemoteAccessVpn","listRemoteAccessVpns","addVpnUser","removeVpnUser","listVpnUsers","createNetworkOffering","updateNetworkOffering","deleteNetworkOffering","listNetworkOfferings","createNetwork","deleteNetwork","listNetworks","restartNetwork","updateNetwork","addNicToVirtualMachine","removeNicFromVirtualMachine","updateDefaultNicF
orVirtualMachine","addIpToNic","removeIpFromNic","listNics","registerSSHKeyPair","createSSHKeyPair","deleteSSHKeyPair","listSSHKeyPairs","createProject","deleteProject","updateProject","activateProject","suspendProject","listProjects","addAccountToProject","deleteAccountFromProject","listProjectAccounts","listProjectInvitations","updateProjectInvitation","deleteProjectInvitation","createFirewallRule","deleteFirewallRule","listFirewallRules","createEgressFirewallRule","deleteEgressFirewallRule","listEgressFirewallRules","updateHypervisorCapabilities","listHypervisorCapabilities","createPhysicalNetwork","deletePhysicalNetwork","listPhysicalNetworks","updatePhysicalNetwork","listSupportedNetworkServices","addNetworkServiceProvider","deleteNetworkServiceProvider","listNetworkServiceProviders","updateNetworkServiceProvider","addTrafficType","deleteTrafficType","listTrafficTypes","updateTrafficType","listTrafficTypeImplementors","createStorageNetworkIpRange","deleteStorageNetworkIpRange",
"listStorageNetworkIpRange","updateStorageNetworkIpRange","addNetworkDevice","listNetworkDevice","deleteNetworkDevice","createVPC","listVPCs","deleteVPC","updateVPC","restartVPC","createVPCOffering","updateVPCOffering","deleteVPCOffering","listVPCOfferings","createPrivateGateway","listPrivateGateways","deletePrivateGateway","createNetworkACL","updateNetworkACLItem","deleteNetworkACL","listNetworkACLs","createNetworkACLList","deleteNetworkACLList","replaceNetworkACLList","listNetworkACLLists","createStaticRoute","deleteStaticRoute","listStaticRoutes","createTags","deleteTags","listTags","addResourceDetail","removeResourceDetail","listResourceDetails","createVpnCustomerGateway","createVpnGateway","createVpnConnection","deleteVpnCustomerGateway","deleteVpnGateway","deleteVpnConnection","updateVpnCustomerGateway","resetVpnConnection","listVpnCustomerGateways","listVpnGateways","listVpnConnections","generateUsageRecords","listUsageRecords","listUsageTypes","addTrafficMonitor","deleteTraf
ficMonitor","listTrafficMonitors","addNiciraNvpDevice","deleteNiciraNvpDevice","listNiciraNvpDevices","listNiciraNvpDeviceNetworks","addBigSwitchVnsDevice","deleteBigSwitchVnsDevice","listBigSwitchVnsDevices","listApis","getApiLimit","resetApiLimit","addRegion","updateRegion","removeRegion","listRegions","createGlobalLoadBalancerRule","deleteGlobalLoadBalancerRule","updateGlobalLoadBalancerRule","listGlobalLoadBalancerRules","assignToGlobalLoadBalancerRule","removeFromGlobalLoadBalancerRule","listVMSnapshot","createVMSnapshot","deleteVMSnapshot","revertToVMSnapshot","addBaremetalHost","addBaremetalPxeKickStartServer","addBaremetalPxePingServer","addBaremetalDhcp","listBaremetalDhcp","listBaremetalPxeServers","addUcsManager","listUcsManagers","listUcsProfiles","listUcsBlades","associateUcsProfileToBlade","createLoadBalancer","listLoadBalancers","deleteLoadBalancer","configureInternalLoadBalancerElement","createInternalLoadBalancerElement","listInternalLoadBalancerElements","createAff
inityGroup","deleteAffinityGroup","listAffinityGroups","updateVMAffinityGroup","listAffinityGroupTypes","createPortableIpRange","deletePortableIpRange","listPortableIpRanges","stopInternalLoadBalancerVM","startInternalLoadBalancerVM","listInternalLoadBalancerVMs","listNetworkIsolationMethods","dedicateZone","dedicatePod","dedicateCluster","dedicateHost","releaseDedicatedZone","releaseDedicatedPod","releaseDedicatedCluster","releaseDedicatedHost","listDedicatedZones","listDedicatedPods","listDedicatedClusters","listDedicatedHosts","listLdapConfigurations","addLdapConfiguration","deleteLdapConfiguration","listLdapUsers","ldapCreateAccount","login","logout","cloudstackAPIClient"]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/activateProject.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/activateProject.py b/tools/marvin/build/lib/marvin/cloudstackAPI/activateProject.py
new file mode 100644
index 0000000..cd7c7a7
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/activateProject.py
@@ -0,0 +1,141 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Activates a project"""
+from baseCmd import *
+from baseResponse import *
+class activateProjectCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "true"
+ """id of the project to be modified"""
+ """Required"""
+ self.id = None
+ self.required = ["id",]
+
+class activateProjectResponse (baseResponse):
+ def __init__(self):
+ """the id of the project"""
+ self.id = None
+ """the account name of the project's owner"""
+ self.account = None
+ """the total number of cpu cores available to be created for this project"""
+ self.cpuavailable = None
+ """the total number of cpu cores the project can own"""
+ self.cpulimit = None
+ """the total number of cpu cores owned by project"""
+ self.cputotal = None
+ """the displaytext of the project"""
+ self.displaytext = None
+ """the domain name where the project belongs to"""
+ self.domain = None
+ """the domain id the project belongs to"""
+ self.domainid = None
+ """the total number of public ip addresses available for this project to acquire"""
+ self.ipavailable = None
+ """the total number of public ip addresses this project can acquire"""
+ self.iplimit = None
+ """the total number of public ip addresses allocated for this project"""
+ self.iptotal = None
+ """the total memory (in MB) available to be created for this project"""
+ self.memoryavailable = None
+ """the total memory (in MB) the project can own"""
+ self.memorylimit = None
+ """the total memory (in MB) owned by project"""
+ self.memorytotal = None
+ """the name of the project"""
+ self.name = None
+ """the total number of networks available to be created for this project"""
+ self.networkavailable = None
+ """the total number of networks the project can own"""
+ self.networklimit = None
+ """the total number of networks owned by project"""
+ self.networktotal = None
+ """the total primary storage space (in GiB) available to be used for this project"""
+ self.primarystorageavailable = None
+ """the total primary storage space (in GiB) the project can own"""
+ self.primarystoragelimit = None
+ """the total primary storage space (in GiB) owned by project"""
+ self.primarystoragetotal = None
+ """the total secondary storage space (in GiB) available to be used for this project"""
+ self.secondarystorageavailable = None
+ """the total secondary storage space (in GiB) the project can own"""
+ self.secondarystoragelimit = None
+ """the total secondary storage space (in GiB) owned by project"""
+ self.secondarystoragetotal = None
+ """the total number of snapshots available for this project"""
+ self.snapshotavailable = None
+ """the total number of snapshots which can be stored by this project"""
+ self.snapshotlimit = None
+ """the total number of snapshots stored by this project"""
+ self.snapshottotal = None
+ """the state of the project"""
+ self.state = None
+ """the total number of templates available to be created by this project"""
+ self.templateavailable = None
+ """the total number of templates which can be created by this project"""
+ self.templatelimit = None
+ """the total number of templates which have been created by this project"""
+ self.templatetotal = None
+ """the total number of virtual machines available for this project to acquire"""
+ self.vmavailable = None
+ """the total number of virtual machines that can be deployed by this project"""
+ self.vmlimit = None
+ """the total number of virtual machines running for this project"""
+ self.vmrunning = None
+ """the total number of virtual machines stopped for this project"""
+ self.vmstopped = None
+ """the total number of virtual machines deployed by this project"""
+ self.vmtotal = None
+ """the total volume available for this project"""
+ self.volumeavailable = None
+ """the total volume which can be used by this project"""
+ self.volumelimit = None
+ """the total volume being used by this project"""
+ self.volumetotal = None
+ """the total number of vpcs available to be created for this project"""
+ self.vpcavailable = None
+ """the total number of vpcs the project can own"""
+ self.vpclimit = None
+ """the total number of vpcs owned by project"""
+ self.vpctotal = None
+ """the list of resource tags associated with vm"""
+ self.tags = []
+
+class tags:
+ def __init__(self):
+ """"the account associated with the tag"""
+ self.account = None
+ """"customer associated with the tag"""
+ self.customer = None
+ """"the domain associated with the tag"""
+ self.domain = None
+ """"the ID of the domain associated with the tag"""
+ self.domainid = None
+ """"tag key name"""
+ self.key = None
+ """"the project name where tag belongs to"""
+ self.project = None
+ """"the project id the tag belongs to"""
+ self.projectid = None
+ """"id of the resource"""
+ self.resourceid = None
+ """"resource type"""
+ self.resourcetype = None
+ """"tag value"""
+ self.value = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addAccountToProject.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addAccountToProject.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addAccountToProject.py
new file mode 100644
index 0000000..211c58d
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addAccountToProject.py
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Adds acoount to a project"""
+from baseCmd import *
+from baseResponse import *
+class addAccountToProjectCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "true"
+ """id of the project to add the account to"""
+ """Required"""
+ self.projectid = None
+ """name of the account to be added to the project"""
+ self.account = None
+ """email to which invitation to the project is going to be sent"""
+ self.email = None
+ self.required = ["projectid",]
+
+class addAccountToProjectResponse (baseResponse):
+ def __init__(self):
+ """any text associated with the success or failure"""
+ self.displaytext = None
+ """true if operation is executed successfully"""
+ self.success = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalDhcp.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalDhcp.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalDhcp.py
new file mode 100644
index 0000000..fa8b095
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalDhcp.py
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""adds a baremetal dhcp server"""
+from baseCmd import *
+from baseResponse import *
+class addBaremetalDhcpCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "true"
+ """Type of dhcp device"""
+ """Required"""
+ self.dhcpservertype = None
+ """Credentials to reach external dhcp device"""
+ """Required"""
+ self.password = None
+ """the Physical Network ID"""
+ """Required"""
+ self.physicalnetworkid = None
+ """URL of the external dhcp appliance."""
+ """Required"""
+ self.url = None
+ """Credentials to reach external dhcp device"""
+ """Required"""
+ self.username = None
+ self.required = ["dhcpservertype","password","physicalnetworkid","url","username",]
+
+class addBaremetalDhcpResponse (baseResponse):
+ def __init__(self):
+ """device id of"""
+ self.id = None
+ """name of the provider"""
+ self.dhcpservertype = None
+ """the physical network to which this external dhcp device belongs to"""
+ self.physicalnetworkid = None
+ """name of the provider"""
+ self.provider = None
+ """url"""
+ self.url = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalHost.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalHost.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalHost.py
new file mode 100644
index 0000000..6fb003e
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalHost.py
@@ -0,0 +1,147 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""add a baremetal host"""
+from baseCmd import *
+from baseResponse import *
+class addBaremetalHostCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "false"
+ """hypervisor type of the host"""
+ """Required"""
+ self.hypervisor = None
+ """the password for the host"""
+ """Required"""
+ self.password = None
+ """the Pod ID for the host"""
+ """Required"""
+ self.podid = None
+ """the host URL"""
+ """Required"""
+ self.url = None
+ """the username for the host"""
+ """Required"""
+ self.username = None
+ """the Zone ID for the host"""
+ """Required"""
+ self.zoneid = None
+ """Allocation state of this Host for allocation of new resources"""
+ self.allocationstate = None
+ """the cluster ID for the host"""
+ self.clusterid = None
+ """the cluster name for the host"""
+ self.clustername = None
+ """list of tags to be added to the host"""
+ self.hosttags = []
+ """ip address intentionally allocated to this host after provisioning"""
+ self.ipaddress = None
+ self.required = ["hypervisor","password","podid","url","username","zoneid",]
+
+class addBaremetalHostResponse (baseResponse):
+ def __init__(self):
+ """the ID of the host"""
+ self.id = None
+ """the cpu average load on the host"""
+ self.averageload = None
+ """capabilities of the host"""
+ self.capabilities = None
+ """the cluster ID of the host"""
+ self.clusterid = None
+ """the cluster name of the host"""
+ self.clustername = None
+ """the cluster type of the cluster that host belongs to"""
+ self.clustertype = None
+ """the amount of the host's CPU currently allocated"""
+ self.cpuallocated = None
+ """the CPU number of the host"""
+ self.cpunumber = None
+ """the CPU speed of the host"""
+ self.cpuspeed = None
+ """the amount of the host's CPU currently used"""
+ self.cpuused = None
+ """the amount of the host's CPU after applying the cpu.overprovisioning.factor"""
+ self.cpuwithoverprovisioning = None
+ """the date and time the host was created"""
+ self.created = None
+ """true if the host is disconnected. False otherwise."""
+ self.disconnected = None
+ """the host's currently allocated disk size"""
+ self.disksizeallocated = None
+ """the total disk size of the host"""
+ self.disksizetotal = None
+ """events available for the host"""
+ self.events = None
+ """true if the host is Ha host (dedicated to vms started by HA process; false otherwise"""
+ self.hahost = None
+ """true if this host has enough CPU and RAM capacity to migrate a VM to it, false otherwise"""
+ self.hasenoughcapacity = None
+ """comma-separated list of tags for the host"""
+ self.hosttags = None
+ """the host hypervisor"""
+ self.hypervisor = None
+ """the hypervisor version"""
+ self.hypervisorversion = None
+ """the IP address of the host"""
+ self.ipaddress = None
+ """true if local storage is active, false otherwise"""
+ self.islocalstorageactive = None
+ """the date and time the host was last pinged"""
+ self.lastpinged = None
+ """the management server ID of the host"""
+ self.managementserverid = None
+ """the amount of the host's memory currently allocated"""
+ self.memoryallocated = None
+ """the memory total of the host"""
+ self.memorytotal = None
+ """the amount of the host's memory currently used"""
+ self.memoryused = None
+ """the name of the host"""
+ self.name = None
+ """the incoming network traffic on the host"""
+ self.networkkbsread = None
+ """the outgoing network traffic on the host"""
+ self.networkkbswrite = None
+ """the OS category ID of the host"""
+ self.oscategoryid = None
+ """the OS category name of the host"""
+ self.oscategoryname = None
+ """the Pod ID of the host"""
+ self.podid = None
+ """the Pod name of the host"""
+ self.podname = None
+ """the date and time the host was removed"""
+ self.removed = None
+ """the resource state of the host"""
+ self.resourcestate = None
+ """the state of the host"""
+ self.state = None
+ """true if this host is suitable(has enough capacity and satisfies all conditions like hosttags, max guests vm limit etc) to migrate a VM to it , false otherwise"""
+ self.suitableformigration = None
+ """the host type"""
+ self.type = None
+ """the host version"""
+ self.version = None
+ """the Zone ID of the host"""
+ self.zoneid = None
+ """the Zone name of the host"""
+ self.zonename = None
+ """the ID of the latest async job acting on this object"""
+ self.jobid = None
+ """the current status of the latest async job acting on this object"""
+ self.jobstatus = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalPxeKickStartServer.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalPxeKickStartServer.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalPxeKickStartServer.py
new file mode 100644
index 0000000..14a1237
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalPxeKickStartServer.py
@@ -0,0 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""add a baremetal pxe server"""
+from baseCmd import *
+from baseResponse import *
+class addBaremetalPxeKickStartServerCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "true"
+ """Credentials to reach external pxe device"""
+ """Required"""
+ self.password = None
+ """the Physical Network ID"""
+ """Required"""
+ self.physicalnetworkid = None
+ """type of pxe device"""
+ """Required"""
+ self.pxeservertype = None
+ """Tftp root directory of PXE server"""
+ """Required"""
+ self.tftpdir = None
+ """URL of the external pxe device"""
+ """Required"""
+ self.url = None
+ """Credentials to reach external pxe device"""
+ """Required"""
+ self.username = None
+ """Pod Id"""
+ self.podid = None
+ self.required = ["password","physicalnetworkid","pxeservertype","tftpdir","url","username",]
+
+class addBaremetalPxeKickStartServerResponse (baseResponse):
+ def __init__(self):
+ """Tftp root directory of PXE server"""
+ self.tftpdir = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalPxePingServer.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalPxePingServer.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalPxePingServer.py
new file mode 100644
index 0000000..6e3d6bf
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addBaremetalPxePingServer.py
@@ -0,0 +1,65 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""add a baremetal ping pxe server"""
+from baseCmd import *
+from baseResponse import *
+class addBaremetalPxePingServerCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "true"
+ """Credentials to reach external pxe device"""
+ """Required"""
+ self.password = None
+ """the Physical Network ID"""
+ """Required"""
+ self.physicalnetworkid = None
+ """Root directory on PING storage server"""
+ """Required"""
+ self.pingdir = None
+ """PING storage server ip"""
+ """Required"""
+ self.pingstorageserverip = None
+ """type of pxe device"""
+ """Required"""
+ self.pxeservertype = None
+ """Tftp root directory of PXE server"""
+ """Required"""
+ self.tftpdir = None
+ """URL of the external pxe device"""
+ """Required"""
+ self.url = None
+ """Credentials to reach external pxe device"""
+ """Required"""
+ self.username = None
+ """Password of PING storage server"""
+ self.pingcifspassword = None
+ """Username of PING storage server"""
+ self.pingcifsusername = None
+ """Pod Id"""
+ self.podid = None
+ self.required = ["password","physicalnetworkid","pingdir","pingstorageserverip","pxeservertype","tftpdir","url","username",]
+
+class addBaremetalPxePingServerResponse (baseResponse):
+ def __init__(self):
+ """Root directory on PING storage server"""
+ self.pingdir = None
+ """PING storage server ip"""
+ self.pingstorageserverip = None
+ """Tftp root directory of PXE server"""
+ self.tftpdir = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addBigSwitchVnsDevice.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addBigSwitchVnsDevice.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addBigSwitchVnsDevice.py
new file mode 100644
index 0000000..77a7476
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addBigSwitchVnsDevice.py
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Adds a BigSwitch VNS device"""
+from baseCmd import *
+from baseResponse import *
+class addBigSwitchVnsDeviceCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "true"
+ """Hostname of ip address of the BigSwitch VNS Controller."""
+ """Required"""
+ self.hostname = None
+ """the Physical Network ID"""
+ """Required"""
+ self.physicalnetworkid = None
+ self.required = ["hostname","physicalnetworkid",]
+
+class addBigSwitchVnsDeviceResponse (baseResponse):
+ def __init__(self):
+ """device name"""
+ self.bigswitchdevicename = None
+ """the controller Ip address"""
+ self.hostname = None
+ """the physical network to which this BigSwitch Vns belongs to"""
+ self.physicalnetworkid = None
+ """name of the provider"""
+ self.provider = None
+ """device id of the BigSwitch Vns"""
+ self.vnsdeviceid = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addCluster.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addCluster.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addCluster.py
new file mode 100644
index 0000000..26d7f6c
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addCluster.py
@@ -0,0 +1,115 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Adds a new cluster"""
+from baseCmd import *
+from baseResponse import *
+class addClusterCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "false"
+ """the cluster name"""
+ """Required"""
+ self.clustername = None
+ """type of the cluster: CloudManaged, ExternalManaged"""
+ """Required"""
+ self.clustertype = None
+ """hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator"""
+ """Required"""
+ self.hypervisor = None
+ """the Pod ID for the host"""
+ """Required"""
+ self.podid = None
+ """the Zone ID for the cluster"""
+ """Required"""
+ self.zoneid = None
+ """Allocation state of this cluster for allocation of new resources"""
+ self.allocationstate = None
+ """Name of virtual switch used for guest traffic in the cluster. This would override zone wide traffic label setting."""
+ self.guestvswitchname = None
+ """Type of virtual switch used for guest traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)"""
+ self.guestvswitchtype = None
+ """the password for the host"""
+ self.password = None
+ """Name of virtual switch used for public traffic in the cluster. This would override zone wide traffic label setting."""
+ self.publicvswitchname = None
+ """Type of virtual switch used for public traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)"""
+ self.publicvswitchtype = None
+ """the URL"""
+ self.url = None
+ """the username for the cluster"""
+ self.username = None
+ """the ipaddress of the VSM associated with this cluster"""
+ self.vsmipaddress = None
+ """the password for the VSM associated with this cluster"""
+ self.vsmpassword = None
+ """the username for the VSM associated with this cluster"""
+ self.vsmusername = None
+ self.required = ["clustername","clustertype","hypervisor","podid","zoneid",]
+
+class addClusterResponse (baseResponse):
+ def __init__(self):
+ """the cluster ID"""
+ self.id = None
+ """the allocation state of the cluster"""
+ self.allocationstate = None
+ """the type of the cluster"""
+ self.clustertype = None
+ """The cpu overcommit ratio of the cluster"""
+ self.cpuovercommitratio = None
+ """the hypervisor type of the cluster"""
+ self.hypervisortype = None
+ """whether this cluster is managed by cloudstack"""
+ self.managedstate = None
+ """The memory overcommit ratio of the cluster"""
+ self.memoryovercommitratio = None
+ """the cluster name"""
+ self.name = None
+ """the Pod ID of the cluster"""
+ self.podid = None
+ """the Pod name of the cluster"""
+ self.podname = None
+ """the Zone ID of the cluster"""
+ self.zoneid = None
+ """the Zone name of the cluster"""
+ self.zonename = None
+ """the capacity of the Cluster"""
+ self.capacity = []
+
+class capacity:
+ def __init__(self):
+ """"the total capacity available"""
+ self.capacitytotal = None
+ """"the capacity currently in use"""
+ self.capacityused = None
+ """"the Cluster ID"""
+ self.clusterid = None
+ """"the Cluster name"""
+ self.clustername = None
+ """"the percentage of capacity currently in use"""
+ self.percentused = None
+ """"the Pod ID"""
+ self.podid = None
+ """"the Pod name"""
+ self.podname = None
+ """"the capacity type"""
+ self.type = None
+ """"the Zone ID"""
+ self.zoneid = None
+ """"the Zone name"""
+ self.zonename = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addHost.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addHost.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addHost.py
new file mode 100644
index 0000000..c1a96e0
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addHost.py
@@ -0,0 +1,145 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Adds a new host."""
+from baseCmd import *
+from baseResponse import *
+class addHostCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "false"
+ """hypervisor type of the host"""
+ """Required"""
+ self.hypervisor = None
+ """the password for the host"""
+ """Required"""
+ self.password = None
+ """the Pod ID for the host"""
+ """Required"""
+ self.podid = None
+ """the host URL"""
+ """Required"""
+ self.url = None
+ """the username for the host"""
+ """Required"""
+ self.username = None
+ """the Zone ID for the host"""
+ """Required"""
+ self.zoneid = None
+ """Allocation state of this Host for allocation of new resources"""
+ self.allocationstate = None
+ """the cluster ID for the host"""
+ self.clusterid = None
+ """the cluster name for the host"""
+ self.clustername = None
+ """list of tags to be added to the host"""
+ self.hosttags = []
+ self.required = ["hypervisor","password","podid","url","username","zoneid",]
+
+class addHostResponse (baseResponse):
+ def __init__(self):
+ """the ID of the host"""
+ self.id = None
+ """the cpu average load on the host"""
+ self.averageload = None
+ """capabilities of the host"""
+ self.capabilities = None
+ """the cluster ID of the host"""
+ self.clusterid = None
+ """the cluster name of the host"""
+ self.clustername = None
+ """the cluster type of the cluster that host belongs to"""
+ self.clustertype = None
+ """the amount of the host's CPU currently allocated"""
+ self.cpuallocated = None
+ """the CPU number of the host"""
+ self.cpunumber = None
+ """the CPU speed of the host"""
+ self.cpuspeed = None
+ """the amount of the host's CPU currently used"""
+ self.cpuused = None
+ """the amount of the host's CPU after applying the cpu.overprovisioning.factor"""
+ self.cpuwithoverprovisioning = None
+ """the date and time the host was created"""
+ self.created = None
+ """true if the host is disconnected. False otherwise."""
+ self.disconnected = None
+ """the host's currently allocated disk size"""
+ self.disksizeallocated = None
+ """the total disk size of the host"""
+ self.disksizetotal = None
+ """events available for the host"""
+ self.events = None
+ """true if the host is Ha host (dedicated to vms started by HA process; false otherwise"""
+ self.hahost = None
+ """true if this host has enough CPU and RAM capacity to migrate a VM to it, false otherwise"""
+ self.hasenoughcapacity = None
+ """comma-separated list of tags for the host"""
+ self.hosttags = None
+ """the host hypervisor"""
+ self.hypervisor = None
+ """the hypervisor version"""
+ self.hypervisorversion = None
+ """the IP address of the host"""
+ self.ipaddress = None
+ """true if local storage is active, false otherwise"""
+ self.islocalstorageactive = None
+ """the date and time the host was last pinged"""
+ self.lastpinged = None
+ """the management server ID of the host"""
+ self.managementserverid = None
+ """the amount of the host's memory currently allocated"""
+ self.memoryallocated = None
+ """the memory total of the host"""
+ self.memorytotal = None
+ """the amount of the host's memory currently used"""
+ self.memoryused = None
+ """the name of the host"""
+ self.name = None
+ """the incoming network traffic on the host"""
+ self.networkkbsread = None
+ """the outgoing network traffic on the host"""
+ self.networkkbswrite = None
+ """the OS category ID of the host"""
+ self.oscategoryid = None
+ """the OS category name of the host"""
+ self.oscategoryname = None
+ """the Pod ID of the host"""
+ self.podid = None
+ """the Pod name of the host"""
+ self.podname = None
+ """the date and time the host was removed"""
+ self.removed = None
+ """the resource state of the host"""
+ self.resourcestate = None
+ """the state of the host"""
+ self.state = None
+ """true if this host is suitable(has enough capacity and satisfies all conditions like hosttags, max guests vm limit etc) to migrate a VM to it , false otherwise"""
+ self.suitableformigration = None
+ """the host type"""
+ self.type = None
+ """the host version"""
+ self.version = None
+ """the Zone ID of the host"""
+ self.zoneid = None
+ """the Zone name of the host"""
+ self.zonename = None
+ """the ID of the latest async job acting on this object"""
+ self.jobid = None
+ """the current status of the latest async job acting on this object"""
+ self.jobstatus = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addImageStore.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addImageStore.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addImageStore.py
new file mode 100644
index 0000000..c8ea3e2
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addImageStore.py
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Adds backup image store."""
+from baseCmd import *
+from baseResponse import *
+class addImageStoreCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "false"
+ """the image store provider name"""
+ """Required"""
+ self.provider = None
+ """the details for the image store. Example: details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss"""
+ self.details = []
+ """the name for the image store"""
+ self.name = None
+ """the URL for the image store"""
+ self.url = None
+ """the Zone ID for the image store"""
+ self.zoneid = None
+ self.required = ["provider",]
+
+class addImageStoreResponse (baseResponse):
+ def __init__(self):
+ """the ID of the image store"""
+ self.id = None
+ """the details of the image store"""
+ self.details = None
+ """the name of the image store"""
+ self.name = None
+ """the protocol of the image store"""
+ self.protocol = None
+ """the provider name of the image store"""
+ self.providername = None
+ """the scope of the image store"""
+ self.scope = None
+ """the url of the image store"""
+ self.url = None
+ """the Zone ID of the image store"""
+ self.zoneid = None
+ """the Zone name of the image store"""
+ self.zonename = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addIpToNic.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addIpToNic.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addIpToNic.py
new file mode 100644
index 0000000..5810fe8
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addIpToNic.py
@@ -0,0 +1,44 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Assigns secondary IP to NIC"""
+from baseCmd import *
+from baseResponse import *
+class addIpToNicCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "true"
+ """the ID of the nic to which you want to assign private IP"""
+ """Required"""
+ self.nicid = None
+ """Secondary IP Address"""
+ self.ipaddress = None
+ self.required = ["nicid",]
+
+class addIpToNicResponse (baseResponse):
+ def __init__(self):
+ """the ID of the secondary private IP addr"""
+ self.id = None
+ """Secondary IP address"""
+ self.ipaddress = None
+ """the ID of the network"""
+ self.networkid = None
+ """the ID of the nic"""
+ self.nicid = None
+ """the ID of the vm"""
+ self.virtualmachineid = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addLdapConfiguration.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addLdapConfiguration.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addLdapConfiguration.py
new file mode 100644
index 0000000..993108e
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addLdapConfiguration.py
@@ -0,0 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Add a new Ldap Configuration"""
+from baseCmd import *
+from baseResponse import *
+class addLdapConfigurationCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "false"
+ """Hostname"""
+ """Required"""
+ self.hostname = None
+ """Port"""
+ """Required"""
+ self.port = None
+ self.required = ["hostname","port",]
+
+class addLdapConfigurationResponse (baseResponse):
+ def __init__(self):
+ """hostname"""
+ self.hostname = None
+ """port"""
+ self.port = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addNetworkDevice.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addNetworkDevice.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addNetworkDevice.py
new file mode 100644
index 0000000..efd5b08
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addNetworkDevice.py
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Adds a network device of one of the following types: ExternalDhcp, ExternalFirewall, ExternalLoadBalancer, PxeServer"""
+from baseCmd import *
+from baseResponse import *
+class addNetworkDeviceCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "false"
+ """parameters for network device"""
+ self.networkdeviceparameterlist = []
+ """Network device type, now supports ExternalDhcp, PxeServer, NetscalerMPXLoadBalancer, NetscalerVPXLoadBalancer, NetscalerSDXLoadBalancer, F5BigIpLoadBalancer, JuniperSRXFirewall"""
+ self.networkdevicetype = None
+ self.required = []
+
+class addNetworkDeviceResponse (baseResponse):
+ def __init__(self):
+ """the ID of the network device"""
+ self.id = None
+
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/cloudstackAPI/addNetworkServiceProvider.py
----------------------------------------------------------------------
diff --git a/tools/marvin/build/lib/marvin/cloudstackAPI/addNetworkServiceProvider.py b/tools/marvin/build/lib/marvin/cloudstackAPI/addNetworkServiceProvider.py
new file mode 100644
index 0000000..b00c204
--- /dev/null
+++ b/tools/marvin/build/lib/marvin/cloudstackAPI/addNetworkServiceProvider.py
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+"""Adds a network serviceProvider to a physical network"""
+from baseCmd import *
+from baseResponse import *
+class addNetworkServiceProviderCmd (baseCmd):
+ def __init__(self):
+ self.isAsync = "true"
+ """the name for the physical network service provider"""
+ """Required"""
+ self.name = None
+ """the Physical Network ID to add the provider to"""
+ """Required"""
+ self.physicalnetworkid = None
+ """the destination Physical Network ID to bridge to"""
+ self.destinationphysicalnetworkid = None
+ """the list of services to be enabled for this physical network service provider"""
+ self.servicelist = []
+ self.required = ["name","physicalnetworkid",]
+
+class addNetworkServiceProviderResponse (baseResponse):
+ def __init__(self):
+ """uuid of the network provider"""
+ self.id = None
+ """true if individual services can be enabled/disabled"""
+ self.canenableindividualservice = None
+ """the destination physical network"""
+ self.destinationphysicalnetworkid = None
+ """the provider name"""
+ self.name = None
+ """the physical network this belongs to"""
+ self.physicalnetworkid = None
+ """services for this provider"""
+ self.servicelist = None
+ """state of the network provider"""
+ self.state = None
+