cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [15/17] make the module structure more relevant and simple
Date Sun, 21 Apr 2013 12:23:28 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/S3.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/S3.py b/tools/marvin/marvin/base/S3.py
new file mode 100644
index 0000000..c69f65c
--- /dev/null
+++ b/tools/marvin/marvin/base/S3.py
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.base import CloudStackEntity
+from marvin.cloudstackAPI import addS3
+from marvin.cloudstackAPI import listS3s
+
+class S3(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    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.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.iteritems()]
+        s3 = apiclient.listS3s(cmd)
+        return map(lambda e: S3(e.__dict__), s3)
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/SSHKeyPair.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/SSHKeyPair.py b/tools/marvin/marvin/base/SSHKeyPair.py
new file mode 100644
index 0000000..88bb12e
--- /dev/null
+++ b/tools/marvin/marvin/base/SSHKeyPair.py
@@ -0,0 +1,64 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createSSHKeyPair
+from marvin.cloudstackAPI import registerSSHKeyPair
+from marvin.cloudstackAPI import listSSHKeyPairs
+from marvin.cloudstackAPI import deleteSSHKeyPair
+
+class SSHKeyPair(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createSSHKeyPair.createSSHKeyPairCmd()
+        [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__)
+
+
+    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.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.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.iteritems()]
+        sshkeypair = apiclient.deleteSSHKeyPair(cmd)
+        return sshkeypair
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/SecondaryStorage.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/SecondaryStorage.py b/tools/marvin/marvin/base/SecondaryStorage.py
new file mode 100644
index 0000000..332e1b0
--- /dev/null
+++ b/tools/marvin/marvin/base/SecondaryStorage.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.base import CloudStackEntity
+from marvin.cloudstackAPI import addSecondaryStorage
+
+class SecondaryStorage(CloudStackEntity.CloudStackEntity):
+
+
+    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.iteritems()]
+        secondarystorage = apiclient.addSecondaryStorage(cmd)
+        return secondarystorage
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/SecurityGroup.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/SecurityGroup.py b/tools/marvin/marvin/base/SecurityGroup.py
new file mode 100644
index 0000000..ad2d3df
--- /dev/null
+++ b/tools/marvin/marvin/base/SecurityGroup.py
@@ -0,0 +1,82 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createSecurityGroup
+from marvin.cloudstackAPI import listSecurityGroups
+from marvin.cloudstackAPI import deleteSecurityGroup
+from marvin.cloudstackAPI import revokeSecurityGroupEgress
+from marvin.cloudstackAPI import revokeSecurityGroupIngress
+from marvin.cloudstackAPI import authorizeSecurityGroupEgress
+from marvin.cloudstackAPI import authorizeSecurityGroupIngress
+
+class SecurityGroup(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createSecurityGroup.createSecurityGroupCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listSecurityGroups.listSecurityGroupsCmd()
+        [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()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        securitygroup = apiclient.deleteSecurityGroup(cmd)
+        return securitygroup
+
+
+    def authorize(self, apiclient, ingress=True, **kwargs):
+        if ingress:
+            cmd = authorizeSecurityGroupIngress.authorizeSecurityGroupIngressCmd()
+        else:
+            cmd = authorizeSecurityGroupEgress.authorizeSecurityGroupEgressCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        if ingress:
+            return apiclient.authorizeSecurityGroupIngress(cmd)
+        else:
+            return apiclient.authorizeSecurityGroupEgress(cmd)
+
+
+    def revoke(self, apiclient, ingress=True, **kwargs):
+        if ingress:
+            cmd = revokeSecurityGroupIngress.revokeSecurityGroupIngressCmd()
+        else:
+            cmd = revokeSecurityGroupEgress.revokeSecurityGroupEgressCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        if ingress:
+            return apiclient.revokeSecurityGroupIngress(cmd)
+        else:
+            return apiclient.revokeSecurityGroupEgress(cmd)
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/ServiceForRouter.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/ServiceForRouter.py b/tools/marvin/marvin/base/ServiceForRouter.py
new file mode 100644
index 0000000..6c365f7
--- /dev/null
+++ b/tools/marvin/marvin/base/ServiceForRouter.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.base import CloudStackEntity
+from marvin.cloudstackAPI import changeServiceForRouter
+
+class ServiceForRouter(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    def change(self, apiclient, serviceofferingid, **kwargs):
+        cmd = changeServiceForRouter.changeServiceForRouterCmd()
+        cmd.id = self.id
+        cmd.serviceofferingid = serviceofferingid
+        [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/dd838d72/tools/marvin/marvin/base/ServiceForSystemVm.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/ServiceForSystemVm.py b/tools/marvin/marvin/base/ServiceForSystemVm.py
new file mode 100644
index 0000000..09ede6d
--- /dev/null
+++ b/tools/marvin/marvin/base/ServiceForSystemVm.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.base import CloudStackEntity
+from marvin.cloudstackAPI import changeServiceForSystemVm
+
+class ServiceForSystemVm(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    def change(self, apiclient, serviceofferingid, **kwargs):
+        cmd = changeServiceForSystemVm.changeServiceForSystemVmCmd()
+        cmd.id = self.id
+        cmd.serviceofferingid = serviceofferingid
+        [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/dd838d72/tools/marvin/marvin/base/ServiceForVirtualMachine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/ServiceForVirtualMachine.py b/tools/marvin/marvin/base/ServiceForVirtualMachine.py
new file mode 100644
index 0000000..3998e0f
--- /dev/null
+++ b/tools/marvin/marvin/base/ServiceForVirtualMachine.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.base import CloudStackEntity
+from marvin.cloudstackAPI import changeServiceForVirtualMachine
+
+class ServiceForVirtualMachine(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    def change(self, apiclient, serviceofferingid, **kwargs):
+        cmd = changeServiceForVirtualMachine.changeServiceForVirtualMachineCmd()
+        cmd.id = self.id
+        cmd.serviceofferingid = serviceofferingid
+        [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/dd838d72/tools/marvin/marvin/base/ServiceOffering.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/ServiceOffering.py b/tools/marvin/marvin/base/ServiceOffering.py
new file mode 100644
index 0000000..9dc8f9a
--- /dev/null
+++ b/tools/marvin/marvin/base/ServiceOffering.py
@@ -0,0 +1,61 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createServiceOffering
+from marvin.cloudstackAPI import listServiceOfferings
+from marvin.cloudstackAPI import updateServiceOffering
+from marvin.cloudstackAPI import deleteServiceOffering
+
+class ServiceOffering(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createServiceOffering.createServiceOfferingCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listServiceOfferings.listServiceOfferingsCmd()
+        [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, **kwargs):
+        cmd = updateServiceOffering.updateServiceOfferingCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        serviceoffering = apiclient.updateServiceOffering(cmd)
+        return serviceoffering
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteServiceOffering.deleteServiceOfferingCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/Simulator.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/Simulator.py b/tools/marvin/marvin/base/Simulator.py
new file mode 100644
index 0000000..a8be52e
--- /dev/null
+++ b/tools/marvin/marvin/base/Simulator.py
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.base import CloudStackEntity
+from marvin.cloudstackAPI import configureSimulator
+
+class Simulator(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    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.iteritems()]
+        simulator = apiclient.configureSimulator(cmd)
+        return simulator
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/Snapshot.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/Snapshot.py b/tools/marvin/marvin/base/Snapshot.py
new file mode 100644
index 0000000..962ad50
--- /dev/null
+++ b/tools/marvin/marvin/base/Snapshot.py
@@ -0,0 +1,52 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createSnapshot
+from marvin.cloudstackAPI import listSnapshots
+from marvin.cloudstackAPI import deleteSnapshot
+
+class Snapshot(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createSnapshot.createSnapshotCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listSnapshots.listSnapshotsCmd()
+        [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, **kwargs):
+        cmd = deleteSnapshot.deleteSnapshotCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/SnapshotPolicy.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/SnapshotPolicy.py b/tools/marvin/marvin/base/SnapshotPolicy.py
new file mode 100644
index 0000000..5358bac
--- /dev/null
+++ b/tools/marvin/marvin/base/SnapshotPolicy.py
@@ -0,0 +1,52 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createSnapshotPolicy
+from marvin.cloudstackAPI import listSnapshotPolicies
+from marvin.cloudstackAPI import deleteSnapshotPolicies
+
+class SnapshotPolicy(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createSnapshotPolicy.createSnapshotPolicyCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, volumeid, **kwargs):
+        cmd = listSnapshotPolicies.listSnapshotPoliciesCmd()
+        cmd.volumeid = volumeid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        snapshotpolicies = apiclient.listSnapshotPolicies(cmd)
+        return map(lambda e: SnapshotPolicy(e.__dict__), snapshotpolicies)
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteSnapshotPolicies.deleteSnapshotPoliciesCmd()
+        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/dd838d72/tools/marvin/marvin/base/StaticNat.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/StaticNat.py b/tools/marvin/marvin/base/StaticNat.py
new file mode 100644
index 0000000..076975c
--- /dev/null
+++ b/tools/marvin/marvin/base/StaticNat.py
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.base import CloudStackEntity
+from marvin.cloudstackAPI import enableStaticNat
+from marvin.cloudstackAPI import disableStaticNat
+
+class StaticNat(CloudStackEntity.CloudStackEntity):
+
+
+    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.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.iteritems()]
+        staticnat = apiclient.disableStaticNat(cmd)
+        return staticnat
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/StaticRoute.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/StaticRoute.py b/tools/marvin/marvin/base/StaticRoute.py
new file mode 100644
index 0000000..d935444
--- /dev/null
+++ b/tools/marvin/marvin/base/StaticRoute.py
@@ -0,0 +1,52 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createStaticRoute
+from marvin.cloudstackAPI import listStaticRoutes
+from marvin.cloudstackAPI import deleteStaticRoute
+
+class StaticRoute(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createStaticRoute.createStaticRouteCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listStaticRoutes.listStaticRoutesCmd()
+        [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, **kwargs):
+        cmd = deleteStaticRoute.deleteStaticRouteCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/StorageNetworkIpRange.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/StorageNetworkIpRange.py b/tools/marvin/marvin/base/StorageNetworkIpRange.py
new file mode 100644
index 0000000..2419801
--- /dev/null
+++ b/tools/marvin/marvin/base/StorageNetworkIpRange.py
@@ -0,0 +1,61 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createStorageNetworkIpRange
+from marvin.cloudstackAPI import listStorageNetworkIpRange
+from marvin.cloudstackAPI import updateStorageNetworkIpRange
+from marvin.cloudstackAPI import deleteStorageNetworkIpRange
+
+class StorageNetworkIpRange(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createStorageNetworkIpRange.createStorageNetworkIpRangeCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listStorageNetworkIpRange.listStorageNetworkIpRangeCmd()
+        [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, **kwargs):
+        cmd = updateStorageNetworkIpRange.updateStorageNetworkIpRangeCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        storagenetworkiprange = apiclient.updateStorageNetworkIpRange(cmd)
+        return storagenetworkiprange
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteStorageNetworkIpRange.deleteStorageNetworkIpRangeCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/StoragePool.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/StoragePool.py b/tools/marvin/marvin/base/StoragePool.py
new file mode 100644
index 0000000..b6077e9
--- /dev/null
+++ b/tools/marvin/marvin/base/StoragePool.py
@@ -0,0 +1,79 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createStoragePool
+from marvin.cloudstackAPI import listStoragePools
+from marvin.cloudstackAPI import updateStoragePool
+from marvin.cloudstackAPI import deleteStoragePool
+from marvin.cloudstackAPI import cancelStorageMaintenance
+from marvin.cloudstackAPI import enableStorageMaintenance
+
+class StoragePool(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createStoragePool.createStoragePoolCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listStoragePools.listStoragePoolsCmd()
+        [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, **kwargs):
+        cmd = updateStoragePool.updateStoragePoolCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        storagepool = apiclient.updateStoragePool(cmd)
+        return storagepool
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteStoragePool.deleteStoragePoolCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        storagepool = apiclient.deleteStoragePool(cmd)
+        return storagepool
+
+
+    def cancel_maintenance(self, apiclient, **kwargs):
+        cmd = cancelStorageMaintenance.cancelStorageMaintenanceCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        storagemaintenance = apiclient.cancelStorageMaintenance(cmd)
+        return storagemaintenance
+
+
+    def enable_maintenance(self, apiclient, **kwargs):
+        cmd = enableStorageMaintenance.enableStorageMaintenanceCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/StorageProviders.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/StorageProviders.py b/tools/marvin/marvin/base/StorageProviders.py
new file mode 100644
index 0000000..7dab8a6
--- /dev/null
+++ b/tools/marvin/marvin/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.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/dd838d72/tools/marvin/marvin/base/SupportedNetworkServices.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/SupportedNetworkServices.py b/tools/marvin/marvin/base/SupportedNetworkServices.py
new file mode 100644
index 0000000..89cbeda
--- /dev/null
+++ b/tools/marvin/marvin/base/SupportedNetworkServices.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.base import CloudStackEntity
+from marvin.cloudstackAPI import listSupportedNetworkServices
+
+class SupportedNetworkServices(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listSupportedNetworkServices.listSupportedNetworkServicesCmd()
+        [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/dd838d72/tools/marvin/marvin/base/Swift.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/Swift.py b/tools/marvin/marvin/base/Swift.py
new file mode 100644
index 0000000..e4b18a2
--- /dev/null
+++ b/tools/marvin/marvin/base/Swift.py
@@ -0,0 +1,43 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import addSwift
+from marvin.cloudstackAPI import listSwifts
+
+class Swift(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    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.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.iteritems()]
+        swift = apiclient.listSwifts(cmd)
+        return map(lambda e: Swift(e.__dict__), swift)
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/SystemVm.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/SystemVm.py b/tools/marvin/marvin/base/SystemVm.py
new file mode 100644
index 0000000..d27a679
--- /dev/null
+++ b/tools/marvin/marvin/base/SystemVm.py
@@ -0,0 +1,80 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import migrateSystemVm
+from marvin.cloudstackAPI import stopSystemVm
+from marvin.cloudstackAPI import listSystemVms
+from marvin.cloudstackAPI import rebootSystemVm
+from marvin.cloudstackAPI import startSystemVm
+from marvin.cloudstackAPI import destroySystemVm
+
+class SystemVm(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    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.iteritems()]
+        systemvm = apiclient.migrateSystemVm(cmd)
+        return systemvm
+
+
+    def stop(self, apiclient, **kwargs):
+        cmd = stopSystemVm.stopSystemVmCmd()
+        cmd.id = self.id
+        [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.iteritems()]
+        systemvm = apiclient.listSystemVms(cmd)
+        return map(lambda e: SystemVm(e.__dict__), systemvm)
+
+
+    def reboot(self, apiclient, **kwargs):
+        cmd = rebootSystemVm.rebootSystemVmCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        systemvm = apiclient.rebootSystemVm(cmd)
+        return systemvm
+
+
+    def start(self, apiclient, **kwargs):
+        cmd = startSystemVm.startSystemVmCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        systemvm = apiclient.startSystemVm(cmd)
+        return systemvm
+
+
+    def destroy(self, apiclient, **kwargs):
+        cmd = destroySystemVm.destroySystemVmCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/Tags.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/Tags.py b/tools/marvin/marvin/base/Tags.py
new file mode 100644
index 0000000..08ff1a1
--- /dev/null
+++ b/tools/marvin/marvin/base/Tags.py
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.base import CloudStackEntity
+from marvin.cloudstackAPI import createTags
+from marvin.cloudstackAPI import listTags
+from marvin.cloudstackAPI import deleteTags
+
+class Tags(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createTags.createTagsCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listTags.listTagsCmd()
+        [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.iteritems()]
+        tags = apiclient.deleteTags(cmd)
+        return tags
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/Template.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/Template.py b/tools/marvin/marvin/base/Template.py
new file mode 100644
index 0000000..db527a2
--- /dev/null
+++ b/tools/marvin/marvin/base/Template.py
@@ -0,0 +1,106 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import prepareTemplate
+from marvin.cloudstackAPI import createTemplate
+from marvin.cloudstackAPI import registerTemplate
+from marvin.cloudstackAPI import listTemplates
+from marvin.cloudstackAPI import updateTemplate
+from marvin.cloudstackAPI import copyTemplate
+from marvin.cloudstackAPI import extractTemplate
+from marvin.cloudstackAPI import deleteTemplate
+
+class Template(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    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.iteritems()]
+        template = apiclient.prepareTemplate(cmd)
+        return template
+
+
+    def template_of_vm(self, apiclient, name, displaytext, ostypeid, **kwargs):
+        cmd = createTemplate.createTemplateCmd()
+        cmd.id = self.id
+        cmd.name = name
+        cmd.displaytext = displaytext
+        cmd.ostypeid = ostypeid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        template = apiclient.createTemplate(cmd)
+        return Template(template.__dict__)
+
+
+    @classmethod
+    def create(self, apiclient, factory, **kwargs):
+        cmd = registerTemplate.registerTemplateCmd()
+        [setattr(cmd, factoryKey, factoryValue) for factoryKey, factoryValue in factory.__dict__.iteritems()]
+        [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.iteritems()]
+        template = apiclient.listTemplates(cmd)
+        return map(lambda e: Template(e.__dict__), template)
+
+
+    def update(self, apiclient, **kwargs):
+        cmd = updateTemplate.updateTemplateCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        template = apiclient.updateTemplate(cmd)
+        return template
+
+
+    def copy(self, apiclient, sourcezoneid, destzoneid, **kwargs):
+        cmd = copyTemplate.copyTemplateCmd()
+        cmd.id = self.id
+        cmd.destzoneid = destzoneid
+        cmd.sourcezoneid = sourcezoneid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        template = apiclient.copyTemplate(cmd)
+        return template
+
+
+    def extract(self, apiclient, mode, **kwargs):
+        cmd = extractTemplate.extractTemplateCmd()
+        cmd.id = self.id
+        cmd.mode = mode
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        template = apiclient.extractTemplate(cmd)
+        return template
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteTemplate.deleteTemplateCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/TemplatePermissions.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/TemplatePermissions.py b/tools/marvin/marvin/base/TemplatePermissions.py
new file mode 100644
index 0000000..e6b3ce9
--- /dev/null
+++ b/tools/marvin/marvin/base/TemplatePermissions.py
@@ -0,0 +1,42 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import listTemplatePermissions
+from marvin.cloudstackAPI import updateTemplatePermissions
+
+class TemplatePermissions(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listTemplatePermissions.listTemplatePermissionsCmd()
+        [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, **kwargs):
+        cmd = updateTemplatePermissions.updateTemplatePermissionsCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/TrafficMonitor.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/TrafficMonitor.py b/tools/marvin/marvin/base/TrafficMonitor.py
new file mode 100644
index 0000000..62eb5c6
--- /dev/null
+++ b/tools/marvin/marvin/base/TrafficMonitor.py
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.base import CloudStackEntity
+from marvin.cloudstackAPI import addTrafficMonitor
+from marvin.cloudstackAPI import listTrafficMonitors
+from marvin.cloudstackAPI import deleteTrafficMonitor
+
+class TrafficMonitor(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    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.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.iteritems()]
+        trafficmonitor = apiclient.listTrafficMonitors(cmd)
+        return map(lambda e: TrafficMonitor(e.__dict__), trafficmonitor)
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteTrafficMonitor.deleteTrafficMonitorCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/TrafficType.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/TrafficType.py b/tools/marvin/marvin/base/TrafficType.py
new file mode 100644
index 0000000..a2c6245
--- /dev/null
+++ b/tools/marvin/marvin/base/TrafficType.py
@@ -0,0 +1,63 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import addTrafficType
+from marvin.cloudstackAPI import listTrafficTypes
+from marvin.cloudstackAPI import updateTrafficType
+from marvin.cloudstackAPI import deleteTrafficType
+
+class TrafficType(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    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.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.iteritems()]
+        traffictype = apiclient.listTrafficTypes(cmd)
+        return map(lambda e: TrafficType(e.__dict__), traffictype)
+
+
+    def update(self, apiclient, **kwargs):
+        cmd = updateTrafficType.updateTrafficTypeCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        traffictype = apiclient.updateTrafficType(cmd)
+        return traffictype
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteTrafficType.deleteTrafficTypeCmd()
+        cmd.id = self.id
+        [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/dd838d72/tools/marvin/marvin/base/TrafficTypeImplementors.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/TrafficTypeImplementors.py b/tools/marvin/marvin/base/TrafficTypeImplementors.py
new file mode 100644
index 0000000..80c3bce
--- /dev/null
+++ b/tools/marvin/marvin/base/TrafficTypeImplementors.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.base import CloudStackEntity
+from marvin.cloudstackAPI import listTrafficTypeImplementors
+
+class TrafficTypeImplementors(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listTrafficTypeImplementors.listTrafficTypeImplementorsCmd()
+        [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/dd838d72/tools/marvin/marvin/base/UsageRecords.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/UsageRecords.py b/tools/marvin/marvin/base/UsageRecords.py
new file mode 100644
index 0000000..e9c2b70
--- /dev/null
+++ b/tools/marvin/marvin/base/UsageRecords.py
@@ -0,0 +1,46 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import listUsageRecords
+from marvin.cloudstackAPI import generateUsageRecords
+
+class UsageRecords(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def list(self, apiclient, startdate, enddate, **kwargs):
+        cmd = listUsageRecords.listUsageRecordsCmd()
+        cmd.enddate = enddate
+        cmd.startdate = startdate
+        [setattr(cmd, key, value) for key,value in kwargs.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.iteritems()]
+        usagerecords = apiclient.generateUsageRecords(cmd)
+        return usagerecords
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/UsageTypes.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/UsageTypes.py b/tools/marvin/marvin/base/UsageTypes.py
new file mode 100644
index 0000000..fe6893a
--- /dev/null
+++ b/tools/marvin/marvin/base/UsageTypes.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.base import CloudStackEntity
+from marvin.cloudstackAPI import listUsageTypes
+
+class UsageTypes(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listUsageTypes.listUsageTypesCmd()
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        usagetypes = apiclient.listUsageTypes(cmd)
+        return map(lambda e: UsageTypes(e.__dict__), usagetypes)
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/User.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/User.py b/tools/marvin/marvin/base/User.py
new file mode 100644
index 0000000..86e86d7
--- /dev/null
+++ b/tools/marvin/marvin/base/User.py
@@ -0,0 +1,107 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import enableUser
+from marvin.cloudstackAPI import getUser
+from marvin.cloudstackAPI import lockUser
+from marvin.cloudstackAPI import createUser
+from marvin.cloudstackAPI import listUsers
+from marvin.cloudstackAPI import updateUser
+from marvin.cloudstackAPI import disableUser
+from marvin.cloudstackAPI import deleteUser
+from marvin.cloudstackAPI import registerUserKeys
+
+class User(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    def enable(self, apiclient, **kwargs):
+        cmd = enableUser.enableUserCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        user = apiclient.enableUser(cmd)
+        return user
+
+
+    def get(self, apiclient, userapikey, **kwargs):
+        cmd = getUser.getUserCmd()
+        cmd.id = self.id
+        cmd.userapikey = userapikey
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        user = apiclient.getUser(cmd)
+        return user
+
+
+    def lock(self, apiclient, **kwargs):
+        cmd = lockUser.lockUserCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        user = apiclient.lockUser(cmd)
+        return user
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createUser.createUserCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listUsers.listUsersCmd()
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        user = apiclient.listUsers(cmd)
+        return map(lambda e: User(e.__dict__), user)
+
+
+    def update(self, apiclient, **kwargs):
+        cmd = updateUser.updateUserCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        user = apiclient.updateUser(cmd)
+        return user
+
+
+    def disable(self, apiclient, **kwargs):
+        cmd = disableUser.disableUserCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        user = apiclient.disableUser(cmd)
+        return user
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteUser.deleteUserCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        user = apiclient.deleteUser(cmd)
+        return user
+
+
+    def register_userkeys(self, apiclient, **kwargs):
+        cmd = registerUserKeys.registerUserKeysCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        userkeys = apiclient.registerUserKeys(cmd)
+        return userkeys
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/VMPassword.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/VMPassword.py b/tools/marvin/marvin/base/VMPassword.py
new file mode 100644
index 0000000..abead14
--- /dev/null
+++ b/tools/marvin/marvin/base/VMPassword.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.base import CloudStackEntity
+from marvin.cloudstackAPI import getVMPassword
+
+class VMPassword(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    def get(self, apiclient, **kwargs):
+        cmd = getVMPassword.getVMPasswordCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vmpassword = apiclient.getVMPassword(cmd)
+        return vmpassword
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/VMSnapshot.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/VMSnapshot.py b/tools/marvin/marvin/base/VMSnapshot.py
new file mode 100644
index 0000000..1241f30
--- /dev/null
+++ b/tools/marvin/marvin/base/VMSnapshot.py
@@ -0,0 +1,53 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from marvin.base import CloudStackEntity
+from marvin.cloudstackAPI import createVMSnapshot
+from marvin.cloudstackAPI import listVMSnapshot
+from marvin.cloudstackAPI import deleteVMSnapshot
+
+class VMSnapshot(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createVMSnapshot.createVMSnapshotCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listVMSnapshot.listVMSnapshotCmd()
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vmsnapshot = apiclient.listVMSnapshot(cmd)
+        return map(lambda e: VMSnapshot(e.__dict__), vmsnapshot)
+
+
+    def delete(self, apiclient, vmsnapshotid, **kwargs):
+        cmd = deleteVMSnapshot.deleteVMSnapshotCmd()
+        cmd.id = self.id
+        cmd.vmsnapshotid = vmsnapshotid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vmsnapshot = apiclient.deleteVMSnapshot(cmd)
+        return vmsnapshot
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/VPC.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/VPC.py b/tools/marvin/marvin/base/VPC.py
new file mode 100644
index 0000000..ad2ad10
--- /dev/null
+++ b/tools/marvin/marvin/base/VPC.py
@@ -0,0 +1,70 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createVPC
+from marvin.cloudstackAPI import listVPCs
+from marvin.cloudstackAPI import updateVPC
+from marvin.cloudstackAPI import restartVPC
+from marvin.cloudstackAPI import deleteVPC
+
+class VPC(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createVPC.createVPCCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listVPCs.listVPCsCmd()
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vpc = apiclient.listVPCs(cmd)
+        return map(lambda e: VPC(e.__dict__), vpc)
+
+
+    def update(self, apiclient, **kwargs):
+        cmd = updateVPC.updateVPCCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vpc = apiclient.updateVPC(cmd)
+        return vpc
+
+
+    def restart(self, apiclient, **kwargs):
+        cmd = restartVPC.restartVPCCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vpc = apiclient.restartVPC(cmd)
+        return vpc
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteVPC.deleteVPCCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vpc = apiclient.deleteVPC(cmd)
+        return vpc
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/VPCOffering.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/VPCOffering.py b/tools/marvin/marvin/base/VPCOffering.py
new file mode 100644
index 0000000..4ab767b
--- /dev/null
+++ b/tools/marvin/marvin/base/VPCOffering.py
@@ -0,0 +1,61 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import createVPCOffering
+from marvin.cloudstackAPI import listVPCOfferings
+from marvin.cloudstackAPI import updateVPCOffering
+from marvin.cloudstackAPI import deleteVPCOffering
+
+class VPCOffering(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    @classmethod
+    def create(cls, apiclient, factory, **kwargs):
+        cmd = createVPCOffering.createVPCOfferingCmd()
+        [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__)
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listVPCOfferings.listVPCOfferingsCmd()
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vpcoffering = apiclient.listVPCOfferings(cmd)
+        return map(lambda e: VPCOffering(e.__dict__), vpcoffering)
+
+
+    def update(self, apiclient, **kwargs):
+        cmd = updateVPCOffering.updateVPCOfferingCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vpcoffering = apiclient.updateVPCOffering(cmd)
+        return vpcoffering
+
+
+    def delete(self, apiclient, **kwargs):
+        cmd = deleteVPCOffering.deleteVPCOfferingCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        vpcoffering = apiclient.deleteVPCOffering(cmd)
+        return vpcoffering
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dd838d72/tools/marvin/marvin/base/VirtualMachine.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/base/VirtualMachine.py b/tools/marvin/marvin/base/VirtualMachine.py
new file mode 100644
index 0000000..24c2ab4
--- /dev/null
+++ b/tools/marvin/marvin/base/VirtualMachine.py
@@ -0,0 +1,178 @@
+# 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.base import CloudStackEntity
+from marvin.cloudstackAPI import restoreVirtualMachine
+from marvin.cloudstackAPI import scaleVirtualMachine
+from marvin.cloudstackAPI import deployVirtualMachine
+from marvin.cloudstackAPI import migrateVirtualMachine
+from marvin.cloudstackAPI import listVirtualMachines
+from marvin.cloudstackAPI import stopVirtualMachine
+from marvin.cloudstackAPI import rebootVirtualMachine
+from marvin.cloudstackAPI import updateVirtualMachine
+from marvin.cloudstackAPI import startVirtualMachine
+from marvin.cloudstackAPI import destroyVirtualMachine
+from marvin.cloudstackAPI import assignVirtualMachine
+from marvin.cloudstackAPI import addNicToVirtualMachine
+from marvin.cloudstackAPI import removeNicFromVirtualMachine
+from marvin.cloudstackAPI import resetPasswordForVirtualMachine
+from marvin.cloudstackAPI import resetSSHKeyForVirtualMachine
+from marvin.cloudstackAPI import updateDefaultNicForVirtualMachine
+
+class VirtualMachine(CloudStackEntity.CloudStackEntity):
+
+
+    def __init__(self, items):
+        self.__dict__.update(items)
+
+
+    def restore(self, apiclient, virtualmachineid, **kwargs):
+        cmd = restoreVirtualMachine.restoreVirtualMachineCmd()
+        cmd.id = self.id
+        cmd.virtualmachineid = virtualmachineid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.restoreVirtualMachine(cmd)
+        return virtualmachine
+
+
+    def scale(self, apiclient, serviceofferingid, **kwargs):
+        cmd = scaleVirtualMachine.scaleVirtualMachineCmd()
+        cmd.id = self.id
+        cmd.serviceofferingid = serviceofferingid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.scaleVirtualMachine(cmd)
+        return virtualmachine
+
+
+    @classmethod
+    def deploy(cls, apiclient, factory, **kwargs):
+        cmd = deployVirtualMachine.deployVirtualMachineCmd()
+        [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__)
+
+
+    def migrate(self, apiclient, virtualmachineid, **kwargs):
+        cmd = migrateVirtualMachine.migrateVirtualMachineCmd()
+        cmd.id = self.id
+        cmd.virtualmachineid = virtualmachineid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.migrateVirtualMachine(cmd)
+        return virtualmachine
+
+
+    @classmethod
+    def list(self, apiclient, **kwargs):
+        cmd = listVirtualMachines.listVirtualMachinesCmd()
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.listVirtualMachines(cmd)
+        return map(lambda e: VirtualMachine(e.__dict__), virtualmachine)
+
+
+    def stop(self, apiclient, **kwargs):
+        cmd = stopVirtualMachine.stopVirtualMachineCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.stopVirtualMachine(cmd)
+        return virtualmachine
+
+
+    def reboot(self, apiclient, **kwargs):
+        cmd = rebootVirtualMachine.rebootVirtualMachineCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.rebootVirtualMachine(cmd)
+        return virtualmachine
+
+
+    def update(self, apiclient, **kwargs):
+        cmd = updateVirtualMachine.updateVirtualMachineCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.updateVirtualMachine(cmd)
+        return virtualmachine
+
+
+    def start(self, apiclient, **kwargs):
+        cmd = startVirtualMachine.startVirtualMachineCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.startVirtualMachine(cmd)
+        return virtualmachine
+
+
+    def destroy(self, apiclient, **kwargs):
+        cmd = destroyVirtualMachine.destroyVirtualMachineCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.destroyVirtualMachine(cmd)
+        return virtualmachine
+
+
+    def assign(self, apiclient, account, domainid, virtualmachineid, **kwargs):
+        cmd = assignVirtualMachine.assignVirtualMachineCmd()
+        cmd.id = self.id
+        cmd.account = account
+        cmd.domainid = domainid
+        cmd.virtualmachineid = virtualmachineid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        virtualmachine = apiclient.assignVirtualMachine(cmd)
+        return virtualmachine
+
+    def remove_nic(self, apiclient, nicid, **kwargs):
+        cmd = removeNicFromVirtualMachine.removeNicFromVirtualMachineCmd()
+        cmd.virtualmachineid = self.id
+        cmd.nicid = nicid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        nicfromvirtualmachine = apiclient.removeNicFromVirtualMachine(cmd)
+        return nicfromvirtualmachine
+
+
+    def add_nic(self, apiclient, networkid, **kwargs):
+        cmd = addNicToVirtualMachine.addNicToVirtualMachineCmd()
+        cmd.virtualmachineid = self.id
+        cmd.networkid = networkid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        nictovirtualmachine = apiclient.addNicToVirtualMachine(cmd)
+        return nictovirtualmachine
+
+
+    def update_default_nic(self, apiclient, nicid, **kwargs):
+        cmd = updateDefaultNicForVirtualMachine.updateDefaultNicForVirtualMachineCmd()
+        cmd.virtualmachineid = self.id
+        cmd.nicid = nicid
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        defaultnicforvirtualmachine = apiclient.updateDefaultNicForVirtualMachine(cmd)
+        return defaultnicforvirtualmachine
+
+
+    def reset_password(self, apiclient, **kwargs):
+        cmd = resetPasswordForVirtualMachine.resetPasswordForVirtualMachineCmd()
+        cmd.id = self.id
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        passwordforvirtualmachine = apiclient.resetPasswordForVirtualMachine(cmd)
+        return passwordforvirtualmachine
+
+
+    def reset_sshkey(self, apiclient, keypair, **kwargs):
+        cmd = resetSSHKeyForVirtualMachine.resetSSHKeyForVirtualMachineCmd()
+        cmd.id = self.id
+        cmd.keypair = keypair
+        [setattr(cmd, key, value) for key,value in kwargs.iteritems()]
+        sshkeyforvirtualmachine = apiclient.resetSSHKeyForVirtualMachine(cmd)
+        return sshkeyforvirtualmachine
+


Mime
View raw message