marvin_refactor: call the EntityFactory simply factory

This commit is contained in:
Prasanna Santhanam 2013-04-18 17:29:48 +05:30
parent 414bf4f625
commit 0af09a4843
49 changed files with 97 additions and 97 deletions

View File

@ -50,9 +50,9 @@ class Account(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, AccountFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createAccount.createAccountCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in AccountFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
account = apiclient.createAccount(cmd)
return Account(account.__dict__)

View File

@ -28,9 +28,9 @@ class AutoScalePolicy(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, AutoScalePolicyFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createAutoScalePolicy.createAutoScalePolicyCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in AutoScalePolicyFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
autoscalepolicy = apiclient.createAutoScalePolicy(cmd)
return AutoScalePolicy(autoscalepolicy.__dict__)

View File

@ -38,9 +38,9 @@ class AutoScaleVmGroup(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, AutoScaleVmGroupFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createAutoScaleVmGroup.createAutoScaleVmGroupCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in AutoScaleVmGroupFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
autoscalevmgroup = apiclient.createAutoScaleVmGroup(cmd)
return AutoScaleVmGroup(autoscalevmgroup.__dict__)

View File

@ -28,9 +28,9 @@ class AutoScaleVmProfile(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, AutoScaleVmProfileFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createAutoScaleVmProfile.createAutoScaleVmProfileCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in AutoScaleVmProfileFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
autoscalevmprofile = apiclient.createAutoScaleVmProfile(cmd)
return AutoScaleVmProfile(autoscalevmprofile.__dict__)

View File

@ -22,4 +22,4 @@ class CloudStackEntity(object):
__version__ = cloudstack_version
def getVersion(self):
return self.__version__
return self.__version__

View File

@ -27,9 +27,9 @@ class Condition(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, ConditionFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createCondition.createConditionCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in ConditionFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
condition = apiclient.createCondition(cmd)
return Condition(condition.__dict__)

View File

@ -27,9 +27,9 @@ class Counter(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, CounterFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createCounter.createCounterCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in CounterFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
counter = apiclient.createCounter(cmd)
return Counter(counter.__dict__)

View File

@ -28,9 +28,9 @@ class DiskOffering(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, DiskOfferingFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createDiskOffering.createDiskOfferingCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in DiskOfferingFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
diskoffering = apiclient.createDiskOffering(cmd)
return DiskOffering(diskoffering.__dict__)

View File

@ -28,9 +28,9 @@ class Domain(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, DomainFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createDomain.createDomainCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in DomainFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
domain = apiclient.createDomain(cmd)
return Domain(domain.__dict__)

View File

@ -27,9 +27,9 @@ class EgressFirewallRule(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, EgressFirewallRuleFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createEgressFirewallRule.createEgressFirewallRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in EgressFirewallRuleFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
egressfirewallrule = apiclient.createEgressFirewallRule(cmd)
return EgressFirewallRule(egressfirewallrule.__dict__)

View File

@ -27,9 +27,9 @@ class FirewallRule(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, FirewallRuleFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createFirewallRule.createFirewallRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in FirewallRuleFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
firewallrule = apiclient.createFirewallRule(cmd)
return FirewallRule(firewallrule.__dict__)

View File

@ -30,9 +30,9 @@ class GlobalLoadBalancerRule(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, GlobalLoadBalancerRuleFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createGlobalLoadBalancerRule.createGlobalLoadBalancerRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in GlobalLoadBalancerRuleFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
globalloadbalancerrule = apiclient.createGlobalLoadBalancerRule(cmd)
return GlobalLoadBalancerRule(globalloadbalancerrule.__dict__)
@ -77,4 +77,4 @@ class GlobalLoadBalancerRule(CloudStackEntity.CloudStackEntity):
cmd.loadbalancerrulelist = loadbalancerrulelist
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
togloballoadbalancerrule = apiclient.assignToGlobalLoadBalancerRule(cmd)
return togloballoadbalancerrule
return togloballoadbalancerrule

View File

@ -28,9 +28,9 @@ class InstanceGroup(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, InstanceGroupFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createInstanceGroup.createInstanceGroupCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in InstanceGroupFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
instancegroup = apiclient.createInstanceGroup(cmd)
return InstanceGroup(instancegroup.__dict__)

View File

@ -27,9 +27,9 @@ class IpForwardingRule(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, IpForwardingRuleFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createIpForwardingRule.createIpForwardingRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in IpForwardingRuleFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
ipforwardingrule = apiclient.createIpForwardingRule(cmd)
return IpForwardingRule(ipforwardingrule.__dict__)

View File

@ -27,9 +27,9 @@ class LBHealthCheckPolicy(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, LBHealthCheckPolicyFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createLBHealthCheckPolicy.createLBHealthCheckPolicyCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in LBHealthCheckPolicyFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
lbhealthcheckpolicy = apiclient.createLBHealthCheckPolicy(cmd)
return LBHealthCheckPolicy(lbhealthcheckpolicy.__dict__)

View File

@ -27,9 +27,9 @@ class LBStickinessPolicy(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, LBStickinessPolicyFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createLBStickinessPolicy.createLBStickinessPolicyCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in LBStickinessPolicyFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
lbstickinesspolicy = apiclient.createLBStickinessPolicy(cmd)
return LBStickinessPolicy(lbstickinesspolicy.__dict__)

View File

@ -31,9 +31,9 @@ class LoadBalancerRule(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, LoadBalancerRuleFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createLoadBalancerRule.createLoadBalancerRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in LoadBalancerRuleFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
loadbalancerrule = apiclient.createLoadBalancerRule(cmd)
return LoadBalancerRule(loadbalancerrule.__dict__)

View File

@ -29,9 +29,9 @@ class Network(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, NetworkFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createNetwork.createNetworkCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in NetworkFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
network = apiclient.createNetwork(cmd)
return Network(network.__dict__)

View File

@ -27,9 +27,9 @@ class NetworkACL(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, NetworkACLFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createNetworkACL.createNetworkACLCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in NetworkACLFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
networkacl = apiclient.createNetworkACL(cmd)
return NetworkACL(networkacl.__dict__)

View File

@ -28,9 +28,9 @@ class NetworkOffering(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, NetworkOfferingFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createNetworkOffering.createNetworkOfferingCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in NetworkOfferingFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
networkoffering = apiclient.createNetworkOffering(cmd)
return NetworkOffering(networkoffering.__dict__)

View File

@ -28,9 +28,9 @@ class PhysicalNetwork(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, PhysicalNetworkFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createPhysicalNetwork.createPhysicalNetworkCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in PhysicalNetworkFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
physicalnetwork = apiclient.createPhysicalNetwork(cmd)
return PhysicalNetwork(physicalnetwork.__dict__)

View File

@ -28,9 +28,9 @@ class Pod(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, PodFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createPod.createPodCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in PodFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
pod = apiclient.createPod(cmd)
return Pod(pod.__dict__)

View File

@ -28,9 +28,9 @@ class PortForwardingRule(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, PortForwardingRuleFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createPortForwardingRule.createPortForwardingRuleCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in PortForwardingRuleFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
portforwardingrule = apiclient.createPortForwardingRule(cmd)
return PortForwardingRule(portforwardingrule.__dict__)

View File

@ -27,9 +27,9 @@ class PrivateGateway(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, PrivateGatewayFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createPrivateGateway.createPrivateGatewayCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in PrivateGatewayFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
privategateway = apiclient.createPrivateGateway(cmd)
return PrivateGateway(privategateway.__dict__)

View File

@ -41,9 +41,9 @@ class Project(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, ProjectFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createProject.createProjectCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in ProjectFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
project = apiclient.createProject(cmd)
return Project(project.__dict__)

View File

@ -27,9 +27,9 @@ class RemoteAccessVpn(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, RemoteAccessVpnFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createRemoteAccessVpn.createRemoteAccessVpnCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in RemoteAccessVpnFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
remoteaccessvpn = apiclient.createRemoteAccessVpn(cmd)
return RemoteAccessVpn(remoteaccessvpn.__dict__)

View File

@ -28,9 +28,9 @@ class SSHKeyPair(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, SSHKeyPairFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createSSHKeyPair.createSSHKeyPairCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in SSHKeyPairFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
sshkeypair = apiclient.createSSHKeyPair(cmd)
return SSHKeyPair(sshkeypair.__dict__)

View File

@ -31,9 +31,9 @@ class SecurityGroup(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, SecurityGroupFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createSecurityGroup.createSecurityGroupCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in SecurityGroupFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
securitygroup = apiclient.createSecurityGroup(cmd)
return SecurityGroup(securitygroup.__dict__)

View File

@ -28,9 +28,9 @@ class ServiceOffering(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, ServiceOfferingFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createServiceOffering.createServiceOfferingCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in ServiceOfferingFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
serviceoffering = apiclient.createServiceOffering(cmd)
return ServiceOffering(serviceoffering.__dict__)

View File

@ -27,9 +27,9 @@ class Snapshot(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, SnapshotFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createSnapshot.createSnapshotCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in SnapshotFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
snapshot = apiclient.createSnapshot(cmd)
return Snapshot(snapshot.__dict__)

View File

@ -27,9 +27,9 @@ class SnapshotPolicy(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, SnapshotPolicyFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createSnapshotPolicy.createSnapshotPolicyCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in SnapshotPolicyFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
snapshotpolicy = apiclient.createSnapshotPolicy(cmd)
return SnapshotPolicy(snapshotpolicy.__dict__)

View File

@ -27,9 +27,9 @@ class StaticRoute(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, StaticRouteFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createStaticRoute.createStaticRouteCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in StaticRouteFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
staticroute = apiclient.createStaticRoute(cmd)
return StaticRoute(staticroute.__dict__)

View File

@ -28,9 +28,9 @@ class StorageNetworkIpRange(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, StorageNetworkIpRangeFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createStorageNetworkIpRange.createStorageNetworkIpRangeCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in StorageNetworkIpRangeFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
storagenetworkiprange = apiclient.createStorageNetworkIpRange(cmd)
return StorageNetworkIpRange(storagenetworkiprange.__dict__)

View File

@ -30,9 +30,9 @@ class StoragePool(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, StoragePoolFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createStoragePool.createStoragePoolCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in StoragePoolFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
storagepool = apiclient.createStoragePool(cmd)
return StoragePool(storagepool.__dict__)

View File

@ -27,9 +27,9 @@ class Tags(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, TagsFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createTags.createTagsCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in TagsFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
tags = apiclient.createTags(cmd)
return Tags(tags.__dict__)

View File

@ -42,9 +42,9 @@ class Template(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, TemplateFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createTemplate.createTemplateCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in TemplateFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
template = apiclient.createTemplate(cmd)
return Template(template.__dict__)

View File

@ -58,9 +58,9 @@ class User(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, UserFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createUser.createUserCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in UserFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
user = apiclient.createUser(cmd)
return User(user.__dict__)

View File

@ -27,9 +27,9 @@ class VMSnapshot(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VMSnapshotFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVMSnapshot.createVMSnapshotCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VMSnapshotFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
vmsnapshot = apiclient.createVMSnapshot(cmd)
return VMSnapshot(vmsnapshot.__dict__)

View File

@ -29,9 +29,9 @@ class VPC(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VPCFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVPC.createVPCCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VPCFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
vpc = apiclient.createVPC(cmd)
return VPC(vpc.__dict__)

View File

@ -28,9 +28,9 @@ class VPCOffering(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VPCOfferingFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVPCOffering.createVPCOfferingCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VPCOfferingFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
vpcoffering = apiclient.createVPCOffering(cmd)
return VPCOffering(vpcoffering.__dict__)

View File

@ -58,9 +58,9 @@ class VirtualMachine(CloudStackEntity.CloudStackEntity):
@classmethod
def deploy(cls, apiclient, VirtualMachineFactory, **kwargs):
def deploy(cls, apiclient, factory, **kwargs):
cmd = deployVirtualMachine.deployVirtualMachineCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VirtualMachineFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
virtualmachine = apiclient.deployVirtualMachine(cmd)
return VirtualMachine(virtualmachine.__dict__)

View File

@ -27,9 +27,9 @@ class VirtualRouterElement(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VirtualRouterElementFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVirtualRouterElement.createVirtualRouterElementCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VirtualRouterElementFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
virtualrouterelement = apiclient.createVirtualRouterElement(cmd)
return VirtualRouterElement(virtualrouterelement.__dict__)

View File

@ -27,9 +27,9 @@ class VlanIpRange(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VlanIpRangeFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVlanIpRange.createVlanIpRangeCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VlanIpRangeFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
vlaniprange = apiclient.createVlanIpRange(cmd)
return VlanIpRange(vlaniprange.__dict__)

View File

@ -42,9 +42,9 @@ class Volume(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VolumeFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVolume.createVolumeCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VolumeFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
volume = apiclient.createVolume(cmd)
return Volume(volume.__dict__)

View File

@ -36,9 +36,9 @@ class VpnConnection(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VpnConnectionFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVpnConnection.createVpnConnectionCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VpnConnectionFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
vpnconnection = apiclient.createVpnConnection(cmd)
return VpnConnection(vpnconnection.__dict__)

View File

@ -28,9 +28,9 @@ class VpnCustomerGateway(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VpnCustomerGatewayFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVpnCustomerGateway.createVpnCustomerGatewayCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VpnCustomerGatewayFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
vpncustomergateway = apiclient.createVpnCustomerGateway(cmd)
return VpnCustomerGateway(vpncustomergateway.__dict__)

View File

@ -27,9 +27,9 @@ class VpnGateway(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, VpnGatewayFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createVpnGateway.createVpnGatewayCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in VpnGatewayFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
vpngateway = apiclient.createVpnGateway(cmd)
return VpnGateway(vpngateway.__dict__)

View File

@ -28,9 +28,9 @@ class Zone(CloudStackEntity.CloudStackEntity):
@classmethod
def create(cls, apiclient, ZoneFactory, **kwargs):
def create(cls, apiclient, factory, **kwargs):
cmd = createZone.createZoneCmd()
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in ZoneFactory.__dict__.iteritems()]
[setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
[setattr(cmd, key, value) for key,value in kwargs.iteritems()]
zone = apiclient.createZone(cmd)
return Zone(zone.__dict__)

View File

@ -13,4 +13,4 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# under the License.