@attr(tags=['advanced', 'eip', 'advancedns', 'basic', 'sg'])
def test_vm_per_account(self):
    'Test VM limit per account\n        '
    self.debug(('Updating instance resource limit for account: %s' % self.account.name))
    update_resource_limit(self.apiclient, 0, account=self.account.name, domainid=self.account.domainid, max=1)
    self.debug(('Deploying VM instance in account: %s' % self.account.name))
    virtual_machine = VirtualMachine.create(self.apiclient, self.services['virtual_machine'], templateid=self.template.id, accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, startvm=False)
    self.assertEqual(virtual_machine.state, 'Stopped', 'Check VM state is Running or not')
    with self.assertRaises(Exception):
        VirtualMachine.create(self.apiclient, self.services['virtual_machine'], templateid=self.template.id, accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, startvm=False)
    return
Test VM limit per account
@attr(tags=['advanced', 'eip', 'advancedns', 'basic', 'sg'])
def test_vm_per_account(self):
    '\n        '
    self.debug(('Updating instance resource limit for account: %s' % self.account.name))
    update_resource_limit(self.apiclient, 0, account=self.account.name, domainid=self.account.domainid, max=1)
    self.debug(('Deploying VM instance in account: %s' % self.account.name))
    virtual_machine = VirtualMachine.create(self.apiclient, self.services['virtual_machine'], templateid=self.template.id, accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, startvm=False)
    self.assertEqual(virtual_machine.state, 'Stopped', 'Check VM state is Running or not')
    with self.assertRaises(Exception):
        VirtualMachine.create(self.apiclient, self.services['virtual_machine'], templateid=self.template.id, accountid=self.account.name, domainid=self.account.domainid, serviceofferingid=self.service_offering.id, startvm=False)
    return