cleanup migrations
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
ed40b21d16
commit
f7b14bf507
22 changed files with 148 additions and 198 deletions
|
|
@ -1,12 +1,9 @@
|
|||
import json
|
||||
|
||||
import uncloud.secrets as secrets
|
||||
|
||||
|
||||
from xmlrpc.client import ServerProxy as RPCClient
|
||||
|
||||
from django_auth_ldap.backend import LDAPBackend
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.conf import settings
|
||||
from xmltodict import parse
|
||||
|
||||
from opennebula.models import VM as VMModel
|
||||
|
|
@ -19,9 +16,9 @@ class Command(BaseCommand):
|
|||
pass
|
||||
|
||||
def handle(self, *args, **options):
|
||||
with RPCClient(secrets.OPENNEBULA_URL) as rpc_client:
|
||||
with RPCClient(settings.OPENNEBULA_URL) as rpc_client:
|
||||
success, response, *_ = rpc_client.one.vmpool.infoextended(
|
||||
secrets.OPENNEBULA_USER_PASS, -2, -1, -1, -1
|
||||
settings.OPENNEBULA_USER_PASS, -2, -1, -1, -1
|
||||
)
|
||||
if success:
|
||||
vms = json.loads(json.dumps(parse(response)))['VM_POOL']['VM']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue