cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [42/50] [abbrv] actions on entity object require id for performing the action
Date Tue, 09 Apr 2013 13:21:19 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/NetworkDevice.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/NetworkDevice.py b/tools/marvin/marvin/integration/lib/base/NetworkDevice.py
index 7cfca15..b81922e 100644
--- a/tools/marvin/marvin/integration/lib/base/NetworkDevice.py
+++ b/tools/marvin/marvin/integration/lib/base/NetworkDevice.py
@@ -28,21 +28,25 @@ class NetworkDevice(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, **kwargs):
         cmd = addNetworkDevice.addNetworkDeviceCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkdevice = apiclient.addNetworkDevice(cmd)
+        return networkdevice
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listNetworkDevice.listNetworkDeviceCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkdevice = apiclient.listNetworkDevice(cmd)
         return map(lambda e: NetworkDevice(e.__dict__), networkdevice)
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteNetworkDevice.deleteNetworkDeviceCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkdevice = apiclient.deleteNetworkDevice(cmd)
+        return networkdevice
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/NetworkOffering.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/NetworkOffering.py b/tools/marvin/marvin/integration/lib/base/NetworkOffering.py
index 741ef81..2566989 100644
--- a/tools/marvin/marvin/integration/lib/base/NetworkOffering.py
+++ b/tools/marvin/marvin/integration/lib/base/NetworkOffering.py
@@ -39,20 +39,24 @@ class NetworkOffering(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listNetworkOfferings.listNetworkOfferingsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkoffering = apiclient.listNetworkOfferings(cmd)
         return map(lambda e: NetworkOffering(e.__dict__), networkoffering)
 
 
     def update(self, apiclient, **kwargs):
         cmd = updateNetworkOffering.updateNetworkOfferingCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkoffering = apiclient.updateNetworkOffering(cmd)
+        return networkoffering
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteNetworkOffering.deleteNetworkOfferingCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkoffering = apiclient.deleteNetworkOffering(cmd)
+        return networkoffering
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/NetworkServiceProvider.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/NetworkServiceProvider.py b/tools/marvin/marvin/integration/lib/base/NetworkServiceProvider.py
index 604d33a..150f62a 100644
--- a/tools/marvin/marvin/integration/lib/base/NetworkServiceProvider.py
+++ b/tools/marvin/marvin/integration/lib/base/NetworkServiceProvider.py
@@ -29,30 +29,36 @@ class NetworkServiceProvider(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, physicalnetworkid, name, **kwargs):
         cmd = addNetworkServiceProvider.addNetworkServiceProviderCmd()
+        cmd.id = self.id
         cmd.name = name
         cmd.physicalnetworkid = physicalnetworkid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkserviceprovider = apiclient.addNetworkServiceProvider(cmd)
+        return networkserviceprovider
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listNetworkServiceProviders.listNetworkServiceProvidersCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkserviceprovider = apiclient.listNetworkServiceProviders(cmd)
         return map(lambda e: NetworkServiceProvider(e.__dict__), networkserviceprovider)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateNetworkServiceProvider.updateNetworkServiceProviderCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkserviceprovider = apiclient.updateNetworkServiceProvider(cmd)
+        return networkserviceprovider
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteNetworkServiceProvider.deleteNetworkServiceProviderCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         networkserviceprovider = apiclient.deleteNetworkServiceProvider(cmd)
+        return networkserviceprovider
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/NicFromVirtualMachine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/NicFromVirtualMachine.py b/tools/marvin/marvin/integration/lib/base/NicFromVirtualMachine.py
index 409ac5b..812dcc8 100644
--- a/tools/marvin/marvin/integration/lib/base/NicFromVirtualMachine.py
+++ b/tools/marvin/marvin/integration/lib/base/NicFromVirtualMachine.py
@@ -26,7 +26,10 @@ class NicFromVirtualMachine(CloudStackEntity.CloudStackEntity):
 
     def remove(self, apiclient, nicid, virtualmachineid, **kwargs):
         cmd = removeNicFromVirtualMachine.removeNicFromVirtualMachineCmd()
+        cmd.id = self.id
         cmd.nicid = nicid
         cmd.virtualmachineid = virtualmachineid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         nicfromvirtualmachine = apiclient.removeNicFromVirtualMachine(cmd)
+        return nicfromvirtualmachine
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/NicToVirtualMachine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/NicToVirtualMachine.py b/tools/marvin/marvin/integration/lib/base/NicToVirtualMachine.py
index e5e501b..00dcb9e 100644
--- a/tools/marvin/marvin/integration/lib/base/NicToVirtualMachine.py
+++ b/tools/marvin/marvin/integration/lib/base/NicToVirtualMachine.py
@@ -26,7 +26,10 @@ class NicToVirtualMachine(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, networkid, virtualmachineid, **kwargs):
         cmd = addNicToVirtualMachine.addNicToVirtualMachineCmd()
+        cmd.id = self.id
         cmd.networkid = networkid
         cmd.virtualmachineid = virtualmachineid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         nictovirtualmachine = apiclient.addNicToVirtualMachine(cmd)
+        return nictovirtualmachine
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/NiciraNvpDevice.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/NiciraNvpDevice.py b/tools/marvin/marvin/integration/lib/base/NiciraNvpDevice.py
index 311bbae..b85ebcb 100644
--- a/tools/marvin/marvin/integration/lib/base/NiciraNvpDevice.py
+++ b/tools/marvin/marvin/integration/lib/base/NiciraNvpDevice.py
@@ -28,26 +28,30 @@ class NiciraNvpDevice(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, username, physicalnetworkid, password, hostname, transportzoneuuid, **kwargs):
         cmd = addNiciraNvpDevice.addNiciraNvpDeviceCmd()
+        cmd.id = self.id
         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]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         niciranvpdevice = apiclient.addNiciraNvpDevice(cmd)
+        return niciranvpdevice
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listNiciraNvpDevices.listNiciraNvpDevicesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         niciranvpdevice = apiclient.listNiciraNvpDevices(cmd)
         return map(lambda e: NiciraNvpDevice(e.__dict__), niciranvpdevice)
 
 
     def delete(self, apiclient, nvpdeviceid, **kwargs):
         cmd = deleteNiciraNvpDevice.deleteNiciraNvpDeviceCmd()
+        cmd.id = self.id
         cmd.nvpdeviceid = nvpdeviceid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         niciranvpdevice = apiclient.deleteNiciraNvpDevice(cmd)
