Esempio n. 1
0
 def test_0440_update_vhs_disk(self):
     # update vhs disk
     vm = VM(TestVM._sys_admin_client, href=TestVM._test_vapp_first_vm_href)
     disk_list = vm.list_virtual_hardware_section(is_cpu=False,
                                                  is_memory=False,
                                                  is_disk=True)
     for disk in disk_list:
         element_name = disk['diskElementName']
         virtual_quantity = disk['diskVirtualQuantityInBytes']
         break
     task = vm.update_vhs_disks(element_name=element_name,
                                virtual_quatntity_in_bytes=virtual_quantity)
     result = TestVM._client.get_task_monitor().wait_for_success(task)
     self.assertEqual(result.get('status'), TaskStatus.SUCCESS.value)
Esempio n. 2
0
 def test_0500_update_vhs_disk(self):
     # update virtual hardware section disk
     vm1 = VM(VmTest._sys_admin_client,
             href=VmTest._test_vapp.get_vm(VAppConstants.vm1_name).get(
                 'href'))
     disk_list = vm1.list_virtual_hardware_section(is_cpu=False,
                                                  is_memory=False,
                                                  is_disk=True)
     for disk in disk_list:
         element_name = disk['diskElementName']
         virtual_quantity = disk['diskVirtualQuantityInBytes']
         break
     result = VmTest._runner.invoke(
         vm, args=['update-vhs-disk',
                   VAppConstants.name, VAppConstants.vm1_name,
                   '--e-name', element_name, '--v-quantity',
                   virtual_quantity])
     self.assertEqual(0, result.exit_code)
Esempio n. 3
0
 def test_0220_list_virtual_harware_section(self):
     vm = VM(TestVM._client, href=TestVM._test_vapp_first_vm_href)
     list = vm.list_virtual_hardware_section(is_disk=True,
                                             is_media=True,
                                             is_networkCards=True)
     self.assertTrue(len(list) > 0)