@attr(tags=['advanced', 'eip', 'advancedns', 'basic', 'sg'])
def test_02_deploy_ha_vm_from_iso(self):
    'Test Deploy HA enabled Virtual Machine from ISO\n        '
    self.iso = Iso.create(self.apiclient, self.services['iso'], account=self.account.name, domainid=self.account.domainid)
    try:
        self.iso.download(self.apiclient)
        self.cleanup.append(self.iso)
    except Exception as e:
        raise Exception(('Exception while downloading ISO %s: %s' % (self.iso.id, e)))
    self.debug(('Registered ISO: %s' % self.iso.name))
    self.debug(('Deploying instance in the account: %s' % self.account.name))
    self.virtual_machine = VirtualMachine.create(self.apiclient, self.services['virtual_machine'], accountid=self.account.name, domainid=self.account.domainid, templateid=self.iso.id, serviceofferingid=self.service_offering.id, diskofferingid=self.disk_offering.id, startvm=True)
    self.debug(('Deployed instance in account: %s' % self.account.name))
    list_vm_response = list_virtual_machines(self.apiclient, id=self.virtual_machine.id)
    self.debug(('Verify listVirtualMachines response for virtual machine: %s' % self.virtual_machine.id))
    self.assertEqual(isinstance(list_vm_response, list), True, 'Check list response returns a valid list')
    vm_response = list_vm_response[0]
    self.assertEqual(vm_response.state, 'Running', 'VM should be in Running state after deployment')
    return
Test Deploy HA enabled Virtual Machine from ISO
@attr(tags=['advanced', 'eip', 'advancedns', 'basic', 'sg'])
def test_02_deploy_ha_vm_from_iso(self):
    '\n        '
    self.iso = Iso.create(self.apiclient, self.services['iso'], account=self.account.name, domainid=self.account.domainid)
    try:
        self.iso.download(self.apiclient)
        self.cleanup.append(self.iso)
    except Exception as e:
        raise Exception(('Exception while downloading ISO %s: %s' % (self.iso.id, e)))
    self.debug(('Registered ISO: %s' % self.iso.name))
    self.debug(('Deploying instance in the account: %s' % self.account.name))
    self.virtual_machine = VirtualMachine.create(self.apiclient, self.services['virtual_machine'], accountid=self.account.name, domainid=self.account.domainid, templateid=self.iso.id, serviceofferingid=self.service_offering.id, diskofferingid=self.disk_offering.id, startvm=True)
    self.debug(('Deployed instance in account: %s' % self.account.name))
    list_vm_response = list_virtual_machines(self.apiclient, id=self.virtual_machine.id)
    self.debug(('Verify listVirtualMachines response for virtual machine: %s' % self.virtual_machine.id))
    self.assertEqual(isinstance(list_vm_response, list), True, 'Check list response returns a valid list')
    vm_response = list_vm_response[0]
    self.assertEqual(vm_response.state, 'Running', 'VM should be in Running state after deployment')
    return