attached opennebula vm id to virtualmachine plan
This commit is contained in:
parent
abf6dbddce
commit
9a34518457
3 changed files with 10 additions and 21 deletions
|
|
@ -177,12 +177,15 @@ class VirtualMachinePlan(AssignPermissionsMixin, models.Model):
|
|||
|
||||
@classmethod
|
||||
def create_opennebula_vm(self, user, specs):
|
||||
|
||||
# Init opennebula manager using given user
|
||||
opennebula_client = OpenNebulaManager(
|
||||
user.email,
|
||||
user.password[0:20],
|
||||
create_user=True
|
||||
)
|
||||
|
||||
# Create a vm in opennebula using given specs
|
||||
vm = opennebula_client.create_vm(specs)
|
||||
return vm
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue