1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

create/views.py: rearrange variable order

This commit is contained in:
catborise 2019-09-10 16:06:30 +03:00
parent d22aed5ef7
commit caf00bd4f9

View file

@ -42,9 +42,6 @@ def create_instance(request, compute_id):
compute.password, compute.password,
compute.type) compute.type)
storages = sorted(conn.get_storages(only_actives=True))
networks = sorted(conn.get_networks())
nwfilters = conn.get_nwfilters()
instances = conn.get_instances() instances = conn.get_instances()
videos = conn.get_video() videos = conn.get_video()
cache_modes = sorted(conn.get_cache_modes().items()) cache_modes = sorted(conn.get_cache_modes().items())
@ -54,6 +51,9 @@ def create_instance(request, compute_id):
disk_devices = conn.get_disk_device_types() disk_devices = conn.get_disk_device_types()
disk_buses = conn.get_disk_bus_types() disk_buses = conn.get_disk_bus_types()
default_bus = INSTANCE_VOLUME_DEFAULT_BUS default_bus = INSTANCE_VOLUME_DEFAULT_BUS
networks = sorted(conn.get_networks())
nwfilters = conn.get_nwfilters()
storages = sorted(conn.get_storages(only_actives=True))
except libvirtError as lib_err: except libvirtError as lib_err:
error_messages.append(lib_err) error_messages.append(lib_err)
@ -149,7 +149,6 @@ def create_instance(request, compute_id):
else: else:
for idx, vol in enumerate(data['images'].split(',')): for idx, vol in enumerate(data['images'].split(',')):
try: try:
path = conn.get_volume_path(vol) path = conn.get_volume_path(vol)
volume = dict() volume = dict()
volume['path'] = path volume['path'] = path