From 2ba27db0cea55665acc3344bc31d3931c7545f35 Mon Sep 17 00:00:00 2001 From: Gaurav Aradhye Date: Mon, 25 Nov 2013 13:15:49 +0530 Subject: [PATCH] CLOUDSTACK 2233: Automation test cases for Add Remove Networks to VM Signed-off-by: Girish Shilamkar --- tools/marvin/marvin/integration/lib/base.py | 6 +++++- tools/marvin/setup.py | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py index b03c552427f..bce13272afe 100755 --- a/tools/marvin/marvin/integration/lib/base.py +++ b/tools/marvin/marvin/integration/lib/base.py @@ -530,11 +530,15 @@ class VirtualMachine: cmd.id = volume.id return apiclient.detachVolume(cmd) - def add_nic(self, apiclient, networkId): + def add_nic(self, apiclient, networkId, ipaddress=None): """Add a NIC to a VM""" cmd = addNicToVirtualMachine.addNicToVirtualMachineCmd() cmd.virtualmachineid = self.id cmd.networkid = networkId + + if ipaddress: + cmd.ipaddress = ipaddress + return apiclient.addNicToVirtualMachine(cmd) def remove_nic(self, apiclient, nicId): diff --git a/tools/marvin/setup.py b/tools/marvin/setup.py index eeed3bfa8fd..9ce3951fdeb 100644 --- a/tools/marvin/setup.py +++ b/tools/marvin/setup.py @@ -51,7 +51,8 @@ setup(name="Marvin", "mysql-connector-python", "requests", "paramiko", - "nose" + "nose", + "ddt >= 0.4.0" ], py_modules=['marvin.marvinPlugin'], zip_safe=False,