summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e21c9cc)
Change-Id: I9c2f5a3134ba2ac94e0ac9038c44c63753f5fcb5
Signed-off-by: Ravi Chamarty <ravi.chamarty@riftio.com>
self.connect_vapp_to_org_vdc_network(vapp_id, nets[0].get('name'))
type_list = ('PF', 'PCI-PASSTHROUGH', 'VFnotShared')
self.connect_vapp_to_org_vdc_network(vapp_id, nets[0].get('name'))
type_list = ('PF', 'PCI-PASSTHROUGH', 'VFnotShared')
if 'type' in net and net['type'] not in type_list:
# fetching nic type from vnf
if 'model' in net:
if 'type' in net and net['type'] not in type_list:
# fetching nic type from vnf
if 'model' in net:
else:
self.logger.info("new_vminstance(): adding network adapter "\
"to a network {}".format(nets[0].get('name')))
else:
self.logger.info("new_vminstance(): adding network adapter "\
"to a network {}".format(nets[0].get('name')))
if net['type'] in ['SR-IOV', 'VF']:
nic_type = net['type']
self.add_network_adapter_to_vms(vapp, nets[0].get('name'),
if net['type'] in ['SR-IOV', 'VF']:
nic_type = net['type']
self.add_network_adapter_to_vms(vapp, nets[0].get('name'),
try:
vapp_name = self.get_namebyvappid(vm__vim_uuid)
try:
vapp_name = self.get_namebyvappid(vm__vim_uuid)
- vapp_resource = vdc_obj.get_vapp(vapp_name)
- vapp = VApp(self.client, resource=vapp_resource)
if vapp_name is None:
self.logger.debug("delete_vminstance(): Failed to get vm by given {} vm uuid".format(vm__vim_uuid))
return -1, "delete_vminstance(): Failed to get vm by given {} vm uuid".format(vm__vim_uuid)
if vapp_name is None:
self.logger.debug("delete_vminstance(): Failed to get vm by given {} vm uuid".format(vm__vim_uuid))
return -1, "delete_vminstance(): Failed to get vm by given {} vm uuid".format(vm__vim_uuid)
- else:
- self.logger.info("Deleting vApp {} and UUID {}".format(vapp_name, vm__vim_uuid))
+ self.logger.info("Deleting vApp {} and UUID {}".format(vapp_name, vm__vim_uuid))
+ vapp_resource = vdc_obj.get_vapp(vapp_name)
+ vapp = VApp(self.client, resource=vapp_resource)
# Delete vApp and wait for status change if task executed and vApp is None.
# Delete vApp and wait for status change if task executed and vApp is None.