From caf00bd4f9ac9b3686a587a9bd2744eaacc754bb Mon Sep 17 00:00:00 2001 From: catborise Date: Tue, 10 Sep 2019 16:06:30 +0300 Subject: [PATCH] create/views.py: rearrange variable order --- create/views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/create/views.py b/create/views.py index f758bd1..d44ad26 100644 --- a/create/views.py +++ b/create/views.py @@ -42,9 +42,6 @@ def create_instance(request, compute_id): compute.password, compute.type) - storages = sorted(conn.get_storages(only_actives=True)) - networks = sorted(conn.get_networks()) - nwfilters = conn.get_nwfilters() instances = conn.get_instances() videos = conn.get_video() 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_buses = conn.get_disk_bus_types() 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: error_messages.append(lib_err) @@ -149,7 +149,6 @@ def create_instance(request, compute_id): else: for idx, vol in enumerate(data['images'].split(',')): try: - path = conn.get_volume_path(vol) volume = dict() volume['path'] = path