+        return niciranvpdevice
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/NiciraNvpDeviceNetworks.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/NiciraNvpDeviceNetworks.py b/tools/marvin/marvin/integration/lib/base/NiciraNvpDeviceNetworks.py
index 81da82c..0ee75da 100644
--- a/tools/marvin/marvin/integration/lib/base/NiciraNvpDeviceNetworks.py
+++ b/tools/marvin/marvin/integration/lib/base/NiciraNvpDeviceNetworks.py
@@ -28,7 +28,7 @@ class NiciraNvpDeviceNetworks(CloudStackEntity.CloudStackEntity):
     def list(self, apiclient, nvpdeviceid, **kwargs):
         cmd = listNiciraNvpDeviceNetworks.listNiciraNvpDeviceNetworksCmd()
         cmd.nvpdeviceid = nvpdeviceid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         niciranvpdevicenetworks = apiclient.listNiciraNvpDeviceNetworks(cmd)
         return map(lambda e: NiciraNvpDeviceNetworks(e.__dict__), niciranvpdevicenetworks)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Nics.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Nics.py b/tools/marvin/marvin/integration/lib/base/Nics.py
index c121f74..d31efde 100644
--- a/tools/marvin/marvin/integration/lib/base/Nics.py
+++ b/tools/marvin/marvin/integration/lib/base/Nics.py
@@ -28,6 +28,7 @@ class Nics(CloudStackEntity.CloudStackEntity):
     def list(self, apiclient, virtualmachineid, **kwargs):
         cmd = listNics.listNicsCmd()
         cmd.virtualmachineid = virtualmachineid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         nics = apiclient.listNics(cmd)
         return map(lambda e: Nics(e.__dict__), nics)
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/OsCategories.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/OsCategories.py b/tools/marvin/marvin/integration/lib/base/OsCategories.py
index 7926383..7e911fd 100644
--- a/tools/marvin/marvin/integration/lib/base/OsCategories.py
+++ b/tools/marvin/marvin/integration/lib/base/OsCategories.py
@@ -27,7 +27,7 @@ class OsCategories(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listOsCategories.listOsCategoriesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         oscategories = apiclient.listOsCategories(cmd)
         return map(lambda e: OsCategories(e.__dict__), oscategories)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/OsTypes.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/OsTypes.py b/tools/marvin/marvin/integration/lib/base/OsTypes.py
index 5c2c0d6..209366f 100644
--- a/tools/marvin/marvin/integration/lib/base/OsTypes.py
+++ b/tools/marvin/marvin/integration/lib/base/OsTypes.py
@@ -27,7 +27,7 @@ class OsTypes(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listOsTypes.listOsTypesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         ostypes = apiclient.listOsTypes(cmd)
         return map(lambda e: OsTypes(e.__dict__), ostypes)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/PasswordForVirtualMachine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/PasswordForVirtualMachine.py b/tools/marvin/marvin/integration/lib/base/PasswordForVirtualMachine.py
index 8a6b351..692d6f4 100644
--- a/tools/marvin/marvin/integration/lib/base/PasswordForVirtualMachine.py
+++ b/tools/marvin/marvin/integration/lib/base/PasswordForVirtualMachine.py
@@ -24,13 +24,11 @@ class PasswordForVirtualMachine(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def reset(self, apiclient, id, **kwargs):
         cmd = resetPasswordForVirtualMachine.resetPasswordForVirtualMachineCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         passwordforvirtualmachine = apiclient.resetPasswordForVirtualMachine(cmd)
+        return passwordforvirtualmachine
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/PhysicalNetwork.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/PhysicalNetwork.py b/tools/marvin/marvin/integration/lib/base/PhysicalNetwork.py
index d23f210..f076236 100644
--- a/tools/marvin/marvin/integration/lib/base/PhysicalNetwork.py
+++ b/tools/marvin/marvin/integration/lib/base/PhysicalNetwork.py
@@ -39,21 +39,25 @@ class PhysicalNetwork(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listPhysicalNetworks.listPhysicalNetworksCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         physicalnetwork = apiclient.listPhysicalNetworks(cmd)
         return map(lambda e: PhysicalNetwork(e.__dict__), physicalnetwork)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updatePhysicalNetwork.updatePhysicalNetworkCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         physicalnetwork = apiclient.updatePhysicalNetwork(cmd)
+        return physicalnetwork
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deletePhysicalNetwork.deletePhysicalNetworkCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         physicalnetwork = apiclient.deletePhysicalNetwork(cmd)
+        return physicalnetwork
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Pod.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Pod.py b/tools/marvin/marvin/integration/lib/base/Pod.py
index 811bb82..7258fc4 100644
--- a/tools/marvin/marvin/integration/lib/base/Pod.py
+++ b/tools/marvin/marvin/integration/lib/base/Pod.py
@@ -39,21 +39,25 @@ class Pod(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listPods.listPodsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         pod = apiclient.listPods(cmd)
         return map(lambda e: Pod(e.__dict__), pod)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updatePod.updatePodCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         pod = apiclient.updatePod(cmd)
+        return pod
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deletePod.deletePodCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         pod = apiclient.deletePod(cmd)
+        return pod
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/PortForwardingRule.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/PortForwardingRule.py b/tools/marvin/marvin/integration/lib/base/PortForwardingRule.py
index a215d7d..c45bada 100644
--- a/tools/marvin/marvin/integration/lib/base/PortForwardingRule.py
+++ b/tools/marvin/marvin/integration/lib/base/PortForwardingRule.py
@@ -39,24 +39,28 @@ class PortForwardingRule(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listPortForwardingRules.listPortForwardingRulesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         portforwardingrule = apiclient.listPortForwardingRules(cmd)
         return map(lambda e: PortForwardingRule(e.__dict__), portforwardingrule)
 
 
     def update(self, apiclient, publicport, protocol, ipaddressid, privateport, **kwargs):
         cmd = updatePortForwardingRule.updatePortForwardingRuleCmd()
+        cmd.id = self.id
         cmd.ipaddressid = ipaddressid
         cmd.privateport = privateport
         cmd.protocol = protocol
         cmd.publicport = publicport
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         portforwardingrule = apiclient.updatePortForwardingRule(cmd)
+        return portforwardingrule
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deletePortForwardingRule.deletePortForwardingRuleCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         portforwardingrule = apiclient.deletePortForwardingRule(cmd)
+        return portforwardingrule
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/PrivateGateway.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/PrivateGateway.py b/tools/marvin/marvin/integration/lib/base/PrivateGateway.py
index c5ccef4..bc4cf01 100644
--- a/tools/marvin/marvin/integration/lib/base/PrivateGateway.py
+++ b/tools/marvin/marvin/integration/lib/base/PrivateGateway.py
@@ -38,14 +38,16 @@ class PrivateGateway(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listPrivateGateways.listPrivateGatewaysCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         privategateway = apiclient.listPrivateGateways(cmd)
         return map(lambda e: PrivateGateway(e.__dict__), privategateway)
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deletePrivateGateway.deletePrivateGatewayCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         privategateway = apiclient.deletePrivateGateway(cmd)
+        return privategateway
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Project.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Project.py b/tools/marvin/marvin/integration/lib/base/Project.py
index 1709a69..dfadbb3 100644
--- a/tools/marvin/marvin/integration/lib/base/Project.py
+++ b/tools/marvin/marvin/integration/lib/base/Project.py
@@ -31,9 +31,11 @@ class Project(CloudStackEntity.CloudStackEntity):
 
     def suspend(self, apiclient, id, **kwargs):
         cmd = suspendProject.suspendProjectCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         project = apiclient.suspendProject(cmd)
+        return project
 
 
     @classmethod
@@ -48,28 +50,34 @@ class Project(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listProjects.listProjectsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         project = apiclient.listProjects(cmd)
         return map(lambda e: Project(e.__dict__), project)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateProject.updateProjectCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         project = apiclient.updateProject(cmd)
+        return project
 
 
     def activate(self, apiclient, id, **kwargs):
         cmd = activateProject.activateProjectCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         project = apiclient.activateProject(cmd)
+        return project
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteProject.deleteProjectCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         project = apiclient.deleteProject(cmd)
+        return project
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ProjectAccounts.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ProjectAccounts.py b/tools/marvin/marvin/integration/lib/base/ProjectAccounts.py
index 0f1340f..a325130 100644
--- a/tools/marvin/marvin/integration/lib/base/ProjectAccounts.py
+++ b/tools/marvin/marvin/integration/lib/base/ProjectAccounts.py
@@ -28,7 +28,7 @@ class ProjectAccounts(CloudStackEntity.CloudStackEntity):
     def list(self, apiclient, projectid, **kwargs):
         cmd = listProjectAccounts.listProjectAccountsCmd()
         cmd.projectid = projectid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         projectaccounts = apiclient.listProjectAccounts(cmd)
         return map(lambda e: ProjectAccounts(e.__dict__), projectaccounts)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ProjectInvitation.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ProjectInvitation.py b/tools/marvin/marvin/integration/lib/base/ProjectInvitation.py
index 8174fef..698dc53 100644
--- a/tools/marvin/marvin/integration/lib/base/ProjectInvitation.py
+++ b/tools/marvin/marvin/integration/lib/base/ProjectInvitation.py
@@ -29,21 +29,25 @@ class ProjectInvitation(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listProjectInvitations.listProjectInvitationsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         projectinvitation = apiclient.listProjectInvitations(cmd)
         return map(lambda e: ProjectInvitation(e.__dict__), projectinvitation)
 
 
     def update(self, apiclient, projectid, **kwargs):
         cmd = updateProjectInvitation.updateProjectInvitationCmd()
+        cmd.id = self.id
         cmd.projectid = projectid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         projectinvitation = apiclient.updateProjectInvitation(cmd)
+        return projectinvitation
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteProjectInvitation.deleteProjectInvitationCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         projectinvitation = apiclient.deleteProjectInvitation(cmd)
+        return projectinvitation
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/PublicIpAddresses.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/PublicIpAddresses.py b/tools/marvin/marvin/integration/lib/base/PublicIpAddresses.py
index 5e1dd67..b6601af 100644
--- a/tools/marvin/marvin/integration/lib/base/PublicIpAddresses.py
+++ b/tools/marvin/marvin/integration/lib/base/PublicIpAddresses.py
@@ -27,7 +27,7 @@ class PublicIpAddresses(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listPublicIpAddresses.listPublicIpAddressesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         publicipaddresses = apiclient.listPublicIpAddresses(cmd)
         return map(lambda e: PublicIpAddresses(e.__dict__), publicipaddresses)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Region.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Region.py b/tools/marvin/marvin/integration/lib/base/Region.py
index cd0a07f..32d21ef 100644
--- a/tools/marvin/marvin/integration/lib/base/Region.py
+++ b/tools/marvin/marvin/integration/lib/base/Region.py
@@ -29,30 +29,37 @@ class Region(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, endpoint, id, name, **kwargs):
         cmd = addRegion.addRegionCmd()
+        cmd.id = self.id
         cmd.id = id
         cmd.endpoint = endpoint
         cmd.name = name
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         region = apiclient.addRegion(cmd)
+        return region
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listRegions.listRegionsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         region = apiclient.listRegions(cmd)
         return map(lambda e: Region(e.__dict__), region)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateRegion.updateRegionCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         region = apiclient.updateRegion(cmd)
+        return region
 
 
     def remove(self, apiclient, id, **kwargs):
         cmd = removeRegion.removeRegionCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         region = apiclient.removeRegion(cmd)
+        return region
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/RemoteAccessVpn.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/RemoteAccessVpn.py b/tools/marvin/marvin/integration/lib/base/RemoteAccessVpn.py
index a815550..339d706 100644
--- a/tools/marvin/marvin/integration/lib/base/RemoteAccessVpn.py
+++ b/tools/marvin/marvin/integration/lib/base/RemoteAccessVpn.py
@@ -39,14 +39,16 @@ class RemoteAccessVpn(CloudStackEntity.CloudStackEntity):
     def list(self, apiclient, publicipid, **kwargs):
         cmd = listRemoteAccessVpns.listRemoteAccessVpnsCmd()
         cmd.publicipid = publicipid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         remoteaccessvpn = apiclient.listRemoteAccessVpns(cmd)
         return map(lambda e: RemoteAccessVpn(e.__dict__), remoteaccessvpn)
 
 
     def delete(self, apiclient, publicipid, **kwargs):
         cmd = deleteRemoteAccessVpn.deleteRemoteAccessVpnCmd()
+        cmd.id = self.id
         cmd.publicipid = publicipid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         remoteaccessvpn = apiclient.deleteRemoteAccessVpn(cmd)
+        return remoteaccessvpn
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Remove.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Remove.py b/tools/marvin/marvin/integration/lib/base/Remove.py
index 8bf386a..616d94e 100644
--- a/tools/marvin/marvin/integration/lib/base/Remove.py
+++ b/tools/marvin/marvin/integration/lib/base/Remove.py
@@ -26,6 +26,8 @@ class Remove(CloudStackEntity.CloudStackEntity):
 
     def ldap(self, apiclient, **kwargs):
         cmd = ldapRemove.ldapRemoveCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         remove = apiclient.ldapRemove(cmd)
+        return remove
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ResourceCount.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ResourceCount.py b/tools/marvin/marvin/integration/lib/base/ResourceCount.py
index 9677d2e..dced15d 100644
--- a/tools/marvin/marvin/integration/lib/base/ResourceCount.py
+++ b/tools/marvin/marvin/integration/lib/base/ResourceCount.py
@@ -24,13 +24,11 @@ class ResourceCount(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def update(self, apiclient, domainid, **kwargs):
         cmd = updateResourceCount.updateResourceCountCmd()
+        cmd.id = self.id
         cmd.domainid = domainid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         resourcecount = apiclient.updateResourceCount(cmd)
+        return resourcecount
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ResourceLimit.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ResourceLimit.py b/tools/marvin/marvin/integration/lib/base/ResourceLimit.py
index 7729aae..bdddadd 100644
--- a/tools/marvin/marvin/integration/lib/base/ResourceLimit.py
+++ b/tools/marvin/marvin/integration/lib/base/ResourceLimit.py
@@ -28,14 +28,16 @@ class ResourceLimit(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listResourceLimits.listResourceLimitsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         resourcelimit = apiclient.listResourceLimits(cmd)
         return map(lambda e: ResourceLimit(e.__dict__), resourcelimit)
 
 
     def update(self, apiclient, resourcetype, **kwargs):
         cmd = updateResourceLimit.updateResourceLimitCmd()
+        cmd.id = self.id
         cmd.resourcetype = resourcetype
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         resourcelimit = apiclient.updateResourceLimit(cmd)
+        return resourcelimit
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Router.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Router.py b/tools/marvin/marvin/integration/lib/base/Router.py
index cca14fd..5b6cd57 100644
--- a/tools/marvin/marvin/integration/lib/base/Router.py
+++ b/tools/marvin/marvin/integration/lib/base/Router.py
@@ -30,36 +30,44 @@ class Router(CloudStackEntity.CloudStackEntity):
 
     def destroy(self, apiclient, id, **kwargs):
         cmd = destroyRouter.destroyRouterCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         router = apiclient.destroyRouter(cmd)
+        return router
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listRouters.listRoutersCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         router = apiclient.listRouters(cmd)
         return map(lambda e: Router(e.__dict__), router)
 
 
     def stop(self, apiclient, id, **kwargs):
         cmd = stopRouter.stopRouterCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         router = apiclient.stopRouter(cmd)
+        return router
 
 
     def reboot(self, apiclient, id, **kwargs):
         cmd = rebootRouter.rebootRouterCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         router = apiclient.rebootRouter(cmd)
+        return router
 
 
     def start(self, apiclient, id, **kwargs):
         cmd = startRouter.startRouterCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         router = apiclient.startRouter(cmd)
+        return router
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/S3.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/S3.py b/tools/marvin/marvin/integration/lib/base/S3.py
index 39e59f6..ce1d65a 100644
--- a/tools/marvin/marvin/integration/lib/base/S3.py
+++ b/tools/marvin/marvin/integration/lib/base/S3.py
@@ -27,17 +27,19 @@ class S3(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, secretkey, accesskey, bucket, **kwargs):
         cmd = addS3.addS3Cmd()
+        cmd.id = self.id
         cmd.accesskey = accesskey
         cmd.bucket = bucket
         cmd.secretkey = secretkey
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         s3 = apiclient.addS3(cmd)
+        return s3
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listS3s.listS3sCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         s3 = apiclient.listS3s(cmd)
         return map(lambda e: S3(e.__dict__), s3)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SSHKeyForVirtualMachine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SSHKeyForVirtualMachine.py b/tools/marvin/marvin/integration/lib/base/SSHKeyForVirtualMachine.py
index ed2f0e9..40e5712 100644
--- a/tools/marvin/marvin/integration/lib/base/SSHKeyForVirtualMachine.py
+++ b/tools/marvin/marvin/integration/lib/base/SSHKeyForVirtualMachine.py
@@ -26,7 +26,10 @@ class SSHKeyForVirtualMachine(CloudStackEntity.CloudStackEntity):
 
     def reset(self, apiclient, keypair, id, **kwargs):
         cmd = resetSSHKeyForVirtualMachine.resetSSHKeyForVirtualMachineCmd()
+        cmd.id = self.id
         cmd.id = id
         cmd.keypair = keypair
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         sshkeyforvirtualmachine = apiclient.resetSSHKeyForVirtualMachine(cmd)
+        return sshkeyforvirtualmachine
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SSHKeyPair.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SSHKeyPair.py b/tools/marvin/marvin/integration/lib/base/SSHKeyPair.py
index ded6dfb..f080455 100644
--- a/tools/marvin/marvin/integration/lib/base/SSHKeyPair.py
+++ b/tools/marvin/marvin/integration/lib/base/SSHKeyPair.py
@@ -38,23 +38,27 @@ class SSHKeyPair(CloudStackEntity.CloudStackEntity):
 
     def register(self, apiclient, publickey, name, **kwargs):
         cmd = registerSSHKeyPair.registerSSHKeyPairCmd()
+        cmd.id = self.id
         cmd.name = name
         cmd.publickey = publickey
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         sshkeypair = apiclient.registerSSHKeyPair(cmd)
+        return sshkeypair
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listSSHKeyPairs.listSSHKeyPairsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         sshkeypair = apiclient.listSSHKeyPairs(cmd)
         return map(lambda e: SSHKeyPair(e.__dict__), sshkeypair)
 
 
     def delete(self, apiclient, name, **kwargs):
         cmd = deleteSSHKeyPair.deleteSSHKeyPairCmd()
+        cmd.id = self.id
         cmd.name = name
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         sshkeypair = apiclient.deleteSSHKeyPair(cmd)
+        return sshkeypair
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SecondaryStorage.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SecondaryStorage.py b/tools/marvin/marvin/integration/lib/base/SecondaryStorage.py
index cc18f41..535d797 100644
--- a/tools/marvin/marvin/integration/lib/base/SecondaryStorage.py
+++ b/tools/marvin/marvin/integration/lib/base/SecondaryStorage.py
@@ -24,13 +24,11 @@ class SecondaryStorage(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def add(self, apiclient, url, **kwargs):
         cmd = addSecondaryStorage.addSecondaryStorageCmd()
+        cmd.id = self.id
         cmd.url = url
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         secondarystorage = apiclient.addSecondaryStorage(cmd)
+        return secondarystorage
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SecurityGroup.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SecurityGroup.py b/tools/marvin/marvin/integration/lib/base/SecurityGroup.py
index 9ed1007..38e0d4a 100644
--- a/tools/marvin/marvin/integration/lib/base/SecurityGroup.py
+++ b/tools/marvin/marvin/integration/lib/base/SecurityGroup.py
@@ -38,13 +38,15 @@ class SecurityGroup(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listSecurityGroups.listSecurityGroupsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         securitygroup = apiclient.listSecurityGroups(cmd)
         return map(lambda e: SecurityGroup(e.__dict__), securitygroup)
 
 
     def delete(self, apiclient, **kwargs):
         cmd = deleteSecurityGroup.deleteSecurityGroupCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         securitygroup = apiclient.deleteSecurityGroup(cmd)
+        return securitygroup
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SecurityGroupEgress.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SecurityGroupEgress.py b/tools/marvin/marvin/integration/lib/base/SecurityGroupEgress.py
index 995705c..27dd5e3 100644
--- a/tools/marvin/marvin/integration/lib/base/SecurityGroupEgress.py
+++ b/tools/marvin/marvin/integration/lib/base/SecurityGroupEgress.py
@@ -25,19 +25,19 @@ class SecurityGroupEgress(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def authorize(self, apiclient, **kwargs):
         cmd = authorizeSecurityGroupEgress.authorizeSecurityGroupEgressCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         securitygroupegress = apiclient.authorizeSecurityGroupEgress(cmd)
+        return securitygroupegress
 
 
     def revoke(self, apiclient, id, **kwargs):
         cmd = revokeSecurityGroupEgress.revokeSecurityGroupEgressCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         securitygroupegress = apiclient.revokeSecurityGroupEgress(cmd)
+        return securitygroupegress
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SecurityGroupIngress.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SecurityGroupIngress.py b/tools/marvin/marvin/integration/lib/base/SecurityGroupIngress.py
index 12e8848..5ada4a4 100644
--- a/tools/marvin/marvin/integration/lib/base/SecurityGroupIngress.py
+++ b/tools/marvin/marvin/integration/lib/base/SecurityGroupIngress.py
@@ -25,19 +25,19 @@ class SecurityGroupIngress(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def authorize(self, apiclient, **kwargs):
         cmd = authorizeSecurityGroupIngress.authorizeSecurityGroupIngressCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         securitygroupingress = apiclient.authorizeSecurityGroupIngress(cmd)
+        return securitygroupingress
 
 
     def revoke(self, apiclient, id, **kwargs):
         cmd = revokeSecurityGroupIngress.revokeSecurityGroupIngressCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         securitygroupingress = apiclient.revokeSecurityGroupIngress(cmd)
+        return securitygroupingress
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ServiceForRouter.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ServiceForRouter.py b/tools/marvin/marvin/integration/lib/base/ServiceForRouter.py
index 645f035..b11591b 100644
--- a/tools/marvin/marvin/integration/lib/base/ServiceForRouter.py
+++ b/tools/marvin/marvin/integration/lib/base/ServiceForRouter.py
@@ -24,14 +24,12 @@ class ServiceForRouter(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def change(self, apiclient, id, serviceofferingid, **kwargs):
         cmd = changeServiceForRouter.changeServiceForRouterCmd()
+        cmd.id = self.id
         cmd.id = id
         cmd.serviceofferingid = serviceofferingid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         serviceforrouter = apiclient.changeServiceForRouter(cmd)
+        return serviceforrouter
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ServiceForSystemVm.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ServiceForSystemVm.py b/tools/marvin/marvin/integration/lib/base/ServiceForSystemVm.py
index 0f29f99..51e35c3 100644
--- a/tools/marvin/marvin/integration/lib/base/ServiceForSystemVm.py
+++ b/tools/marvin/marvin/integration/lib/base/ServiceForSystemVm.py
@@ -24,14 +24,12 @@ class ServiceForSystemVm(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def change(self, apiclient, id, serviceofferingid, **kwargs):
         cmd = changeServiceForSystemVm.changeServiceForSystemVmCmd()
+        cmd.id = self.id
         cmd.id = id
         cmd.serviceofferingid = serviceofferingid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         serviceforsystemvm = apiclient.changeServiceForSystemVm(cmd)
+        return serviceforsystemvm
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ServiceForVirtualMachine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ServiceForVirtualMachine.py b/tools/marvin/marvin/integration/lib/base/ServiceForVirtualMachine.py
index 0fdf295..ee83788 100644
--- a/tools/marvin/marvin/integration/lib/base/ServiceForVirtualMachine.py
+++ b/tools/marvin/marvin/integration/lib/base/ServiceForVirtualMachine.py
@@ -24,14 +24,12 @@ class ServiceForVirtualMachine(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def change(self, apiclient, id, serviceofferingid, **kwargs):
         cmd = changeServiceForVirtualMachine.changeServiceForVirtualMachineCmd()
+        cmd.id = self.id
         cmd.id = id
         cmd.serviceofferingid = serviceofferingid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         serviceforvirtualmachine = apiclient.changeServiceForVirtualMachine(cmd)
+        return serviceforvirtualmachine
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ServiceOffering.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ServiceOffering.py b/tools/marvin/marvin/integration/lib/base/ServiceOffering.py
index 04c69fb..1f3c26d 100644
--- a/tools/marvin/marvin/integration/lib/base/ServiceOffering.py
+++ b/tools/marvin/marvin/integration/lib/base/ServiceOffering.py
@@ -39,21 +39,25 @@ class ServiceOffering(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listServiceOfferings.listServiceOfferingsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         serviceoffering = apiclient.listServiceOfferings(cmd)
         return map(lambda e: ServiceOffering(e.__dict__), serviceoffering)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateServiceOffering.updateServiceOfferingCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         serviceoffering = apiclient.updateServiceOffering(cmd)
+        return serviceoffering
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteServiceOffering.deleteServiceOfferingCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         serviceoffering = apiclient.deleteServiceOffering(cmd)
+        return serviceoffering
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Simulator.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Simulator.py b/tools/marvin/marvin/integration/lib/base/Simulator.py
index 41cdcd2..8659dc1 100644
--- a/tools/marvin/marvin/integration/lib/base/Simulator.py
+++ b/tools/marvin/marvin/integration/lib/base/Simulator.py
@@ -26,7 +26,10 @@ class Simulator(CloudStackEntity.CloudStackEntity):
 
     def configure(self, apiclient, name, value, **kwargs):
         cmd = configureSimulator.configureSimulatorCmd()
+        cmd.id = self.id
         cmd.name = name
         cmd.value = value
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         simulator = apiclient.configureSimulator(cmd)
+        return simulator
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Snapshot.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Snapshot.py b/tools/marvin/marvin/integration/lib/base/Snapshot.py
index fac492f..b69228a 100644
--- a/tools/marvin/marvin/integration/lib/base/Snapshot.py
+++ b/tools/marvin/marvin/integration/lib/base/Snapshot.py
@@ -38,14 +38,16 @@ class Snapshot(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listSnapshots.listSnapshotsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         snapshot = apiclient.listSnapshots(cmd)
         return map(lambda e: Snapshot(e.__dict__), snapshot)
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteSnapshot.deleteSnapshotCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         snapshot = apiclient.deleteSnapshot(cmd)
+        return snapshot
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SnapshotPolicies.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SnapshotPolicies.py b/tools/marvin/marvin/integration/lib/base/SnapshotPolicies.py
index c050225..5daa7cc 100644
--- a/tools/marvin/marvin/integration/lib/base/SnapshotPolicies.py
+++ b/tools/marvin/marvin/integration/lib/base/SnapshotPolicies.py
@@ -29,13 +29,15 @@ class SnapshotPolicies(CloudStackEntity.CloudStackEntity):
     def list(self, apiclient, volumeid, **kwargs):
         cmd = listSnapshotPolicies.listSnapshotPoliciesCmd()
         cmd.volumeid = volumeid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         snapshotpolicies = apiclient.listSnapshotPolicies(cmd)
         return map(lambda e: SnapshotPolicies(e.__dict__), snapshotpolicies)
 
 
     def delete(self, apiclient, **kwargs):
         cmd = deleteSnapshotPolicies.deleteSnapshotPoliciesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         snapshotpolicies = apiclient.deleteSnapshotPolicies(cmd)
+        return snapshotpolicies
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/StaticNat.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/StaticNat.py b/tools/marvin/marvin/integration/lib/base/StaticNat.py
index 87e22f0..3fb5430 100644
--- a/tools/marvin/marvin/integration/lib/base/StaticNat.py
+++ b/tools/marvin/marvin/integration/lib/base/StaticNat.py
@@ -25,21 +25,21 @@ class StaticNat(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def enable(self, apiclient, ipaddressid, virtualmachineid, **kwargs):
         cmd = enableStaticNat.enableStaticNatCmd()
+        cmd.id = self.id
         cmd.ipaddressid = ipaddressid
         cmd.virtualmachineid = virtualmachineid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         staticnat = apiclient.enableStaticNat(cmd)
+        return staticnat
 
 
     def disable(self, apiclient, ipaddressid, **kwargs):
         cmd = disableStaticNat.disableStaticNatCmd()
+        cmd.id = self.id
         cmd.ipaddressid = ipaddressid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         staticnat = apiclient.disableStaticNat(cmd)
+        return staticnat
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/StaticRoute.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/StaticRoute.py b/tools/marvin/marvin/integration/lib/base/StaticRoute.py
index 8e6a08b..5a12907 100644
--- a/tools/marvin/marvin/integration/lib/base/StaticRoute.py
+++ b/tools/marvin/marvin/integration/lib/base/StaticRoute.py
@@ -38,14 +38,16 @@ class StaticRoute(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listStaticRoutes.listStaticRoutesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         staticroute = apiclient.listStaticRoutes(cmd)
         return map(lambda e: StaticRoute(e.__dict__), staticroute)
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteStaticRoute.deleteStaticRouteCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         staticroute = apiclient.deleteStaticRoute(cmd)
+        return staticroute
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/StorageMaintenance.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/StorageMaintenance.py b/tools/marvin/marvin/integration/lib/base/StorageMaintenance.py
index b33a464..09ed406 100644
--- a/tools/marvin/marvin/integration/lib/base/StorageMaintenance.py
+++ b/tools/marvin/marvin/integration/lib/base/StorageMaintenance.py
@@ -25,20 +25,20 @@ class StorageMaintenance(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def cancel(self, apiclient, id, **kwargs):
         cmd = cancelStorageMaintenance.cancelStorageMaintenanceCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         storagemaintenance = apiclient.cancelStorageMaintenance(cmd)
+        return storagemaintenance
 
 
     def enable(self, apiclient, id, **kwargs):
         cmd = enableStorageMaintenance.enableStorageMaintenanceCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         storagemaintenance = apiclient.enableStorageMaintenance(cmd)
+        return storagemaintenance
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/StorageNetworkIpRange.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/StorageNetworkIpRange.py b/tools/marvin/marvin/integration/lib/base/StorageNetworkIpRange.py
index e431662..c29b348 100644
--- a/tools/marvin/marvin/integration/lib/base/StorageNetworkIpRange.py
+++ b/tools/marvin/marvin/integration/lib/base/StorageNetworkIpRange.py
@@ -39,21 +39,25 @@ class StorageNetworkIpRange(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listStorageNetworkIpRange.listStorageNetworkIpRangeCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         storagenetworkiprange = apiclient.listStorageNetworkIpRange(cmd)
         return map(lambda e: StorageNetworkIpRange(e.__dict__), storagenetworkiprange)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateStorageNetworkIpRange.updateStorageNetworkIpRangeCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         storagenetworkiprange = apiclient.updateStorageNetworkIpRange(cmd)
+        return storagenetworkiprange
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteStorageNetworkIpRange.deleteStorageNetworkIpRangeCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         storagenetworkiprange = apiclient.deleteStorageNetworkIpRange(cmd)
+        return storagenetworkiprange
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/StoragePool.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/StoragePool.py b/tools/marvin/marvin/integration/lib/base/StoragePool.py
index f8000b5..91fd261 100644
--- a/tools/marvin/marvin/integration/lib/base/StoragePool.py
+++ b/tools/marvin/marvin/integration/lib/base/StoragePool.py
@@ -39,21 +39,25 @@ class StoragePool(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listStoragePools.listStoragePoolsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         storagepool = apiclient.listStoragePools(cmd)
         return map(lambda e: StoragePool(e.__dict__), storagepool)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateStoragePool.updateStoragePoolCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         storagepool = apiclient.updateStoragePool(cmd)
+        return storagepool
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteStoragePool.deleteStoragePoolCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         storagepool = apiclient.deleteStoragePool(cmd)
+        return storagepool
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/StorageProviders.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/StorageProviders.py b/tools/marvin/marvin/integration/lib/base/StorageProviders.py
new file mode 100644
index 0000000..406282f
--- /dev/null
+++ b/tools/marvin/marvin/integration/lib/base/StorageProviders.py
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.integration.lib.base import CloudStackEntity
+from marvin.cloudstackAPI import listStorageProviders
+
+class StorageProviders(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def list(self, apiclient, type, **kwargs):
+        cmd = listStorageProviders.listStorageProvidersCmd()
+        cmd.type = type
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        storageproviders = apiclient.listStorageProviders(cmd)
+        return map(lambda e: StorageProviders(e.__dict__), storageproviders)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SupportedNetworkServices.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SupportedNetworkServices.py b/tools/marvin/marvin/integration/lib/base/SupportedNetworkServices.py
index 02d0530..081aa6f 100644
--- a/tools/marvin/marvin/integration/lib/base/SupportedNetworkServices.py
+++ b/tools/marvin/marvin/integration/lib/base/SupportedNetworkServices.py
@@ -27,7 +27,7 @@ class SupportedNetworkServices(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listSupportedNetworkServices.listSupportedNetworkServicesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         supportednetworkservices = apiclient.listSupportedNetworkServices(cmd)
         return map(lambda e: SupportedNetworkServices(e.__dict__), supportednetworkservices)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Swift.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Swift.py b/tools/marvin/marvin/integration/lib/base/Swift.py
index ab3dec3..0a02280 100644
--- a/tools/marvin/marvin/integration/lib/base/Swift.py
+++ b/tools/marvin/marvin/integration/lib/base/Swift.py
@@ -27,15 +27,17 @@ class Swift(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, url, **kwargs):
         cmd = addSwift.addSwiftCmd()
+        cmd.id = self.id
         cmd.url = url
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         swift = apiclient.addSwift(cmd)
+        return swift
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listSwifts.listSwiftsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         swift = apiclient.listSwifts(cmd)
         return map(lambda e: Swift(e.__dict__), swift)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/SystemVm.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/SystemVm.py b/tools/marvin/marvin/integration/lib/base/SystemVm.py
index 8e51acc..657e4df 100644
--- a/tools/marvin/marvin/integration/lib/base/SystemVm.py
+++ b/tools/marvin/marvin/integration/lib/base/SystemVm.py
@@ -31,44 +31,54 @@ class SystemVm(CloudStackEntity.CloudStackEntity):
 
     def migrate(self, apiclient, hostid, virtualmachineid, **kwargs):
         cmd = migrateSystemVm.migrateSystemVmCmd()
+        cmd.id = self.id
         cmd.hostid = hostid
         cmd.virtualmachineid = virtualmachineid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         systemvm = apiclient.migrateSystemVm(cmd)
+        return systemvm
 
 
     def stop(self, apiclient, id, **kwargs):
         cmd = stopSystemVm.stopSystemVmCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         systemvm = apiclient.stopSystemVm(cmd)
+        return systemvm
 
 
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listSystemVms.listSystemVmsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         systemvm = apiclient.listSystemVms(cmd)
         return map(lambda e: SystemVm(e.__dict__), systemvm)
 
 
     def reboot(self, apiclient, id, **kwargs):
         cmd = rebootSystemVm.rebootSystemVmCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         systemvm = apiclient.rebootSystemVm(cmd)
+        return systemvm
 
 
     def start(self, apiclient, id, **kwargs):
         cmd = startSystemVm.startSystemVmCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         systemvm = apiclient.startSystemVm(cmd)
+        return systemvm
 
 
     def destroy(self, apiclient, id, **kwargs):
         cmd = destroySystemVm.destroySystemVmCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         systemvm = apiclient.destroySystemVm(cmd)
+        return systemvm
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Tags.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Tags.py b/tools/marvin/marvin/integration/lib/base/Tags.py
index e044a41..24ba720 100644
--- a/tools/marvin/marvin/integration/lib/base/Tags.py
+++ b/tools/marvin/marvin/integration/lib/base/Tags.py
@@ -38,15 +38,17 @@ class Tags(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listTags.listTagsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         tags = apiclient.listTags(cmd)
         return map(lambda e: Tags(e.__dict__), tags)
 
 
     def delete(self, apiclient, resourcetype, resourceids, **kwargs):
         cmd = deleteTags.deleteTagsCmd()
+        cmd.id = self.id
         cmd.resourceids = resourceids
         cmd.resourcetype = resourcetype
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         tags = apiclient.deleteTags(cmd)
+        return tags
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/Template.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/Template.py b/tools/marvin/marvin/integration/lib/base/Template.py
index e839c14..ec74d30 100644
--- a/tools/marvin/marvin/integration/lib/base/Template.py
+++ b/tools/marvin/marvin/integration/lib/base/Template.py
@@ -33,10 +33,12 @@ class Template(CloudStackEntity.CloudStackEntity):
 
     def prepare(self, apiclient, zoneid, templateid, **kwargs):
         cmd = prepareTemplate.prepareTemplateCmd()
+        cmd.id = self.id
         cmd.templateid = templateid
         cmd.zoneid = zoneid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         template = apiclient.prepareTemplate(cmd)
+        return template
 
 
     @classmethod
@@ -50,6 +52,7 @@ class Template(CloudStackEntity.CloudStackEntity):
 
     def register(self, apiclient, name, format, url, hypervisor, zoneid, displaytext, ostypeid, **kwargs):
         cmd = registerTemplate.registerTemplateCmd()
+        cmd.id = self.id
         cmd.displaytext = displaytext
         cmd.format = format
         cmd.hypervisor = hypervisor
@@ -57,46 +60,55 @@ class Template(CloudStackEntity.CloudStackEntity):
         cmd.ostypeid = ostypeid
         cmd.url = url
         cmd.zoneid = zoneid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         template = apiclient.registerTemplate(cmd)
+        return template
 
 
     @classmethod
     def list(self, apiclient, templatefilter, **kwargs):
         cmd = listTemplates.listTemplatesCmd()
         cmd.templatefilter = templatefilter
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         template = apiclient.listTemplates(cmd)
         return map(lambda e: Template(e.__dict__), template)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateTemplate.updateTemplateCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         template = apiclient.updateTemplate(cmd)
+        return template
 
 
     def copy(self, apiclient, sourcezoneid, id, destzoneid, **kwargs):
         cmd = copyTemplate.copyTemplateCmd()
+        cmd.id = self.id
         cmd.id = id
         cmd.destzoneid = destzoneid
         cmd.sourcezoneid = sourcezoneid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         template = apiclient.copyTemplate(cmd)
+        return template
 
 
     def extract(self, apiclient, id, mode, **kwargs):
         cmd = extractTemplate.extractTemplateCmd()
+        cmd.id = self.id
         cmd.id = id
         cmd.mode = mode
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         template = apiclient.extractTemplate(cmd)
+        return template
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteTemplate.deleteTemplateCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         template = apiclient.deleteTemplate(cmd)
+        return template
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/TemplatePermissions.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/TemplatePermissions.py b/tools/marvin/marvin/integration/lib/base/TemplatePermissions.py
index 0fc4401..56f3b20 100644
--- a/tools/marvin/marvin/integration/lib/base/TemplatePermissions.py
+++ b/tools/marvin/marvin/integration/lib/base/TemplatePermissions.py
@@ -29,14 +29,16 @@ class TemplatePermissions(CloudStackEntity.CloudStackEntity):
     def list(self, apiclient, id, **kwargs):
         cmd = listTemplatePermissions.listTemplatePermissionsCmd()
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         templatepermissions = apiclient.listTemplatePermissions(cmd)
         return map(lambda e: TemplatePermissions(e.__dict__), templatepermissions)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateTemplatePermissions.updateTemplatePermissionsCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         templatepermissions = apiclient.updateTemplatePermissions(cmd)
+        return templatepermissions
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ToGlobalLoadBalancerRule.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ToGlobalLoadBalancerRule.py b/tools/marvin/marvin/integration/lib/base/ToGlobalLoadBalancerRule.py
new file mode 100644
index 0000000..e5a2ede
--- /dev/null
+++ b/tools/marvin/marvin/integration/lib/base/ToGlobalLoadBalancerRule.py
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.integration.lib.base import CloudStackEntity
+from marvin.cloudstackAPI import assignToGlobalLoadBalancerRule
+
+class ToGlobalLoadBalancerRule(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    def assign(self, apiclient, loadbalancerrulelist, id, **kwargs):
+        cmd = assignToGlobalLoadBalancerRule.assignToGlobalLoadBalancerRuleCmd()
+        cmd.id = self.id
+        cmd.id = id
+        cmd.loadbalancerrulelist = loadbalancerrulelist
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        togloballoadbalancerrule = apiclient.assignToGlobalLoadBalancerRule(cmd)
+        return togloballoadbalancerrule

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/ToLoadBalancerRule.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/ToLoadBalancerRule.py b/tools/marvin/marvin/integration/lib/base/ToLoadBalancerRule.py
index 6cd2b3d..552c9ac 100644
--- a/tools/marvin/marvin/integration/lib/base/ToLoadBalancerRule.py
+++ b/tools/marvin/marvin/integration/lib/base/ToLoadBalancerRule.py
@@ -24,14 +24,12 @@ class ToLoadBalancerRule(CloudStackEntity.CloudStackEntity):
         self.__dict__.update(items)
 
 
-    def __init__(self, items):
-        self.__dict__.update(items)
-
-
     def assign(self, apiclient, id, virtualmachineids, **kwargs):
         cmd = assignToLoadBalancerRule.assignToLoadBalancerRuleCmd()
+        cmd.id = self.id
         cmd.id = id
         cmd.virtualmachineids = virtualmachineids
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         toloadbalancerrule = apiclient.assignToLoadBalancerRule(cmd)
+        return toloadbalancerrule
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/TrafficMonitor.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/TrafficMonitor.py b/tools/marvin/marvin/integration/lib/base/TrafficMonitor.py
index 4770f8b..3fadecd 100644
--- a/tools/marvin/marvin/integration/lib/base/TrafficMonitor.py
+++ b/tools/marvin/marvin/integration/lib/base/TrafficMonitor.py
@@ -28,24 +28,28 @@ class TrafficMonitor(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, url, zoneid, **kwargs):
         cmd = addTrafficMonitor.addTrafficMonitorCmd()
+        cmd.id = self.id
         cmd.url = url
         cmd.zoneid = zoneid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         trafficmonitor = apiclient.addTrafficMonitor(cmd)
+        return trafficmonitor
 
 
     @classmethod
     def list(self, apiclient, zoneid, **kwargs):
         cmd = listTrafficMonitors.listTrafficMonitorsCmd()
         cmd.zoneid = zoneid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         trafficmonitor = apiclient.listTrafficMonitors(cmd)
         return map(lambda e: TrafficMonitor(e.__dict__), trafficmonitor)
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteTrafficMonitor.deleteTrafficMonitorCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         trafficmonitor = apiclient.deleteTrafficMonitor(cmd)
+        return trafficmonitor
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/TrafficType.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/TrafficType.py b/tools/marvin/marvin/integration/lib/base/TrafficType.py
index 7a14083..7ef028c 100644
--- a/tools/marvin/marvin/integration/lib/base/TrafficType.py
+++ b/tools/marvin/marvin/integration/lib/base/TrafficType.py
@@ -29,31 +29,37 @@ class TrafficType(CloudStackEntity.CloudStackEntity):
 
     def add(self, apiclient, traffictype, physicalnetworkid, **kwargs):
         cmd = addTrafficType.addTrafficTypeCmd()
+        cmd.id = self.id
         cmd.physicalnetworkid = physicalnetworkid
         cmd.traffictype = traffictype
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         traffictype = apiclient.addTrafficType(cmd)
+        return traffictype
 
 
     @classmethod
     def list(self, apiclient, physicalnetworkid, **kwargs):
         cmd = listTrafficTypes.listTrafficTypesCmd()
         cmd.physicalnetworkid = physicalnetworkid
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         traffictype = apiclient.listTrafficTypes(cmd)
         return map(lambda e: TrafficType(e.__dict__), traffictype)
 
 
     def update(self, apiclient, id, **kwargs):
         cmd = updateTrafficType.updateTrafficTypeCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         traffictype = apiclient.updateTrafficType(cmd)
+        return traffictype
 
 
     def delete(self, apiclient, id, **kwargs):
         cmd = deleteTrafficType.deleteTrafficTypeCmd()
+        cmd.id = self.id
         cmd.id = id
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         traffictype = apiclient.deleteTrafficType(cmd)
+        return traffictype
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/TrafficTypeImplementors.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/TrafficTypeImplementors.py b/tools/marvin/marvin/integration/lib/base/TrafficTypeImplementors.py
index 36b3ebc..50277f3 100644
--- a/tools/marvin/marvin/integration/lib/base/TrafficTypeImplementors.py
+++ b/tools/marvin/marvin/integration/lib/base/TrafficTypeImplementors.py
@@ -27,7 +27,7 @@ class TrafficTypeImplementors(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listTrafficTypeImplementors.listTrafficTypeImplementorsCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         traffictypeimplementors = apiclient.listTrafficTypeImplementors(cmd)
         return map(lambda e: TrafficTypeImplementors(e.__dict__), traffictypeimplementors)
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/UsageRecords.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/UsageRecords.py b/tools/marvin/marvin/integration/lib/base/UsageRecords.py
index 8eb2c82..6c0776c 100644
--- a/tools/marvin/marvin/integration/lib/base/UsageRecords.py
+++ b/tools/marvin/marvin/integration/lib/base/UsageRecords.py
@@ -30,15 +30,17 @@ class UsageRecords(CloudStackEntity.CloudStackEntity):
         cmd = listUsageRecords.listUsageRecordsCmd()
         cmd.enddate = enddate
         cmd.startdate = startdate
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         usagerecords = apiclient.listUsageRecords(cmd)
         return map(lambda e: UsageRecords(e.__dict__), usagerecords)
 
 
     def generate(self, apiclient, startdate, enddate, **kwargs):
         cmd = generateUsageRecords.generateUsageRecordsCmd()
+        cmd.id = self.id
         cmd.enddate = enddate
         cmd.startdate = startdate
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         usagerecords = apiclient.generateUsageRecords(cmd)
+        return usagerecords
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cef66347/tools/marvin/marvin/integration/lib/base/UsageTypes.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base/UsageTypes.py b/tools/marvin/marvin/integration/lib/base/UsageTypes.py
index d0e8dcd..a490643 100644
--- a/tools/marvin/marvin/integration/lib/base/UsageTypes.py
+++ b/tools/marvin/marvin/integration/lib/base/UsageTypes.py
@@ -27,7 +27,7 @@ class UsageTypes(CloudStackEntity.CloudStackEntity):
     @classmethod
     def list(self, apiclient, **kwargs):
         cmd = listUsageTypes.listUsageTypesCmd()
-        [setattr(cmd, key, value) for key,value in kwargs.items]
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
         usagetypes = apiclient.listUsageTypes(cmd)
         return map(lambda e: UsageTypes(e.__dict__), usagetypes)
 


Mime
View raw message