mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK 2233: Automation test cases for Add Remove Networks to VM
Signed-off-by: Girish Shilamkar <girish@clogeny.com>
This commit is contained in:
parent
6227ba6356
commit
2ba27db0ce
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue