marvin_refactor: add body to all the entities in base

- don't do package import of cloudstackentity
- create() and list() method will return obj(s) of type(Entity)

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2013-01-28 19:15:18 +05:30
parent 93438f2df0
commit fa00dc9f9b
113 changed files with 2271 additions and 528 deletions

View File

@ -14,36 +14,69 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import enableAccount
from marvin.cloudstackAPI import lockAccount
from marvin.cloudstackAPI import createAccount
from marvin.cloudstackAPI import listAccounts
from marvin.cloudstackAPI import updateAccount
from marvin.cloudstackAPI import disableAccount
from marvin.cloudstackAPI import deleteAccount
class Account(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def enable(self, apiclient, **kwargs):
pass
cmd = enableAccount.enableAccountCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
account = apiclient.enableAccount(cmd)
def lock(self, apiclient, account, domainid, **kwargs):
pass
cmd = lockAccount.lockAccountCmd()
cmd.account = account
cmd.domainid = domainid
[setattr(cmd, key, value) for key,value in kwargs.items]
account = apiclient.lockAccount(cmd)
@classmethod
def create(cls, apiclient, AccountFactory, **kwargs):
cmd = createAccount.createAccountCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in AccountFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
return Account(apiclient.createAccount(cmd).__dict__)
account = apiclient.createAccount(cmd)
return Account(account.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listAccounts.listAccountsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
account = apiclient.listAccounts(cmd)
return map(lambda e: Account(e.__dict__), account)
def update(self, apiclient, newname, **kwargs):
pass
cmd = updateAccount.updateAccountCmd()
cmd.newname = newname
[setattr(cmd, key, value) for key,value in kwargs.items]
account = apiclient.updateAccount(cmd)
def disable(self, apiclient, lock, **kwargs):
pass
cmd = disableAccount.disableAccountCmd()
cmd.lock = lock
[setattr(cmd, key, value) for key,value in kwargs.items]
account = apiclient.disableAccount(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteAccount.deleteAccountCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
account = apiclient.deleteAccount(cmd)

View File

@ -14,12 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import deleteAccountFromProject
class AccountFromProject(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def delete(self, apiclient, projectid, account, **kwargs):
pass
cmd = deleteAccountFromProject.deleteAccountFromProjectCmd()
cmd.account = account
cmd.projectid = projectid
[setattr(cmd, key, value) for key,value in kwargs.items]
accountfromproject = apiclient.deleteAccountFromProject(cmd)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addAccountToProject
class AccountToProject(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, projectid, **kwargs):
pass
cmd = addAccountToProject.addAccountToProjectCmd()
cmd.projectid = projectid
[setattr(cmd, key, value) for key,value in kwargs.items]
accounttoproject = apiclient.addAccountToProject(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listAlerts
class Alerts(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listAlerts.listAlertsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
alerts = apiclient.listAlerts(cmd)
return map(lambda e: Alerts(e.__dict__), alerts)

View File

@ -14,15 +14,25 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import resetApiLimit
from marvin.cloudstackAPI import getApiLimit
class ApiLimit(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def reset(self, apiclient, **kwargs):
pass
cmd = resetApiLimit.resetApiLimitCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
apilimit = apiclient.resetApiLimit(cmd)
def get(self, apiclient, **kwargs):
cmd = getApiLimit.getApiLimitCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
apilimit = apiclient.getApiLimit(cmd)
def get(self, apiclient):
pass

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listApis
class Apis(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listApis.listApisCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
apis = apiclient.listApis(cmd)
return map(lambda e: Apis(e.__dict__), apis)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import queryAsyncJobResult
class AsyncJobResult(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def query(self, apiclient, jobid, **kwargs):
pass
cmd = queryAsyncJobResult.queryAsyncJobResultCmd()
cmd.jobid = jobid
[setattr(cmd, key, value) for key,value in kwargs.items]
asyncjobresult = apiclient.queryAsyncJobResult(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listAsyncJobs
class AsyncJobs(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listAsyncJobs.listAsyncJobsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
asyncjobs = apiclient.listAsyncJobs(cmd)
return map(lambda e: AsyncJobs(e.__dict__), asyncjobs)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listAutoScalePolicies
class AutoScalePolicies(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listAutoScalePolicies.listAutoScalePoliciesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalepolicies = apiclient.listAutoScalePolicies(cmd)
return map(lambda e: AutoScalePolicies(e.__dict__), autoscalepolicies)

View File

@ -14,19 +14,36 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createAutoScalePolicy
from marvin.cloudstackAPI import updateAutoScalePolicy
from marvin.cloudstackAPI import deleteAutoScalePolicy
class AutoScalePolicy(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, AutoScalePolicyFactory, **kwargs):
pass
cmd = createAutoScalePolicy.createAutoScalePolicyCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in AutoScalePolicyFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalepolicy = apiclient.createAutoScalePolicy(cmd)
return AutoScalePolicy(autoscalepolicy.__dict__)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateAutoScalePolicy.updateAutoScalePolicyCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalepolicy = apiclient.updateAutoScalePolicy(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteAutoScalePolicy.deleteAutoScalePolicyCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalepolicy = apiclient.deleteAutoScalePolicy(cmd)

View File

@ -14,29 +14,61 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import enableAutoScaleVmGroup
from marvin.cloudstackAPI import createAutoScaleVmGroup
from marvin.cloudstackAPI import listAutoScaleVmGroups
from marvin.cloudstackAPI import updateAutoScaleVmGroup
from marvin.cloudstackAPI import disableAutoScaleVmGroup
from marvin.cloudstackAPI import deleteAutoScaleVmGroup
class AutoScaleVmGroup(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def enable(self, apiclient, id, **kwargs):
pass
cmd = enableAutoScaleVmGroup.enableAutoScaleVmGroupCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmgroup = apiclient.enableAutoScaleVmGroup(cmd)
@classmethod
def create(cls, apiclient, AutoScaleVmGroupFactory, **kwargs):
pass
cmd = createAutoScaleVmGroup.createAutoScaleVmGroupCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in AutoScaleVmGroupFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmgroup = apiclient.createAutoScaleVmGroup(cmd)
return AutoScaleVmGroup(autoscalevmgroup.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listAutoScaleVmGroups.listAutoScaleVmGroupsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmgroup = apiclient.listAutoScaleVmGroups(cmd)
return map(lambda e: AutoScaleVmGroup(e.__dict__), autoscalevmgroup)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateAutoScaleVmGroup.updateAutoScaleVmGroupCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmgroup = apiclient.updateAutoScaleVmGroup(cmd)
def disable(self, apiclient, id, **kwargs):
pass
cmd = disableAutoScaleVmGroup.disableAutoScaleVmGroupCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmgroup = apiclient.disableAutoScaleVmGroup(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteAutoScaleVmGroup.deleteAutoScaleVmGroupCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmgroup = apiclient.deleteAutoScaleVmGroup(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createAutoScaleVmProfile
from marvin.cloudstackAPI import listAutoScaleVmProfiles
from marvin.cloudstackAPI import updateAutoScaleVmProfile
from marvin.cloudstackAPI import deleteAutoScaleVmProfile
class AutoScaleVmProfile(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, AutoScaleVmProfileFactory, **kwargs):
pass
cmd = createAutoScaleVmProfile.createAutoScaleVmProfileCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in AutoScaleVmProfileFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmprofile = apiclient.createAutoScaleVmProfile(cmd)
return AutoScaleVmProfile(autoscalevmprofile.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listAutoScaleVmProfiles.listAutoScaleVmProfilesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmprofile = apiclient.listAutoScaleVmProfiles(cmd)
return map(lambda e: AutoScaleVmProfile(e.__dict__), autoscalevmprofile)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateAutoScaleVmProfile.updateAutoScaleVmProfileCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmprofile = apiclient.updateAutoScaleVmProfile(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteAutoScaleVmProfile.deleteAutoScaleVmProfileCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
autoscalevmprofile = apiclient.deleteAutoScaleVmProfile(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listCapabilities
class Capabilities(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient):
pass
def list(self, apiclient, **kwargs):
cmd = listCapabilities.listCapabilitiesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
capabilities = apiclient.listCapabilities(cmd)
return map(lambda e: Capabilities(e.__dict__), capabilities)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listCapacity
class Capacity(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listCapacity.listCapacityCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
capacity = apiclient.listCapacity(cmd)
return map(lambda e: Capacity(e.__dict__), capacity)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import getCloudIdentifier
class CloudIdentifier(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def get(self, apiclient, userid, **kwargs):
pass
cmd = getCloudIdentifier.getCloudIdentifierCmd()
cmd.userid = userid
[setattr(cmd, key, value) for key,value in kwargs.items]
cloudidentifier = apiclient.getCloudIdentifier(cmd)

View File

@ -14,22 +14,47 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addCluster
from marvin.cloudstackAPI import listClusters
from marvin.cloudstackAPI import updateCluster
from marvin.cloudstackAPI import deleteCluster
class Cluster(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, clustername, hypervisor, zoneid, clustertype, podid, **kwargs):
pass
cmd = addCluster.addClusterCmd()
cmd.clustername = clustername
cmd.clustertype = clustertype
cmd.hypervisor = hypervisor
cmd.podid = podid
cmd.zoneid = zoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
cluster = apiclient.addCluster(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listClusters.listClustersCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
cluster = apiclient.listClusters(cmd)
return map(lambda e: Cluster(e.__dict__), cluster)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateCluster.updateClusterCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
cluster = apiclient.updateCluster(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteCluster.deleteClusterCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
cluster = apiclient.deleteCluster(cmd)

View File

@ -14,20 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createCondition
from marvin.cloudstackAPI import listConditions
from marvin.cloudstackAPI import deleteCondition
class Condition(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, ConditionFactory, **kwargs):
pass
cmd = createCondition.createConditionCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in ConditionFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
condition = apiclient.createCondition(cmd)
return Condition(condition.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listConditions.listConditionsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
condition = apiclient.listConditions(cmd)
return map(lambda e: Condition(e.__dict__), condition)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteCondition.deleteConditionCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
condition = apiclient.deleteCondition(cmd)

View File

@ -14,12 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import ldapConfig
class Config(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def ldap(self, apiclient, queryfilter, hostname, searchbase, **kwargs):
pass
cmd = ldapConfig.ldapConfigCmd()
cmd.hostname = hostname
cmd.queryfilter = queryfilter
cmd.searchbase = searchbase
[setattr(cmd, key, value) for key,value in kwargs.items]
config = apiclient.ldapConfig(cmd)

View File

@ -14,16 +14,27 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listConfigurations
from marvin.cloudstackAPI import updateConfiguration
class Configuration(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listConfigurations.listConfigurationsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
configuration = apiclient.listConfigurations(cmd)
return map(lambda e: Configuration(e.__dict__), configuration)
def update(self, apiclient, name, **kwargs):
pass
cmd = updateConfiguration.updateConfigurationCmd()
cmd.name = name
[setattr(cmd, key, value) for key,value in kwargs.items]
configuration = apiclient.updateConfiguration(cmd)

View File

@ -14,20 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createCounter
from marvin.cloudstackAPI import listCounters
from marvin.cloudstackAPI import deleteCounter
class Counter(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, CounterFactory, **kwargs):
pass
cmd = createCounter.createCounterCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in CounterFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
counter = apiclient.createCounter(cmd)
return Counter(counter.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listCounters.listCountersCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
counter = apiclient.listCounters(cmd)
return map(lambda e: Counter(e.__dict__), counter)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteCounter.deleteCounterCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
counter = apiclient.deleteCounter(cmd)

View File

@ -14,12 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import uploadCustomCertificate
class CustomCertificate(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def upload(self, apiclient, domainsuffix, certificate, **kwargs):
pass
cmd = uploadCustomCertificate.uploadCustomCertificateCmd()
cmd.certificate = certificate
cmd.domainsuffix = domainsuffix
[setattr(cmd, key, value) for key,value in kwargs.items]
customcertificate = apiclient.uploadCustomCertificate(cmd)

View File

@ -14,12 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import markDefaultZoneForAccount
class DefaultZoneForAccount(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def mark(self, apiclient, account, domainid, zoneid, **kwargs):
pass
cmd = markDefaultZoneForAccount.markDefaultZoneForAccountCmd()
cmd.account = account
cmd.domainid = domainid
cmd.zoneid = zoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
defaultzoneforaccount = apiclient.markDefaultZoneForAccount(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createDiskOffering
from marvin.cloudstackAPI import listDiskOfferings
from marvin.cloudstackAPI import updateDiskOffering
from marvin.cloudstackAPI import deleteDiskOffering
class DiskOffering(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, DiskOfferingFactory, **kwargs):
pass
cmd = createDiskOffering.createDiskOfferingCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in DiskOfferingFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
diskoffering = apiclient.createDiskOffering(cmd)
return DiskOffering(diskoffering.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listDiskOfferings.listDiskOfferingsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
diskoffering = apiclient.listDiskOfferings(cmd)
return map(lambda e: DiskOffering(e.__dict__), diskoffering)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateDiskOffering.updateDiskOfferingCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
diskoffering = apiclient.updateDiskOffering(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteDiskOffering.deleteDiskOfferingCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
diskoffering = apiclient.deleteDiskOffering(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createDomain
from marvin.cloudstackAPI import listDomains
from marvin.cloudstackAPI import updateDomain
from marvin.cloudstackAPI import deleteDomain
class Domain(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, DomainFactory, **kwargs):
pass
cmd = createDomain.createDomainCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in DomainFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
domain = apiclient.createDomain(cmd)
return Domain(domain.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listDomains.listDomainsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
domain = apiclient.listDomains(cmd)
return map(lambda e: Domain(e.__dict__), domain)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateDomain.updateDomainCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
domain = apiclient.updateDomain(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteDomain.deleteDomainCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
domain = apiclient.deleteDomain(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listDomainChildren
class DomainChildren(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listDomainChildren.listDomainChildrenCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
domainchildren = apiclient.listDomainChildren(cmd)
return map(lambda e: DomainChildren(e.__dict__), domainchildren)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listEventTypes
class EventTypes(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient):
pass
def list(self, apiclient, **kwargs):
cmd = listEventTypes.listEventTypesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
eventtypes = apiclient.listEventTypes(cmd)
return map(lambda e: EventTypes(e.__dict__), eventtypes)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listEvents
class Events(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listEvents.listEventsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
events = apiclient.listEvents(cmd)
return map(lambda e: Events(e.__dict__), events)

View File

@ -14,20 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createFirewallRule
from marvin.cloudstackAPI import listFirewallRules
from marvin.cloudstackAPI import deleteFirewallRule
class FirewallRule(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, FirewallRuleFactory, **kwargs):
pass
cmd = createFirewallRule.createFirewallRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in FirewallRuleFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
firewallrule = apiclient.createFirewallRule(cmd)
return FirewallRule(firewallrule.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listFirewallRules.listFirewallRulesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
firewallrule = apiclient.listFirewallRules(cmd)
return map(lambda e: FirewallRule(e.__dict__), firewallrule)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteFirewallRule.deleteFirewallRuleCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
firewallrule = apiclient.deleteFirewallRule(cmd)

View File

@ -14,12 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import removeFromLoadBalancerRule
class FromLoadBalancerRule(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def remove(self, apiclient, id, virtualmachineids, **kwargs):
pass
cmd = removeFromLoadBalancerRule.removeFromLoadBalancerRuleCmd()
cmd.id = id
cmd.virtualmachineids = virtualmachineids
[setattr(cmd, key, value) for key,value in kwargs.items]
fromloadbalancerrule = apiclient.removeFromLoadBalancerRule(cmd)

View File

@ -14,25 +14,56 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addHost
from marvin.cloudstackAPI import listHosts
from marvin.cloudstackAPI import updateHost
from marvin.cloudstackAPI import reconnectHost
from marvin.cloudstackAPI import deleteHost
class Host(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, username, podid, url, hypervisor, zoneid, password, **kwargs):
pass
cmd = addHost.addHostCmd()
cmd.hypervisor = hypervisor
cmd.password = password
cmd.podid = podid
cmd.url = url
cmd.username = username
cmd.zoneid = zoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
host = apiclient.addHost(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listHosts.listHostsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
host = apiclient.listHosts(cmd)
return map(lambda e: Host(e.__dict__), host)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateHost.updateHostCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
host = apiclient.updateHost(cmd)
def reconnect(self, apiclient, id, **kwargs):
pass
cmd = reconnectHost.reconnectHostCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
host = apiclient.reconnectHost(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteHost.deleteHostCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
host = apiclient.deleteHost(cmd)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import prepareHostForMaintenance
class HostForMaintenance(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def prepare(self, apiclient, id, **kwargs):
pass
cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
hostformaintenance = apiclient.prepareHostForMaintenance(cmd)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import cancelHostMaintenance
class HostMaintenance(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def cancel(self, apiclient, id, **kwargs):
pass
cmd = cancelHostMaintenance.cancelHostMaintenanceCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
hostmaintenance = apiclient.cancelHostMaintenance(cmd)

View File

@ -14,12 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import updateHostPassword
class HostPassword(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def update(self, apiclient, username, password, **kwargs):
pass
cmd = updateHostPassword.updateHostPasswordCmd()
cmd.password = password
cmd.username = username
[setattr(cmd, key, value) for key,value in kwargs.items]
hostpassword = apiclient.updateHostPassword(cmd)

View File

@ -14,16 +14,26 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listHypervisorCapabilities
from marvin.cloudstackAPI import updateHypervisorCapabilities
class HypervisorCapabilities(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listHypervisorCapabilities.listHypervisorCapabilitiesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
hypervisorcapabilities = apiclient.listHypervisorCapabilities(cmd)
return map(lambda e: HypervisorCapabilities(e.__dict__), hypervisorcapabilities)
def update(self, apiclient, **kwargs):
pass
cmd = updateHypervisorCapabilities.updateHypervisorCapabilitiesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
hypervisorcapabilities = apiclient.updateHypervisorCapabilities(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listHypervisors
class Hypervisors(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listHypervisors.listHypervisorsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
hypervisors = apiclient.listHypervisors(cmd)
return map(lambda e: Hypervisors(e.__dict__), hypervisors)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createInstanceGroup
from marvin.cloudstackAPI import listInstanceGroups
from marvin.cloudstackAPI import updateInstanceGroup
from marvin.cloudstackAPI import deleteInstanceGroup
class InstanceGroup(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, InstanceGroupFactory, **kwargs):
pass
cmd = createInstanceGroup.createInstanceGroupCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in InstanceGroupFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
instancegroup = apiclient.createInstanceGroup(cmd)
return InstanceGroup(instancegroup.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listInstanceGroups.listInstanceGroupsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
instancegroup = apiclient.listInstanceGroups(cmd)
return map(lambda e: InstanceGroup(e.__dict__), instancegroup)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateInstanceGroup.updateInstanceGroupCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
instancegroup = apiclient.updateInstanceGroup(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteInstanceGroup.deleteInstanceGroupCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
instancegroup = apiclient.deleteInstanceGroup(cmd)

View File

@ -14,15 +14,25 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import disassociateIpAddress
from marvin.cloudstackAPI import associateIpAddress
class IpAddress(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def disassociate(self, apiclient, id, **kwargs):
pass
cmd = disassociateIpAddress.disassociateIpAddressCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
ipaddress = apiclient.disassociateIpAddress(cmd)
def associate(self, apiclient, **kwargs):
pass
cmd = associateIpAddress.associateIpAddressCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
ipaddress = apiclient.associateIpAddress(cmd)

View File

@ -14,20 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createIpForwardingRule
from marvin.cloudstackAPI import listIpForwardingRules
from marvin.cloudstackAPI import deleteIpForwardingRule
class IpForwardingRule(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, IpForwardingRuleFactory, **kwargs):
pass
cmd = createIpForwardingRule.createIpForwardingRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in IpForwardingRuleFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
ipforwardingrule = apiclient.createIpForwardingRule(cmd)
return IpForwardingRule(ipforwardingrule.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listIpForwardingRules.listIpForwardingRulesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
ipforwardingrule = apiclient.listIpForwardingRules(cmd)
return map(lambda e: IpForwardingRule(e.__dict__), ipforwardingrule)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteIpForwardingRule.deleteIpForwardingRuleCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
ipforwardingrule = apiclient.deleteIpForwardingRule(cmd)

View File

@ -14,34 +14,82 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import copyIso
from marvin.cloudstackAPI import registerIso
from marvin.cloudstackAPI import listIsos
from marvin.cloudstackAPI import updateIso
from marvin.cloudstackAPI import attachIso
from marvin.cloudstackAPI import detachIso
from marvin.cloudstackAPI import extractIso
from marvin.cloudstackAPI import deleteIso
class Iso(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def copy(self, apiclient, sourcezoneid, id, destzoneid, **kwargs):
pass
cmd = copyIso.copyIsoCmd()
cmd.id = id
cmd.destzoneid = destzoneid
cmd.sourcezoneid = sourcezoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
iso = apiclient.copyIso(cmd)
def register(self, apiclient, url, displaytext, name, zoneid, **kwargs):
pass
cmd = registerIso.registerIsoCmd()
cmd.displaytext = displaytext
cmd.name = name
cmd.url = url
cmd.zoneid = zoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
iso = apiclient.registerIso(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listIsos.listIsosCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
iso = apiclient.listIsos(cmd)
return map(lambda e: Iso(e.__dict__), iso)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateIso.updateIsoCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
iso = apiclient.updateIso(cmd)
def attach(self, apiclient, id, virtualmachineid, **kwargs):
pass
cmd = attachIso.attachIsoCmd()
cmd.id = id
cmd.virtualmachineid = virtualmachineid
[setattr(cmd, key, value) for key,value in kwargs.items]
iso = apiclient.attachIso(cmd)
def detach(self, apiclient, virtualmachineid, **kwargs):
pass
cmd = detachIso.detachIsoCmd()
cmd.virtualmachineid = virtualmachineid
[setattr(cmd, key, value) for key,value in kwargs.items]
iso = apiclient.detachIso(cmd)
def extract(self, apiclient, id, mode, **kwargs):
pass
cmd = extractIso.extractIsoCmd()
cmd.id = id
cmd.mode = mode
[setattr(cmd, key, value) for key,value in kwargs.items]
iso = apiclient.extractIso(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteIso.deleteIsoCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
iso = apiclient.deleteIso(cmd)

View File

@ -14,16 +14,28 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listIsoPermissions
from marvin.cloudstackAPI import updateIsoPermissions
class IsoPermissions(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, id, **kwargs):
cmd = listIsoPermissions.listIsoPermissionsCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
isopermissions = apiclient.listIsoPermissions(cmd)
return map(lambda e: IsoPermissions(e.__dict__), isopermissions)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateIsoPermissions.updateIsoPermissionsCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
isopermissions = apiclient.updateIsoPermissions(cmd)

View File

@ -14,13 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listLBStickinessPolicies
class LBStickinessPolicies(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, lbruleid, **kwargs):
cmd = listLBStickinessPolicies.listLBStickinessPoliciesCmd()
cmd.lbruleid = lbruleid
[setattr(cmd, key, value) for key,value in kwargs.items]
lbstickinesspolicies = apiclient.listLBStickinessPolicies(cmd)
return map(lambda e: LBStickinessPolicies(e.__dict__), lbstickinesspolicies)

View File

@ -14,16 +14,28 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createLBStickinessPolicy
from marvin.cloudstackAPI import deleteLBStickinessPolicy
class LBStickinessPolicy(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, LBStickinessPolicyFactory, **kwargs):
pass
cmd = createLBStickinessPolicy.createLBStickinessPolicyCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in LBStickinessPolicyFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
lbstickinesspolicy = apiclient.createLBStickinessPolicy(cmd)
return LBStickinessPolicy(lbstickinesspolicy.__dict__)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteLBStickinessPolicy.deleteLBStickinessPolicyCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
lbstickinesspolicy = apiclient.deleteLBStickinessPolicy(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createLoadBalancerRule
from marvin.cloudstackAPI import listLoadBalancerRules
from marvin.cloudstackAPI import updateLoadBalancerRule
from marvin.cloudstackAPI import deleteLoadBalancerRule
class LoadBalancerRule(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, LoadBalancerRuleFactory, **kwargs):
pass
cmd = createLoadBalancerRule.createLoadBalancerRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in LoadBalancerRuleFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
loadbalancerrule = apiclient.createLoadBalancerRule(cmd)
return LoadBalancerRule(loadbalancerrule.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listLoadBalancerRules.listLoadBalancerRulesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
loadbalancerrule = apiclient.listLoadBalancerRules(cmd)
return map(lambda e: LoadBalancerRule(e.__dict__), loadbalancerrule)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateLoadBalancerRule.updateLoadBalancerRuleCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
loadbalancerrule = apiclient.updateLoadBalancerRule(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteLoadBalancerRule.deleteLoadBalancerRuleCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
loadbalancerrule = apiclient.deleteLoadBalancerRule(cmd)

View File

@ -14,13 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listLoadBalancerRuleInstances
class LoadBalancerRuleInstances(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, id, **kwargs):
cmd = listLoadBalancerRuleInstances.listLoadBalancerRuleInstancesCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
loadbalancerruleinstances = apiclient.listLoadBalancerRuleInstances(cmd)
return map(lambda e: LoadBalancerRuleInstances(e.__dict__), loadbalancerruleinstances)

View File

@ -14,26 +14,53 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createNetwork
from marvin.cloudstackAPI import listNetworks
from marvin.cloudstackAPI import updateNetwork
from marvin.cloudstackAPI import restartNetwork
from marvin.cloudstackAPI import deleteNetwork
class Network(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, NetworkFactory, **kwargs):
pass
cmd = createNetwork.createNetworkCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in NetworkFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
network = apiclient.createNetwork(cmd)
return Network(network.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listNetworks.listNetworksCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
network = apiclient.listNetworks(cmd)
return map(lambda e: Network(e.__dict__), network)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateNetwork.updateNetworkCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
network = apiclient.updateNetwork(cmd)
def restart(self, apiclient, id, **kwargs):
pass
cmd = restartNetwork.restartNetworkCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
network = apiclient.restartNetwork(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteNetwork.deleteNetworkCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
network = apiclient.deleteNetwork(cmd)

View File

@ -14,20 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createNetworkACL
from marvin.cloudstackAPI import listNetworkACLs
from marvin.cloudstackAPI import deleteNetworkACL
class NetworkACL(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, NetworkACLFactory, **kwargs):
pass
cmd = createNetworkACL.createNetworkACLCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in NetworkACLFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
networkacl = apiclient.createNetworkACL(cmd)
return NetworkACL(networkacl.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listNetworkACLs.listNetworkACLsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
networkacl = apiclient.listNetworkACLs(cmd)
return map(lambda e: NetworkACL(e.__dict__), networkacl)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteNetworkACL.deleteNetworkACLCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
networkacl = apiclient.deleteNetworkACL(cmd)

View File

@ -14,19 +14,34 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addNetworkDevice
from marvin.cloudstackAPI import listNetworkDevice
from marvin.cloudstackAPI import deleteNetworkDevice
class NetworkDevice(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, **kwargs):
pass
cmd = addNetworkDevice.addNetworkDeviceCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
networkdevice = apiclient.addNetworkDevice(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listNetworkDevice.listNetworkDeviceCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
networkdevice = apiclient.listNetworkDevice(cmd)
return map(lambda e: NetworkDevice(e.__dict__), networkdevice)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteNetworkDevice.deleteNetworkDeviceCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
networkdevice = apiclient.deleteNetworkDevice(cmd)

View File

@ -14,23 +14,44 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createNetworkOffering
from marvin.cloudstackAPI import listNetworkOfferings
from marvin.cloudstackAPI import updateNetworkOffering
from marvin.cloudstackAPI import deleteNetworkOffering
class NetworkOffering(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, NetworkOfferingFactory, **kwargs):
pass
cmd = createNetworkOffering.createNetworkOfferingCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in NetworkOfferingFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
networkoffering = apiclient.createNetworkOffering(cmd)
return NetworkOffering(networkoffering.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listNetworkOfferings.listNetworkOfferingsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
networkoffering = apiclient.listNetworkOfferings(cmd)
return map(lambda e: NetworkOffering(e.__dict__), networkoffering)
def update(self, apiclient, **kwargs):
pass
cmd = updateNetworkOffering.updateNetworkOfferingCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
networkoffering = apiclient.updateNetworkOffering(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteNetworkOffering.deleteNetworkOfferingCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
networkoffering = apiclient.deleteNetworkOffering(cmd)

View File

@ -14,22 +14,44 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addNetworkServiceProvider
from marvin.cloudstackAPI import listNetworkServiceProviders
from marvin.cloudstackAPI import updateNetworkServiceProvider
from marvin.cloudstackAPI import deleteNetworkServiceProvider
class NetworkServiceProvider(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, physicalnetworkid, name, **kwargs):
pass
cmd = addNetworkServiceProvider.addNetworkServiceProviderCmd()
cmd.name = name
cmd.physicalnetworkid = physicalnetworkid
[setattr(cmd, key, value) for key,value in kwargs.items]
networkserviceprovider = apiclient.addNetworkServiceProvider(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listNetworkServiceProviders.listNetworkServiceProvidersCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
networkserviceprovider = apiclient.listNetworkServiceProviders(cmd)
return map(lambda e: NetworkServiceProvider(e.__dict__), networkserviceprovider)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateNetworkServiceProvider.updateNetworkServiceProviderCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
networkserviceprovider = apiclient.updateNetworkServiceProvider(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteNetworkServiceProvider.deleteNetworkServiceProviderCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
networkserviceprovider = apiclient.deleteNetworkServiceProvider(cmd)

View File

@ -14,19 +14,39 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addNiciraNvpDevice
from marvin.cloudstackAPI import listNiciraNvpDevices
from marvin.cloudstackAPI import deleteNiciraNvpDevice
class NiciraNvpDevice(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, username, physicalnetworkid, password, hostname, transportzoneuuid, **kwargs):
pass
cmd = addNiciraNvpDevice.addNiciraNvpDeviceCmd()
cmd.hostname = hostname
cmd.password = password
cmd.physicalnetworkid = physicalnetworkid
cmd.transportzoneuuid = transportzoneuuid
cmd.username = username
[setattr(cmd, key, value) for key,value in kwargs.items]
niciranvpdevice = apiclient.addNiciraNvpDevice(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listNiciraNvpDevices.listNiciraNvpDevicesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
niciranvpdevice = apiclient.listNiciraNvpDevices(cmd)
return map(lambda e: NiciraNvpDevice(e.__dict__), niciranvpdevice)
def delete(self, apiclient, nvpdeviceid, **kwargs):
pass
cmd = deleteNiciraNvpDevice.deleteNiciraNvpDeviceCmd()
cmd.nvpdeviceid = nvpdeviceid
[setattr(cmd, key, value) for key,value in kwargs.items]
niciranvpdevice = apiclient.deleteNiciraNvpDevice(cmd)

View File

@ -14,13 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listNiciraNvpDeviceNetworks
class NiciraNvpDeviceNetworks(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, nvpdeviceid, **kwargs):
cmd = listNiciraNvpDeviceNetworks.listNiciraNvpDeviceNetworksCmd()
cmd.nvpdeviceid = nvpdeviceid
[setattr(cmd, key, value) for key,value in kwargs.items]
niciranvpdevicenetworks = apiclient.listNiciraNvpDeviceNetworks(cmd)
return map(lambda e: NiciraNvpDeviceNetworks(e.__dict__), niciranvpdevicenetworks)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listOsCategories
class OsCategories(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listOsCategories.listOsCategoriesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
oscategories = apiclient.listOsCategories(cmd)
return map(lambda e: OsCategories(e.__dict__), oscategories)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listOsTypes
class OsTypes(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listOsTypes.listOsTypesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
ostypes = apiclient.listOsTypes(cmd)
return map(lambda e: OsTypes(e.__dict__), ostypes)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import resetPasswordForVirtualMachine
class PasswordForVirtualMachine(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def reset(self, apiclient, id, **kwargs):
pass
cmd = resetPasswordForVirtualMachine.resetPasswordForVirtualMachineCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
passwordforvirtualmachine = apiclient.resetPasswordForVirtualMachine(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createPhysicalNetwork
from marvin.cloudstackAPI import listPhysicalNetworks
from marvin.cloudstackAPI import updatePhysicalNetwork
from marvin.cloudstackAPI import deletePhysicalNetwork
class PhysicalNetwork(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, PhysicalNetworkFactory, **kwargs):
pass
cmd = createPhysicalNetwork.createPhysicalNetworkCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in PhysicalNetworkFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
physicalnetwork = apiclient.createPhysicalNetwork(cmd)
return PhysicalNetwork(physicalnetwork.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listPhysicalNetworks.listPhysicalNetworksCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
physicalnetwork = apiclient.listPhysicalNetworks(cmd)
return map(lambda e: PhysicalNetwork(e.__dict__), physicalnetwork)
def update(self, apiclient, id, **kwargs):
pass
cmd = updatePhysicalNetwork.updatePhysicalNetworkCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
physicalnetwork = apiclient.updatePhysicalNetwork(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deletePhysicalNetwork.deletePhysicalNetworkCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
physicalnetwork = apiclient.deletePhysicalNetwork(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createPod
from marvin.cloudstackAPI import listPods
from marvin.cloudstackAPI import updatePod
from marvin.cloudstackAPI import deletePod
class Pod(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, PodFactory, **kwargs):
pass
cmd = createPod.createPodCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in PodFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
pod = apiclient.createPod(cmd)
return Pod(pod.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listPods.listPodsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
pod = apiclient.listPods(cmd)
return map(lambda e: Pod(e.__dict__), pod)
def update(self, apiclient, id, **kwargs):
pass
cmd = updatePod.updatePodCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
pod = apiclient.updatePod(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deletePod.deletePodCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
pod = apiclient.deletePod(cmd)

View File

@ -14,23 +14,48 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createPortForwardingRule
from marvin.cloudstackAPI import listPortForwardingRules
from marvin.cloudstackAPI import updatePortForwardingRule
from marvin.cloudstackAPI import deletePortForwardingRule
class PortForwardingRule(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, PortForwardingRuleFactory, **kwargs):
pass
cmd = createPortForwardingRule.createPortForwardingRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in PortForwardingRuleFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
portforwardingrule = apiclient.createPortForwardingRule(cmd)
return PortForwardingRule(portforwardingrule.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listPortForwardingRules.listPortForwardingRulesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
portforwardingrule = apiclient.listPortForwardingRules(cmd)
return map(lambda e: PortForwardingRule(e.__dict__), portforwardingrule)
def update(self, apiclient, publicport, protocol, ipaddressid, privateport, **kwargs):
pass
cmd = updatePortForwardingRule.updatePortForwardingRuleCmd()
cmd.ipaddressid = ipaddressid
cmd.privateport = privateport
cmd.protocol = protocol
cmd.publicport = publicport
[setattr(cmd, key, value) for key,value in kwargs.items]
portforwardingrule = apiclient.updatePortForwardingRule(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deletePortForwardingRule.deletePortForwardingRuleCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
portforwardingrule = apiclient.deletePortForwardingRule(cmd)

View File

@ -14,20 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createPrivateGateway
from marvin.cloudstackAPI import listPrivateGateways
from marvin.cloudstackAPI import deletePrivateGateway
class PrivateGateway(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, PrivateGatewayFactory, **kwargs):
pass
cmd = createPrivateGateway.createPrivateGatewayCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in PrivateGatewayFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
privategateway = apiclient.createPrivateGateway(cmd)
return PrivateGateway(privategateway.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listPrivateGateways.listPrivateGatewaysCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
privategateway = apiclient.listPrivateGateways(cmd)
return map(lambda e: PrivateGateway(e.__dict__), privategateway)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deletePrivateGateway.deletePrivateGatewayCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
privategateway = apiclient.deletePrivateGateway(cmd)

View File

@ -14,29 +14,61 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import suspendProject
from marvin.cloudstackAPI import createProject
from marvin.cloudstackAPI import listProjects
from marvin.cloudstackAPI import updateProject
from marvin.cloudstackAPI import activateProject
from marvin.cloudstackAPI import deleteProject
class Project(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def suspend(self, apiclient, id, **kwargs):
pass
cmd = suspendProject.suspendProjectCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
project = apiclient.suspendProject(cmd)
@classmethod
def create(cls, apiclient, ProjectFactory, **kwargs):
pass
cmd = createProject.createProjectCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in ProjectFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
project = apiclient.createProject(cmd)
return Project(project.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listProjects.listProjectsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
project = apiclient.listProjects(cmd)
return map(lambda e: Project(e.__dict__), project)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateProject.updateProjectCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
project = apiclient.updateProject(cmd)
def activate(self, apiclient, id, **kwargs):
pass
cmd = activateProject.activateProjectCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
project = apiclient.activateProject(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteProject.deleteProjectCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
project = apiclient.deleteProject(cmd)

View File

@ -14,13 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listProjectAccounts
class ProjectAccounts(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, projectid, **kwargs):
cmd = listProjectAccounts.listProjectAccountsCmd()
cmd.projectid = projectid
[setattr(cmd, key, value) for key,value in kwargs.items]
projectaccounts = apiclient.listProjectAccounts(cmd)
return map(lambda e: ProjectAccounts(e.__dict__), projectaccounts)

View File

@ -14,19 +14,35 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listProjectInvitations
from marvin.cloudstackAPI import updateProjectInvitation
from marvin.cloudstackAPI import deleteProjectInvitation
class ProjectInvitation(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listProjectInvitations.listProjectInvitationsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
projectinvitation = apiclient.listProjectInvitations(cmd)
return map(lambda e: ProjectInvitation(e.__dict__), projectinvitation)
def update(self, apiclient, projectid, **kwargs):
pass
cmd = updateProjectInvitation.updateProjectInvitationCmd()
cmd.projectid = projectid
[setattr(cmd, key, value) for key,value in kwargs.items]
projectinvitation = apiclient.updateProjectInvitation(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteProjectInvitation.deleteProjectInvitationCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
projectinvitation = apiclient.deleteProjectInvitation(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listPublicIpAddresses
class PublicIpAddresses(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listPublicIpAddresses.listPublicIpAddressesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
publicipaddresses = apiclient.listPublicIpAddresses(cmd)
return map(lambda e: PublicIpAddresses(e.__dict__), publicipaddresses)

View File

@ -14,20 +14,38 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createRemoteAccessVpn
from marvin.cloudstackAPI import listRemoteAccessVpns
from marvin.cloudstackAPI import deleteRemoteAccessVpn
class RemoteAccessVpn(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, RemoteAccessVpnFactory, **kwargs):
pass
cmd = createRemoteAccessVpn.createRemoteAccessVpnCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in RemoteAccessVpnFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
remoteaccessvpn = apiclient.createRemoteAccessVpn(cmd)
return RemoteAccessVpn(remoteaccessvpn.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, publicipid, **kwargs):
cmd = listRemoteAccessVpns.listRemoteAccessVpnsCmd()
cmd.publicipid = publicipid
[setattr(cmd, key, value) for key,value in kwargs.items]
remoteaccessvpn = apiclient.listRemoteAccessVpns(cmd)
return map(lambda e: RemoteAccessVpn(e.__dict__), remoteaccessvpn)
def delete(self, apiclient, publicipid, **kwargs):
pass
cmd = deleteRemoteAccessVpn.deleteRemoteAccessVpnCmd()
cmd.publicipid = publicipid
[setattr(cmd, key, value) for key,value in kwargs.items]
remoteaccessvpn = apiclient.deleteRemoteAccessVpn(cmd)

View File

@ -14,12 +14,17 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import ldapRemove
class Remove(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def ldap(self, apiclient):
pass
def ldap(self, apiclient, **kwargs):
cmd = ldapRemove.ldapRemoveCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
remove = apiclient.ldapRemove(cmd)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import updateResourceCount
class ResourceCount(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def update(self, apiclient, domainid, **kwargs):
pass
cmd = updateResourceCount.updateResourceCountCmd()
cmd.domainid = domainid
[setattr(cmd, key, value) for key,value in kwargs.items]
resourcecount = apiclient.updateResourceCount(cmd)

View File

@ -14,16 +14,27 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listResourceLimits
from marvin.cloudstackAPI import updateResourceLimit
class ResourceLimit(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listResourceLimits.listResourceLimitsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
resourcelimit = apiclient.listResourceLimits(cmd)
return map(lambda e: ResourceLimit(e.__dict__), resourcelimit)
def update(self, apiclient, resourcetype, **kwargs):
pass
cmd = updateResourceLimit.updateResourceLimitCmd()
cmd.resourcetype = resourcetype
[setattr(cmd, key, value) for key,value in kwargs.items]
resourcelimit = apiclient.updateResourceLimit(cmd)

View File

@ -14,25 +14,51 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import destroyRouter
from marvin.cloudstackAPI import listRouters
from marvin.cloudstackAPI import stopRouter
from marvin.cloudstackAPI import rebootRouter
from marvin.cloudstackAPI import startRouter
class Router(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def destroy(self, apiclient, id, **kwargs):
pass
cmd = destroyRouter.destroyRouterCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
router = apiclient.destroyRouter(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listRouters.listRoutersCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
router = apiclient.listRouters(cmd)
return map(lambda e: Router(e.__dict__), router)
def stop(self, apiclient, id, **kwargs):
pass
cmd = stopRouter.stopRouterCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
router = apiclient.stopRouter(cmd)
def reboot(self, apiclient, id, **kwargs):
pass
cmd = rebootRouter.rebootRouterCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
router = apiclient.rebootRouter(cmd)
def start(self, apiclient, id, **kwargs):
pass
cmd = startRouter.startRouterCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
router = apiclient.startRouter(cmd)

View File

@ -14,16 +14,29 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addS3
from marvin.cloudstackAPI import listS3s
class S3(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, secretkey, accesskey, bucket, **kwargs):
pass
cmd = addS3.addS3Cmd()
cmd.accesskey = accesskey
cmd.bucket = bucket
cmd.secretkey = secretkey
[setattr(cmd, key, value) for key,value in kwargs.items]
s3 = apiclient.addS3(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listS3s.listS3sCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
s3 = apiclient.listS3s(cmd)
return map(lambda e: S3(e.__dict__), s3)

View File

@ -14,23 +14,46 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createSSHKeyPair
from marvin.cloudstackAPI import registerSSHKeyPair
from marvin.cloudstackAPI import listSSHKeyPairs
from marvin.cloudstackAPI import deleteSSHKeyPair
class SSHKeyPair(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, SSHKeyPairFactory, **kwargs):
pass
cmd = createSSHKeyPair.createSSHKeyPairCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in SSHKeyPairFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
sshkeypair = apiclient.createSSHKeyPair(cmd)
return SSHKeyPair(sshkeypair.__dict__)
def register(self, apiclient, publickey, name, **kwargs):
pass
cmd = registerSSHKeyPair.registerSSHKeyPairCmd()
cmd.name = name
cmd.publickey = publickey
[setattr(cmd, key, value) for key,value in kwargs.items]
sshkeypair = apiclient.registerSSHKeyPair(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listSSHKeyPairs.listSSHKeyPairsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
sshkeypair = apiclient.listSSHKeyPairs(cmd)
return map(lambda e: SSHKeyPair(e.__dict__), sshkeypair)
def delete(self, apiclient, name, **kwargs):
pass
cmd = deleteSSHKeyPair.deleteSSHKeyPairCmd()
cmd.name = name
[setattr(cmd, key, value) for key,value in kwargs.items]
sshkeypair = apiclient.deleteSSHKeyPair(cmd)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addSecondaryStorage
class SecondaryStorage(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, url, **kwargs):
pass
cmd = addSecondaryStorage.addSecondaryStorageCmd()
cmd.url = url
[setattr(cmd, key, value) for key,value in kwargs.items]
secondarystorage = apiclient.addSecondaryStorage(cmd)

View File

@ -14,20 +14,36 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createSecurityGroup
from marvin.cloudstackAPI import listSecurityGroups
from marvin.cloudstackAPI import deleteSecurityGroup
class SecurityGroup(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, SecurityGroupFactory, **kwargs):
pass
cmd = createSecurityGroup.createSecurityGroupCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in SecurityGroupFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
securitygroup = apiclient.createSecurityGroup(cmd)
return SecurityGroup(securitygroup.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listSecurityGroups.listSecurityGroupsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
securitygroup = apiclient.listSecurityGroups(cmd)
return map(lambda e: SecurityGroup(e.__dict__), securitygroup)
def delete(self, apiclient, **kwargs):
pass
cmd = deleteSecurityGroup.deleteSecurityGroupCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
securitygroup = apiclient.deleteSecurityGroup(cmd)

View File

@ -14,15 +14,25 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import authorizeSecurityGroupEgress
from marvin.cloudstackAPI import revokeSecurityGroupEgress
class SecurityGroupEgress(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def authorize(self, apiclient, **kwargs):
pass
cmd = authorizeSecurityGroupEgress.authorizeSecurityGroupEgressCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
securitygroupegress = apiclient.authorizeSecurityGroupEgress(cmd)
def revoke(self, apiclient, id, **kwargs):
pass
cmd = revokeSecurityGroupEgress.revokeSecurityGroupEgressCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
securitygroupegress = apiclient.revokeSecurityGroupEgress(cmd)

View File

@ -14,15 +14,25 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import authorizeSecurityGroupIngress
from marvin.cloudstackAPI import revokeSecurityGroupIngress
class SecurityGroupIngress(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def authorize(self, apiclient, **kwargs):
pass
cmd = authorizeSecurityGroupIngress.authorizeSecurityGroupIngressCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
securitygroupingress = apiclient.authorizeSecurityGroupIngress(cmd)
def revoke(self, apiclient, id, **kwargs):
pass
cmd = revokeSecurityGroupIngress.revokeSecurityGroupIngressCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
securitygroupingress = apiclient.revokeSecurityGroupIngress(cmd)

View File

@ -14,12 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import changeServiceForRouter
class ServiceForRouter(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def change(self, apiclient, id, serviceofferingid, **kwargs):
pass
cmd = changeServiceForRouter.changeServiceForRouterCmd()
cmd.id = id
cmd.serviceofferingid = serviceofferingid
[setattr(cmd, key, value) for key,value in kwargs.items]
serviceforrouter = apiclient.changeServiceForRouter(cmd)

View File

@ -14,12 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import changeServiceForSystemVm
class ServiceForSystemVm(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def change(self, apiclient, id, serviceofferingid, **kwargs):
pass
cmd = changeServiceForSystemVm.changeServiceForSystemVmCmd()
cmd.id = id
cmd.serviceofferingid = serviceofferingid
[setattr(cmd, key, value) for key,value in kwargs.items]
serviceforsystemvm = apiclient.changeServiceForSystemVm(cmd)

View File

@ -14,12 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import changeServiceForVirtualMachine
class ServiceForVirtualMachine(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def change(self, apiclient, id, serviceofferingid, **kwargs):
pass
cmd = changeServiceForVirtualMachine.changeServiceForVirtualMachineCmd()
cmd.id = id
cmd.serviceofferingid = serviceofferingid
[setattr(cmd, key, value) for key,value in kwargs.items]
serviceforvirtualmachine = apiclient.changeServiceForVirtualMachine(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createServiceOffering
from marvin.cloudstackAPI import listServiceOfferings
from marvin.cloudstackAPI import updateServiceOffering
from marvin.cloudstackAPI import deleteServiceOffering
class ServiceOffering(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, ServiceOfferingFactory, **kwargs):
pass
cmd = createServiceOffering.createServiceOfferingCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in ServiceOfferingFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
serviceoffering = apiclient.createServiceOffering(cmd)
return ServiceOffering(serviceoffering.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listServiceOfferings.listServiceOfferingsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
serviceoffering = apiclient.listServiceOfferings(cmd)
return map(lambda e: ServiceOffering(e.__dict__), serviceoffering)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateServiceOffering.updateServiceOfferingCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
serviceoffering = apiclient.updateServiceOffering(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteServiceOffering.deleteServiceOfferingCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
serviceoffering = apiclient.deleteServiceOffering(cmd)

View File

@ -14,20 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createSnapshot
from marvin.cloudstackAPI import listSnapshots
from marvin.cloudstackAPI import deleteSnapshot
class Snapshot(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, SnapshotFactory, **kwargs):
pass
cmd = createSnapshot.createSnapshotCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in SnapshotFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
snapshot = apiclient.createSnapshot(cmd)
return Snapshot(snapshot.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listSnapshots.listSnapshotsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
snapshot = apiclient.listSnapshots(cmd)
return map(lambda e: Snapshot(e.__dict__), snapshot)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteSnapshot.deleteSnapshotCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
snapshot = apiclient.deleteSnapshot(cmd)

View File

@ -14,16 +14,27 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listSnapshotPolicies
from marvin.cloudstackAPI import deleteSnapshotPolicies
class SnapshotPolicies(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, volumeid, **kwargs):
cmd = listSnapshotPolicies.listSnapshotPoliciesCmd()
cmd.volumeid = volumeid
[setattr(cmd, key, value) for key,value in kwargs.items]
snapshotpolicies = apiclient.listSnapshotPolicies(cmd)
return map(lambda e: SnapshotPolicies(e.__dict__), snapshotpolicies)
def delete(self, apiclient, **kwargs):
pass
cmd = deleteSnapshotPolicies.deleteSnapshotPoliciesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
snapshotpolicies = apiclient.deleteSnapshotPolicies(cmd)

View File

@ -14,13 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createSnapshotPolicy
class SnapshotPolicy(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, SnapshotPolicyFactory, **kwargs):
pass
cmd = createSnapshotPolicy.createSnapshotPolicyCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in SnapshotPolicyFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
snapshotpolicy = apiclient.createSnapshotPolicy(cmd)
return SnapshotPolicy(snapshotpolicy.__dict__)

View File

@ -14,15 +14,27 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import enableStaticNat
from marvin.cloudstackAPI import disableStaticNat
class StaticNat(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def enable(self, apiclient, ipaddressid, virtualmachineid, **kwargs):
pass
cmd = enableStaticNat.enableStaticNatCmd()
cmd.ipaddressid = ipaddressid
cmd.virtualmachineid = virtualmachineid
[setattr(cmd, key, value) for key,value in kwargs.items]
staticnat = apiclient.enableStaticNat(cmd)
def disable(self, apiclient, ipaddressid, **kwargs):
pass
cmd = disableStaticNat.disableStaticNatCmd()
cmd.ipaddressid = ipaddressid
[setattr(cmd, key, value) for key,value in kwargs.items]
staticnat = apiclient.disableStaticNat(cmd)

View File

@ -14,20 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createStaticRoute
from marvin.cloudstackAPI import listStaticRoutes
from marvin.cloudstackAPI import deleteStaticRoute
class StaticRoute(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, StaticRouteFactory, **kwargs):
pass
cmd = createStaticRoute.createStaticRouteCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in StaticRouteFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
staticroute = apiclient.createStaticRoute(cmd)
return StaticRoute(staticroute.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listStaticRoutes.listStaticRoutesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
staticroute = apiclient.listStaticRoutes(cmd)
return map(lambda e: StaticRoute(e.__dict__), staticroute)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteStaticRoute.deleteStaticRouteCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
staticroute = apiclient.deleteStaticRoute(cmd)

View File

@ -14,15 +14,26 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import cancelStorageMaintenance
from marvin.cloudstackAPI import enableStorageMaintenance
class StorageMaintenance(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def cancel(self, apiclient, id, **kwargs):
pass
cmd = cancelStorageMaintenance.cancelStorageMaintenanceCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
storagemaintenance = apiclient.cancelStorageMaintenance(cmd)
def enable(self, apiclient, id, **kwargs):
pass
cmd = enableStorageMaintenance.enableStorageMaintenanceCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
storagemaintenance = apiclient.enableStorageMaintenance(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createStorageNetworkIpRange
from marvin.cloudstackAPI import listStorageNetworkIpRange
from marvin.cloudstackAPI import updateStorageNetworkIpRange
from marvin.cloudstackAPI import deleteStorageNetworkIpRange
class StorageNetworkIpRange(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, StorageNetworkIpRangeFactory, **kwargs):
pass
cmd = createStorageNetworkIpRange.createStorageNetworkIpRangeCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in StorageNetworkIpRangeFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
storagenetworkiprange = apiclient.createStorageNetworkIpRange(cmd)
return StorageNetworkIpRange(storagenetworkiprange.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listStorageNetworkIpRange.listStorageNetworkIpRangeCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
storagenetworkiprange = apiclient.listStorageNetworkIpRange(cmd)
return map(lambda e: StorageNetworkIpRange(e.__dict__), storagenetworkiprange)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateStorageNetworkIpRange.updateStorageNetworkIpRangeCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
storagenetworkiprange = apiclient.updateStorageNetworkIpRange(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteStorageNetworkIpRange.deleteStorageNetworkIpRangeCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
storagenetworkiprange = apiclient.deleteStorageNetworkIpRange(cmd)

View File

@ -14,23 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createStoragePool
from marvin.cloudstackAPI import listStoragePools
from marvin.cloudstackAPI import updateStoragePool
from marvin.cloudstackAPI import deleteStoragePool
class StoragePool(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, StoragePoolFactory, **kwargs):
pass
cmd = createStoragePool.createStoragePoolCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in StoragePoolFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
storagepool = apiclient.createStoragePool(cmd)
return StoragePool(storagepool.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listStoragePools.listStoragePoolsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
storagepool = apiclient.listStoragePools(cmd)
return map(lambda e: StoragePool(e.__dict__), storagepool)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateStoragePool.updateStoragePoolCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
storagepool = apiclient.updateStoragePool(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteStoragePool.deleteStoragePoolCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
storagepool = apiclient.deleteStoragePool(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listSupportedNetworkServices
class SupportedNetworkServices(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listSupportedNetworkServices.listSupportedNetworkServicesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
supportednetworkservices = apiclient.listSupportedNetworkServices(cmd)
return map(lambda e: SupportedNetworkServices(e.__dict__), supportednetworkservices)

View File

@ -14,16 +14,27 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addSwift
from marvin.cloudstackAPI import listSwifts
class Swift(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, url, **kwargs):
pass
cmd = addSwift.addSwiftCmd()
cmd.url = url
[setattr(cmd, key, value) for key,value in kwargs.items]
swift = apiclient.addSwift(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listSwifts.listSwiftsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
swift = apiclient.listSwifts(cmd)
return map(lambda e: Swift(e.__dict__), swift)

View File

@ -14,28 +14,60 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import migrateSystemVm
from marvin.cloudstackAPI import stopSystemVm
from marvin.cloudstackAPI import listSystemVms
from marvin.cloudstackAPI import rebootSystemVm
from marvin.cloudstackAPI import startSystemVm
from marvin.cloudstackAPI import destroySystemVm
class SystemVm(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def migrate(self, apiclient, hostid, virtualmachineid, **kwargs):
pass
cmd = migrateSystemVm.migrateSystemVmCmd()
cmd.hostid = hostid
cmd.virtualmachineid = virtualmachineid
[setattr(cmd, key, value) for key,value in kwargs.items]
systemvm = apiclient.migrateSystemVm(cmd)
def stop(self, apiclient, id, **kwargs):
pass
cmd = stopSystemVm.stopSystemVmCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
systemvm = apiclient.stopSystemVm(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listSystemVms.listSystemVmsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
systemvm = apiclient.listSystemVms(cmd)
return map(lambda e: SystemVm(e.__dict__), systemvm)
def reboot(self, apiclient, id, **kwargs):
pass
cmd = rebootSystemVm.rebootSystemVmCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
systemvm = apiclient.rebootSystemVm(cmd)
def start(self, apiclient, id, **kwargs):
pass
cmd = startSystemVm.startSystemVmCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
systemvm = apiclient.startSystemVm(cmd)
def destroy(self, apiclient, id, **kwargs):
pass
cmd = destroySystemVm.destroySystemVmCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
systemvm = apiclient.destroySystemVm(cmd)

View File

@ -14,20 +14,38 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import createTags
from marvin.cloudstackAPI import listTags
from marvin.cloudstackAPI import deleteTags
class Tags(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def create(cls, apiclient, TagsFactory, **kwargs):
pass
cmd = createTags.createTagsCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in TagsFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
tags = apiclient.createTags(cmd)
return Tags(tags.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listTags.listTagsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
tags = apiclient.listTags(cmd)
return map(lambda e: Tags(e.__dict__), tags)
def delete(self, apiclient, resourcetype, resourceids, **kwargs):
pass
cmd = deleteTags.deleteTagsCmd()
cmd.resourceids = resourceids
cmd.resourcetype = resourcetype
[setattr(cmd, key, value) for key,value in kwargs.items]
tags = apiclient.deleteTags(cmd)

View File

@ -14,35 +14,88 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import prepareTemplate
from marvin.cloudstackAPI import createTemplate
from marvin.cloudstackAPI import registerTemplate
from marvin.cloudstackAPI import listTemplates
from marvin.cloudstackAPI import updateTemplate
from marvin.cloudstackAPI import copyTemplate
from marvin.cloudstackAPI import extractTemplate
from marvin.cloudstackAPI import deleteTemplate
class Template(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def prepare(self, apiclient, zoneid, templateid, **kwargs):
pass
cmd = prepareTemplate.prepareTemplateCmd()
cmd.templateid = templateid
cmd.zoneid = zoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
template = apiclient.prepareTemplate(cmd)
@classmethod
def create(cls, apiclient, TemplateFactory, **kwargs):
pass
cmd = createTemplate.createTemplateCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in TemplateFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
template = apiclient.createTemplate(cmd)
return Template(template.__dict__)
def register(self, apiclient, name, format, url, hypervisor, zoneid, displaytext, ostypeid, **kwargs):
pass
cmd = registerTemplate.registerTemplateCmd()
cmd.displaytext = displaytext
cmd.format = format
cmd.hypervisor = hypervisor
cmd.name = name
cmd.ostypeid = ostypeid
cmd.url = url
cmd.zoneid = zoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
template = apiclient.registerTemplate(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, templatefilter, **kwargs):
cmd = listTemplates.listTemplatesCmd()
cmd.templatefilter = templatefilter
[setattr(cmd, key, value) for key,value in kwargs.items]
template = apiclient.listTemplates(cmd)
return map(lambda e: Template(e.__dict__), template)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateTemplate.updateTemplateCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
template = apiclient.updateTemplate(cmd)
def copy(self, apiclient, sourcezoneid, id, destzoneid, **kwargs):
pass
cmd = copyTemplate.copyTemplateCmd()
cmd.id = id
cmd.destzoneid = destzoneid
cmd.sourcezoneid = sourcezoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
template = apiclient.copyTemplate(cmd)
def extract(self, apiclient, id, mode, **kwargs):
pass
cmd = extractTemplate.extractTemplateCmd()
cmd.id = id
cmd.mode = mode
[setattr(cmd, key, value) for key,value in kwargs.items]
template = apiclient.extractTemplate(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteTemplate.deleteTemplateCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
template = apiclient.deleteTemplate(cmd)

View File

@ -14,16 +14,28 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listTemplatePermissions
from marvin.cloudstackAPI import updateTemplatePermissions
class TemplatePermissions(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, id, **kwargs):
cmd = listTemplatePermissions.listTemplatePermissionsCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
templatepermissions = apiclient.listTemplatePermissions(cmd)
return map(lambda e: TemplatePermissions(e.__dict__), templatepermissions)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateTemplatePermissions.updateTemplatePermissionsCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
templatepermissions = apiclient.updateTemplatePermissions(cmd)

View File

@ -14,12 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import assignToLoadBalancerRule
class ToLoadBalancerRule(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def assign(self, apiclient, id, virtualmachineids, **kwargs):
pass
cmd = assignToLoadBalancerRule.assignToLoadBalancerRuleCmd()
cmd.id = id
cmd.virtualmachineids = virtualmachineids
[setattr(cmd, key, value) for key,value in kwargs.items]
toloadbalancerrule = apiclient.assignToLoadBalancerRule(cmd)

View File

@ -14,19 +14,37 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addTrafficMonitor
from marvin.cloudstackAPI import listTrafficMonitors
from marvin.cloudstackAPI import deleteTrafficMonitor
class TrafficMonitor(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, url, zoneid, **kwargs):
pass
cmd = addTrafficMonitor.addTrafficMonitorCmd()
cmd.url = url
cmd.zoneid = zoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
trafficmonitor = apiclient.addTrafficMonitor(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, zoneid, **kwargs):
cmd = listTrafficMonitors.listTrafficMonitorsCmd()
cmd.zoneid = zoneid
[setattr(cmd, key, value) for key,value in kwargs.items]
trafficmonitor = apiclient.listTrafficMonitors(cmd)
return map(lambda e: TrafficMonitor(e.__dict__), trafficmonitor)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteTrafficMonitor.deleteTrafficMonitorCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
trafficmonitor = apiclient.deleteTrafficMonitor(cmd)

View File

@ -14,22 +14,45 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import addTrafficType
from marvin.cloudstackAPI import listTrafficTypes
from marvin.cloudstackAPI import updateTrafficType
from marvin.cloudstackAPI import deleteTrafficType
class TrafficType(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def add(self, apiclient, traffictype, physicalnetworkid, **kwargs):
pass
cmd = addTrafficType.addTrafficTypeCmd()
cmd.physicalnetworkid = physicalnetworkid
cmd.traffictype = traffictype
[setattr(cmd, key, value) for key,value in kwargs.items]
traffictype = apiclient.addTrafficType(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, physicalnetworkid, **kwargs):
cmd = listTrafficTypes.listTrafficTypesCmd()
cmd.physicalnetworkid = physicalnetworkid
[setattr(cmd, key, value) for key,value in kwargs.items]
traffictype = apiclient.listTrafficTypes(cmd)
return map(lambda e: TrafficType(e.__dict__), traffictype)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateTrafficType.updateTrafficTypeCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
traffictype = apiclient.updateTrafficType(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteTrafficType.deleteTrafficTypeCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
traffictype = apiclient.deleteTrafficType(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listTrafficTypeImplementors
class TrafficTypeImplementors(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listTrafficTypeImplementors.listTrafficTypeImplementorsCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
traffictypeimplementors = apiclient.listTrafficTypeImplementors(cmd)
return map(lambda e: TrafficTypeImplementors(e.__dict__), traffictypeimplementors)

View File

@ -14,16 +14,30 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listUsageRecords
from marvin.cloudstackAPI import generateUsageRecords
class UsageRecords(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, startdate, enddate, **kwargs):
cmd = listUsageRecords.listUsageRecordsCmd()
cmd.enddate = enddate
cmd.startdate = startdate
[setattr(cmd, key, value) for key,value in kwargs.items]
usagerecords = apiclient.listUsageRecords(cmd)
return map(lambda e: UsageRecords(e.__dict__), usagerecords)
def generate(self, apiclient, startdate, enddate, **kwargs):
pass
cmd = generateUsageRecords.generateUsageRecordsCmd()
cmd.enddate = enddate
cmd.startdate = startdate
[setattr(cmd, key, value) for key,value in kwargs.items]
usagerecords = apiclient.generateUsageRecords(cmd)

View File

@ -14,13 +14,19 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import listUsageTypes
class UsageTypes(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
@classmethod
def list(cls, apiclient):
pass
def list(self, apiclient, **kwargs):
cmd = listUsageTypes.listUsageTypesCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
usagetypes = apiclient.listUsageTypes(cmd)
return map(lambda e: UsageTypes(e.__dict__), usagetypes)

View File

@ -14,35 +14,77 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import enableUser
from marvin.cloudstackAPI import getUser
from marvin.cloudstackAPI import lockUser
from marvin.cloudstackAPI import createUser
from marvin.cloudstackAPI import listUsers
from marvin.cloudstackAPI import updateUser
from marvin.cloudstackAPI import disableUser
from marvin.cloudstackAPI import deleteUser
class User(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def enable(self, apiclient, id, **kwargs):
pass
cmd = enableUser.enableUserCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
user = apiclient.enableUser(cmd)
def get(self, apiclient, userapikey, **kwargs):
pass
cmd = getUser.getUserCmd()
cmd.userapikey = userapikey
[setattr(cmd, key, value) for key,value in kwargs.items]
user = apiclient.getUser(cmd)
def lock(self, apiclient, id, **kwargs):
pass
cmd = lockUser.lockUserCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
user = apiclient.lockUser(cmd)
@classmethod
def create(cls, apiclient, UserFactory, **kwargs):
pass
cmd = createUser.createUserCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in UserFactory.attributes()]
[setattr(cmd, key, value) for key,value in kwargs.items]
user = apiclient.createUser(cmd)
return User(user.__dict__)
@classmethod
def list(cls, apiclient, **kwargs):
pass
def list(self, apiclient, **kwargs):
cmd = listUsers.listUsersCmd()
[setattr(cmd, key, value) for key,value in kwargs.items]
user = apiclient.listUsers(cmd)
return map(lambda e: User(e.__dict__), user)
def update(self, apiclient, id, **kwargs):
pass
cmd = updateUser.updateUserCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
user = apiclient.updateUser(cmd)
def disable(self, apiclient, id, **kwargs):
pass
cmd = disableUser.disableUserCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
user = apiclient.disableUser(cmd)
def delete(self, apiclient, id, **kwargs):
pass
cmd = deleteUser.deleteUserCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
user = apiclient.deleteUser(cmd)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import registerUserKeys
class UserKeys(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def register(self, apiclient, id, **kwargs):
pass
cmd = registerUserKeys.registerUserKeysCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
userkeys = apiclient.registerUserKeys(cmd)

View File

@ -14,12 +14,18 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from . import CloudStackEntity
from marvin.integration.lib.base import CloudStackEntity
from marvin.cloudstackAPI import getVMPassword
class VMPassword(CloudStackEntity):
def __init__(self, items):
self.__dict__.update(items)
def get(self, apiclient, id, **kwargs):
pass
cmd = getVMPassword.getVMPasswordCmd()
cmd.id = id
[setattr(cmd, key, value) for key,value in kwargs.items]
vmpassword = apiclient.getVMPassword(cmd)

Some files were not shown because too many files have changed in this diff Show More