From 35f2148212cb0ff2801312e27a11fea8d2e8a7c0 Mon Sep 17 00:00:00 2001 From: Luis Eduardo Bonatti Date: Thu, 6 Mar 2025 16:48:50 -0300 Subject: [PATCH] Remove load references With [1] change the load references needs to be removed from the code. This commit removes the references regarding load such as software_load and target_load and changed to sw_version. Also creates a Host_v8 table and migrate from Host_v7 to Host_v8. Test Plan: PASS: SX install/bootstrap/unlocked. PASS: SX stx10 -> stx11 upgrade. PASS: DX Upgrade stx10 -> stx11 PASS: DX Rollback stx11 -> stx10 Story: 2011357 Task: 51752 [1]: https://review.opendev.org/c/starlingx/config/+/942000 Depends-On: https://review.opendev.org/c/starlingx/config/+/942000 Depends-On: https://review.opendev.org/c/starlingx/nfv/+/945400 Change-Id: I082df0c200fa9a3e7cb073ec7787ea88998d859c Signed-off-by: Luis Eduardo Bonatti --- .../nfvi_plugins/nfvi_infrastructure_api.py | 42 +++++++------------ ..._vim_db_stx_19.12 => nfv_vim_db_stx_25.09} | 2 +- .../tests/sw_update_testcase.py | 6 +-- .../tests/test_database_upgrades.py | 10 ++--- .../nfv_unit_tests/tests/test_instance.py | 6 +-- .../_database_infrastructure_module.py | 13 +++--- .../nfv_vim/database/_database_migrate.py | 23 ++++++++++ .../nfv_vim/database/model/__init__.py | 1 + nfv/nfv-vim/nfv_vim/database/model/_host.py | 25 +++++++++++ nfv/nfv-vim/nfv_vim/nfvi/objects/v1/_host.py | 5 +-- nfv/nfv-vim/nfv_vim/objects/_host.py | 13 ++---- nfv/tox.ini | 4 +- 12 files changed, 86 insertions(+), 64 deletions(-) rename nfv/nfv-tests/nfv_unit_tests/test_data/{nfv_vim_db_stx_19.12 => nfv_vim_db_stx_25.09} (51%) diff --git a/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_infrastructure_api.py b/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_infrastructure_api.py index 9d2035cb..bb3eaa64 100755 --- a/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_infrastructure_api.py +++ b/nfv/nfv-plugins/nfv_plugins/nfvi_plugins/nfvi_infrastructure_api.py @@ -433,8 +433,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): data_port_avail_status = state.get('data_ports_avail', None) host_action = (host_data.get('ihost_action') or "") host_action = host_action.rstrip('-') - software_load = host_data['software_load'] - target_load = host_data['target_load'] + sw_version = host_data.get("sw_version") device_image_update = host_data['device_image_update'] future.work(sysinv.get_host_labels, self._platform_token, @@ -467,8 +466,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): avail_status, host_action, host_data['uptime'], - software_load, - target_load, + sw_version, device_image_update, openstack_compute, openstack_control, @@ -570,8 +568,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): data_port_oper_state = state.get('data_ports_oper', None) data_port_avail_status = state.get('data_ports_avail', None) host_action = (host_data.get('ihost_action') or "").rstrip('-') - software_load = host_data['software_load'] - target_load = host_data['target_load'] + sw_version = host_data.get("sw_version") device_image_update = host_data['device_image_update'] admin_state, oper_state, avail_status, nfvi_data \ @@ -603,8 +600,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): avail_status, host_action, host_data['uptime'], - software_load, - target_load, + sw_version, device_image_update, openstack_compute, openstack_control, @@ -3185,8 +3181,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): data_port_oper_state = state.get('data_ports_oper', None) data_port_avail_status = state.get('data_ports_avail', None) host_action = (host_data.get('ihost_action') or "").rstrip('-') - software_load = host_data['software_load'] - target_load = host_data['target_load'] + sw_version = host_data.get("sw_version") device_image_update = host_data['device_image_update'] admin_state, oper_state, avail_status, nfvi_data \ @@ -3218,8 +3213,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): avail_status, host_action, host_data['uptime'], - software_load, - target_load, + sw_version, device_image_update, openstack_compute, openstack_control, @@ -3305,8 +3299,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): data_port_oper_state = state.get('data_ports_oper', None) data_port_avail_status = state.get('data_ports_avail', None) host_action = (host_data.get('ihost_action') or "").rstrip('-') - software_load = host_data['software_load'] - target_load = host_data['target_load'] + sw_version = host_data.get("sw_version") device_image_update = host_data['device_image_update'] admin_state, oper_state, avail_status, nfvi_data \ @@ -3338,8 +3331,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): avail_status, host_action, host_data['uptime'], - software_load, - target_load, + sw_version, device_image_update, openstack_compute, openstack_control, @@ -3424,8 +3416,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): sub_function_avail_status = state.get('subfunction_avail', None) data_port_oper_state = state.get('data_ports_oper', None) data_port_avail_status = state.get('data_ports_avail', None) - software_load = host_data['software_load'] - target_load = host_data['target_load'] + sw_version = host_data.get("sw_version") device_image_update = host_data['device_image_update'] admin_state, oper_state, avail_status, nfvi_data \ @@ -3457,8 +3448,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): avail_status, host_data['ihost_action'], host_data['uptime'], - software_load, - target_load, + sw_version, device_image_update, openstack_compute, openstack_control, @@ -3542,8 +3532,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): sub_function_avail_status = state.get('subfunction_avail', None) data_port_oper_state = state.get('data_ports_oper', None) data_port_avail_status = state.get('data_ports_avail', None) - software_load = host_data['software_load'] - target_load = host_data['target_load'] + sw_version = host_data.get("sw_version") device_image_update = host_data['device_image_update'] admin_state, oper_state, avail_status, nfvi_data \ @@ -3575,8 +3564,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): avail_status, host_data['ihost_action'], host_data['uptime'], - software_load, - target_load, + sw_version, device_image_update, openstack_compute, openstack_control, @@ -3713,8 +3701,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): sub_function_avail_status = state.get('subfunction_avail', None) data_port_oper_state = state.get('data_ports_oper', None) data_port_avail_status = state.get('data_ports_avail', None) - software_load = host_data['software_load'] - target_load = host_data['target_load'] + sw_version = host_data.get("sw_version") device_image_update = host_data['device_image_update'] admin_state, oper_state, avail_status, nfvi_data \ @@ -3746,8 +3733,7 @@ class NFVIInfrastructureAPI(nfvi.api.v1.NFVIInfrastructureAPI): avail_status, host_data['ihost_action'], host_data['uptime'], - software_load, - target_load, + sw_version, device_image_update, openstack_compute, openstack_control, diff --git a/nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_19.12 b/nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_25.09 similarity index 51% rename from nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_19.12 rename to nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_25.09 index 0a6e748e..531265c2 100644 --- a/nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_19.12 +++ b/nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_25.09 @@ -1 +1 @@ -{"tables": {"instances_v5": [{"last_action_data": "{\"action_uuid\": \"7fdae047-13d6-441d-abf3-300a8495f35f\", \"action_seqnum\": 36, \"action_state\": \"completed\", \"reason\": \"\", \"nfvi_action_data\": {\"context\": {\"content\": \"{\\\"resize\\\": {\\\"flavorRef\\\": \\\"36ef7356-c794-4d74-b2dd-b9b336e6b256\\\"}}\", \"token_id\": \"gAAAAABe1UwVFjN69TMvAYmBOqwlultMSFw2CkBdpiUvdL7T6rMEetBZKVmTtoer0BvtAKh9hjl3npL5u2PTsc_0QqRyd2wO2dkKfuoWLN_MEOQILowwhNEQxyO0prbNVlWsyuvVvjTYS6o5O4YReSEKXkDX2Rv9wFxerC-mL3_a09OJZF_7uVA\", \"request_uuid\": \"7fdae047-13d6-441d-abf3-300a8495f35f\", \"version\": \"2.53\", \"tenant_id\": \"1ea3514a93114153b1099397b7d038c6\"}, \"from_cli\": true, \"skip_guest_notify\": false, \"action_uuid\": \"7fdae047-13d6-441d-abf3-300a8495f35f\", \"last_update_timestamp\": \"2020-06-01T18:42:29Z\", \"action_parameters\": \"{'instance-type-uuid': u'36ef7356-c794-4d74-b2dd-b9b336e6b256'}\", \"action_state\": \"initial\", \"skip_guest_vote\": false, \"reason\": \"\", \"action_type\": \"resize\", \"created_timestamp\": \"2020-06-01T18:42:29Z\"}, \"action_type\": \"resize\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "bc183e1f-86c2-41b1-88b1-e844bcbb7521", "elapsed_time_on_host": "387", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"7a57b69c-3b55-4537-8cc8-c97beb75471a\"], \"live_migration_timeout\": null, \"name\": \"cirros-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T18:44:57Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 0, \"ram\": 128, \"original_name\": \"medium\", \"vcpus\": 2, \"extra_specs\": {}, \"swap\": 0, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-0\", \"image_uuid\": null, \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"bc183e1f-86c2-41b1-88b1-e844bcbb7521\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-0", "action_data": "{\"action_uuid\": \"4536b1f3-2ddd-4bda-8f22-b5a54d3ef61e\", \"action_seqnum\": 37, \"action_state\": \"completed\", \"reason\": null, \"nfvi_action_data\": {\"context\": {\"content\": \"{\\\"revertResize\\\": null}\", \"token_id\": \"gAAAAABe1UwVFjN69TMvAYmBOqwlultMSFw2CkBdpiUvdL7T6rMEetBZKVmTtoer0BvtAKh9hjl3npL5u2PTsc_0QqRyd2wO2dkKfuoWLN_MEOQILowwhNEQxyO0prbNVlWsyuvVvjTYS6o5O4YReSEKXkDX2Rv9wFxerC-mL3_a09OJZF_7uVA\", \"request_uuid\": \"4536b1f3-2ddd-4bda-8f22-b5a54d3ef61e\", \"version\": \"2.53\", \"tenant_id\": \"1ea3514a93114153b1099397b7d038c6\"}, \"from_cli\": true, \"skip_guest_notify\": false, \"action_uuid\": \"4536b1f3-2ddd-4bda-8f22-b5a54d3ef61e\", \"last_update_timestamp\": \"2020-06-01T18:44:57Z\", \"action_parameters\": \"\", \"action_state\": \"completed\", \"skip_guest_vote\": false, \"reason\": null, \"action_type\": \"revert-resize\", \"created_timestamp\": \"2020-06-01T18:44:23Z\"}, \"action_type\": \"revert-resize\"}", "image_uuid": null, "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "355", "name": "cirros-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 4, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "107fc056-6c1d-4aec-8c5b-de9203aae97b", "elapsed_time_on_host": "3716", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"1fccdb35-55ce-468e-a034-3f4d449dbb43\"], \"live_migration_timeout\": null, \"name\": \"cirros-ephemeral-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T17:48:35Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 1, \"ram\": 64, \"original_name\": \"small_ephemeral\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 0, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-0\", \"image_uuid\": null, \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"107fc056-6c1d-4aec-8c5b-de9203aae97b\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-0", "action_data": "{\"action_uuid\": null, \"action_seqnum\": 3, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "image_uuid": null, "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "3716", "name": "cirros-ephemeral-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 6, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "84e315ce-56f8-49dc-ae25-ba06472261eb", "elapsed_time_on_host": "3687", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"1a002e19-52b2-4e3d-bfbb-b8eba2f14930\"], \"live_migration_timeout\": null, \"name\": \"cirros-swap-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T17:49:10Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 0, \"ram\": 64, \"original_name\": \"small_swap\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 1, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-1\", \"image_uuid\": null, \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"84e315ce-56f8-49dc-ae25-ba06472261eb\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-1", "action_data": "{\"action_uuid\": null, \"action_seqnum\": 5, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "image_uuid": null, "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "3666", "name": "cirros-swap-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 8, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "d9cc5957-f50f-4e5f-aee0-deaba829ff4a", "elapsed_time_on_host": "3617", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"a547de3f-b504-4917-bc9f-48242e9a1d79\"], \"live_migration_timeout\": null, \"name\": \"cirros-ephemeral-swap-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T17:49:59Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 1, \"ram\": 64, \"original_name\": \"small_ephemeral_swap\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 1, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-0\", \"image_uuid\": null, \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"d9cc5957-f50f-4e5f-aee0-deaba829ff4a\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-0", "action_data": "{\"action_uuid\": null, \"action_seqnum\": 7, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "image_uuid": null, "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "3617", "name": "cirros-ephemeral-swap-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 9, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "c62009f4-7a31-4bfd-a056-7427fa5b5c6d", "elapsed_time_on_host": "3555", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [], \"live_migration_timeout\": null, \"name\": \"cirros-image-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T18:46:54Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 0, \"ram\": 64, \"original_name\": \"small\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 0, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-1\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"c62009f4-7a31-4bfd-a056-7427fa5b5c6d\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-1", "action_data": "{\"action_uuid\": \"59f1020b-cf1b-434d-abc1-7b7348498f81\", \"action_seqnum\": 38, \"action_state\": \"completed\", \"reason\": \"\", \"nfvi_action_data\": {\"context\": {\"content\": \"{\\\"rebuild\\\": {\\\"name\\\": \\\"cirros-image-1\\\", \\\"imageRef\\\": \\\"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\\\"}}\", \"token_id\": \"gAAAAABe1UzIhO0ugVQx3Kcb6N76f4F2BJcFjxw16z7bYXT3q4HhiarNMDgfY6ldZtAv54kuohtarT6zbDkBMP7TeeB_J1UbuqkIyFmcGRgYjC1hAYovqgZhx7mQSWgkzeGIaMFuEroAcn532TN-ThT04SBNk0qCdHZvySs63tZmvKLc2RpMp_Q\", \"request_uuid\": \"59f1020b-cf1b-434d-abc1-7b7348498f81\", \"version\": \"2.53\", \"tenant_id\": \"1ea3514a93114153b1099397b7d038c6\"}, \"from_cli\": true, \"skip_guest_notify\": false, \"action_uuid\": \"59f1020b-cf1b-434d-abc1-7b7348498f81\", \"last_update_timestamp\": \"2020-06-01T18:45:29Z\", \"action_parameters\": \"{'instance-image-uuid': u'fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d', 'instance-name': u'cirros-image-1'}\", \"action_state\": \"initial\", \"skip_guest_vote\": false, \"reason\": \"\", \"action_type\": \"rebuild\", \"created_timestamp\": \"2020-06-01T18:45:29Z\"}, \"action_type\": \"rebuild\"}", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "231", "name": "cirros-image-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 12, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "21c551cf-3135-4ab3-9da5-85c3cf396526", "elapsed_time_on_host": "3557", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"f81227f6-a8b9-459e-b195-97ede3ddb71a\"], \"live_migration_timeout\": null, \"name\": \"cirros-image-with-volumes-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T17:51:38Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 0, \"ram\": 64, \"original_name\": \"small\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 0, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-0\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"21c551cf-3135-4ab3-9da5-85c3cf396526\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-0", "action_data": "{\"action_uuid\": null, \"action_seqnum\": 11, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "3524", "name": "cirros-image-with-volumes-1"}], "instances_v4": [], "hypervisors": [{"stats_available": true, "mem_max_mb": 8191, "uuid": "2056f1d0-68fe-4e1e-ac34-52f3ee485f35", "vcpus_used": 2, "vcpus_max": 2, "running_instances": 2, "disk_max_gb": 9, "nfvi_hypervisor_data": "{\"mem_max_mb\": 8191, \"uuid\": \"2056f1d0-68fe-4e1e-ac34-52f3ee485f35\", \"vcpus_used\": 2, \"vcpus_max\": 2, \"disk_max_gb\": 9, \"admin_state\": \"unlocked\", \"host_name\": \"compute-1\", \"mem_free_mb\": 5563, \"mem_used_mb\": 2628, \"disk_used_gb\": 1, \"oper_state\": \"enabled\", \"running_vms\": 2}", "oper_state": "enabled", "host_name": "compute-1", "mem_free_mb": 5563, "admin_state": "unlocked", "mem_used_mb": 2628, "disk_used_gb": 1}, {"stats_available": true, "mem_max_mb": 8191, "uuid": "77ece7e2-4b5d-46ee-8c65-43d69e64a7f9", "vcpus_used": 5, "vcpus_max": 2, "running_instances": 4, "disk_max_gb": 9, "nfvi_hypervisor_data": "{\"mem_max_mb\": 8191, \"uuid\": \"77ece7e2-4b5d-46ee-8c65-43d69e64a7f9\", \"vcpus_used\": 5, \"vcpus_max\": 2, \"disk_max_gb\": 9, \"admin_state\": \"unlocked\", \"host_name\": \"compute-0\", \"mem_free_mb\": 5371, \"mem_used_mb\": 2820, \"disk_used_gb\": 3, \"oper_state\": \"enabled\", \"running_vms\": 4}", "oper_state": "enabled", "host_name": "compute-0", "mem_free_mb": 5371, "admin_state": "unlocked", "mem_used_mb": 2820, "disk_used_gb": 3}], "subnets": [{"is_dhcp_enabled": true, "network_uuid": "78b76f2e-4e34-4534-a991-d946acb439f5", "uuid": "b248db56-4a16-4951-9657-b54544a48b1c", "subnet_prefix": 24, "gateway_ip": "192.168.51.1", "ip_version": "4", "subnet_ip": "192.168.51.0", "name": "external"}, {"is_dhcp_enabled": true, "network_uuid": "b9ac0c6a-105a-45b2-834b-e0b751e25d5b", "uuid": "c97f8d67-6ffb-4daf-80ec-0082a2d8da2f", "subnet_prefix": 24, "gateway_ip": "192.168.50.1", "ip_version": "4", "subnet_ip": "192.168.50.0", "name": "internal"}], "hosts_v6": [{"uptime": "19072", "uuid": "9d36913b-53d7-4d1a-ab51-106672fe8411", "recover_instances": true, "host_services_locked": false, "name": "controller-0", "nfvi_host_data": "{\"software_load\": \"19.12\", \"uptime\": 19072, \"openstack_control\": true, \"target_load\": \"19.12\", \"openstack_compute\": false, \"avail_status\": \"available\", \"nfvi_data\": {\"subfunction_oper\": \"n/a\", \"uuid\": \"9d36913b-53d7-4d1a-ab51-106672fe8411\", \"subfunctions\": \"controller\", \"avail_status\": \"available\", \"subfunction_avail\": \"n/a\", \"name\": \"controller-0\", \"subfunction_name\": \"n/a\", \"admin_state\": \"unlocked\", \"data_ports_avail\": \"n/a\", \"oper_state\": \"enabled\", \"data_ports_oper\": \"n/a\", \"data_ports_name\": \"n/a\", \"personality\": \"controller\"}, \"name\": \"controller-0\", \"oper_state\": \"enabled\", \"remote_storage\": false, \"action\": \"unlock\", \"admin_state\": \"unlocked\", \"personality\": \"controller\", \"uuid\": \"9d36913b-53d7-4d1a-ab51-106672fe8411\"}", "state": "enabled", "upgrade_inprogress": false, "action": "", "elapsed_time_in_state": "18419", "personality": "controller"}, {"uptime": "17116", "uuid": "9fb70a98-4e1d-48df-8ef2-ade117bb28b4", "recover_instances": true, "host_services_locked": false, "name": "controller-1", "nfvi_host_data": "{\"software_load\": \"19.12\", \"uptime\": 17116, \"openstack_control\": true, \"target_load\": \"19.12\", \"openstack_compute\": false, \"avail_status\": \"available\", \"nfvi_data\": {\"subfunction_oper\": \"n/a\", \"uuid\": \"9fb70a98-4e1d-48df-8ef2-ade117bb28b4\", \"subfunctions\": \"controller\", \"avail_status\": \"available\", \"subfunction_avail\": \"n/a\", \"name\": \"controller-1\", \"subfunction_name\": \"n/a\", \"admin_state\": \"unlocked\", \"data_ports_avail\": \"n/a\", \"oper_state\": \"enabled\", \"data_ports_oper\": \"n/a\", \"data_ports_name\": \"n/a\", \"personality\": \"controller\"}, \"name\": \"controller-1\", \"oper_state\": \"enabled\", \"remote_storage\": false, \"action\": \"unlock\", \"admin_state\": \"unlocked\", \"personality\": \"controller\", \"uuid\": \"9fb70a98-4e1d-48df-8ef2-ade117bb28b4\"}", "state": "enabled", "upgrade_inprogress": false, "action": "", "elapsed_time_in_state": "16844", "personality": "controller"}, {"uptime": "15967", "uuid": "3bc1506f-3375-4204-8319-269b2b00ab58", "recover_instances": true, "host_services_locked": false, "name": "compute-0", "nfvi_host_data": "{\"software_load\": \"19.12\", \"uptime\": 15967, \"openstack_control\": false, \"target_load\": \"19.12\", \"openstack_compute\": true, \"avail_status\": \"available\", \"nfvi_data\": {\"subfunction_oper\": \"n/a\", \"uuid\": \"3bc1506f-3375-4204-8319-269b2b00ab58\", \"subfunctions\": \"worker\", \"avail_status\": \"available\", \"subfunction_avail\": \"n/a\", \"name\": \"compute-0\", \"subfunction_name\": \"n/a\", \"admin_state\": \"unlocked\", \"data_ports_avail\": \"n/a\", \"oper_state\": \"enabled\", \"data_ports_oper\": \"n/a\", \"data_ports_name\": \"n/a\", \"personality\": \"worker\"}, \"name\": \"compute-0\", \"oper_state\": \"enabled\", \"remote_storage\": false, \"action\": \"unlock\", \"admin_state\": \"unlocked\", \"personality\": \"worker\", \"uuid\": \"3bc1506f-3375-4204-8319-269b2b00ab58\"}", "state": "enabled", "upgrade_inprogress": false, "action": "", "elapsed_time_in_state": "11671", "personality": "worker"}, {"uptime": "15963", "uuid": "97ba87d6-27d4-4daa-9ca1-40b580e3d5b7", "recover_instances": true, "host_services_locked": false, "name": "compute-1", "nfvi_host_data": "{\"software_load\": \"19.12\", \"uptime\": 15963, \"openstack_control\": false, \"target_load\": \"19.12\", \"openstack_compute\": true, \"avail_status\": \"available\", \"nfvi_data\": {\"subfunction_oper\": \"n/a\", \"uuid\": \"97ba87d6-27d4-4daa-9ca1-40b580e3d5b7\", \"subfunctions\": \"worker\", \"avail_status\": \"available\", \"subfunction_avail\": \"n/a\", \"name\": \"compute-1\", \"subfunction_name\": \"n/a\", \"admin_state\": \"unlocked\", \"data_ports_avail\": \"n/a\", \"oper_state\": \"enabled\", \"data_ports_oper\": \"n/a\", \"data_ports_name\": \"n/a\", \"personality\": \"worker\"}, \"name\": \"compute-1\", \"oper_state\": \"enabled\", \"remote_storage\": false, \"action\": \"unlock\", \"admin_state\": \"unlocked\", \"personality\": \"worker\", \"uuid\": \"97ba87d6-27d4-4daa-9ca1-40b580e3d5b7\"}", "state": "enabled", "upgrade_inprogress": false, "action": "", "elapsed_time_in_state": "11672", "personality": "worker"}], "instance_types_v5": [{"mem_mb": 512, "live_migration_max_downtime": null, "uuid": "2fa093ba-f9fc-4a73-b7a4-32b155eebf39", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "m1.tiny"}, {"mem_mb": 2048, "live_migration_max_downtime": null, "uuid": "962d3c7b-d8cd-4bdd-9807-62ee58387c9a", "disk_gb": 20, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "m1.small"}, {"mem_mb": 8192, "live_migration_max_downtime": null, "uuid": "cbe77f5f-4ec6-45f5-be58-a3e6085bcac9", "disk_gb": 80, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 4, "have_details": true, "live_migration_timeout": null, "name": "m1.large"}, {"mem_mb": 16384, "live_migration_max_downtime": null, "uuid": "de4bce8d-be10-42eb-b706-2fdae7c96ed8", "disk_gb": 160, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 8, "have_details": true, "live_migration_timeout": null, "name": "m1.xlarge"}, {"mem_mb": 4096, "live_migration_max_downtime": null, "uuid": "e2e2d2f7-15a4-4c6a-a016-aa96a1c6807b", "disk_gb": 40, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "m1.medium"}, {"mem_mb": 128, "live_migration_max_downtime": null, "uuid": "1dbc5262-1671-48b8-9473-6033dfd7fe21", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 1, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "medium_swap"}, {"mem_mb": 64, "live_migration_max_downtime": null, "uuid": "36ef7356-c794-4d74-b2dd-b9b336e6b256", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "small"}, {"mem_mb": 64, "live_migration_max_downtime": null, "uuid": "56c244d2-8430-40d0-b7be-9a7a3a454805", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 1, "swap_gb": 1, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "small_ephemeral_swap"}, {"mem_mb": 128, "live_migration_max_downtime": null, "uuid": "5d049d11-a990-4a40-865f-d9ea3bb1bddc", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 1, "swap_gb": 0, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "medium_ephemeral"}, {"mem_mb": 64, "live_migration_max_downtime": null, "uuid": "ad83e761-ce7e-4e6c-ae49-93d8fc07348b", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 1, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "small_swap"}, {"mem_mb": 64, "live_migration_max_downtime": null, "uuid": "b0b2a3a9-126f-4759-8c8b-f95f0dd8e83f", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 1, "swap_gb": 0, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "small_ephemeral"}, {"mem_mb": 128, "live_migration_max_downtime": null, "uuid": "fabfbe43-69ed-458e-9b42-fe3420457d59", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 1, "swap_gb": 1, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "medium_ephemeral_swap"}, {"mem_mb": 128, "live_migration_max_downtime": null, "uuid": "fe00e091-fd6e-4d8e-81e0-ee0ead80b032", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "medium"}], "host_aggregates": [], "hosts_v5": [], "volume_snapshots": [], "volumes_v1": [{"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"yes\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"cirros\", \"action\": \"\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"uuid\": \"7a57b69c-3b55-4537-8cc8-c97beb75471a\"}", "bootable": "yes", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "cirros", "action": "", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "uuid": "7a57b69c-3b55-4537-8cc8-c97beb75471a"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"no\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"empty_volume\", \"action\": \"\", \"image_uuid\": null, \"uuid\": \"f81227f6-a8b9-459e-b195-97ede3ddb71a\"}", "bootable": "no", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "empty_volume", "action": "", "image_uuid": null, "uuid": "f81227f6-a8b9-459e-b195-97ede3ddb71a"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"yes\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"cirros-ephemeral-swap\", \"action\": \"\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"uuid\": \"a547de3f-b504-4917-bc9f-48242e9a1d79\"}", "bootable": "yes", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "cirros-ephemeral-swap", "action": "", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "uuid": "a547de3f-b504-4917-bc9f-48242e9a1d79"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"yes\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"cirros-swap\", \"action\": \"\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"uuid\": \"1a002e19-52b2-4e3d-bfbb-b8eba2f14930\"}", "bootable": "yes", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "cirros-swap", "action": "", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "uuid": "1a002e19-52b2-4e3d-bfbb-b8eba2f14930"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"yes\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"cirros-ephemeral\", \"action\": \"\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"uuid\": \"1fccdb35-55ce-468e-a034-3f4d449dbb43\"}", "bootable": "yes", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "cirros-ephemeral", "action": "", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "uuid": "1fccdb35-55ce-468e-a034-3f4d449dbb43"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"no\", \"encrypted\": \"no\", \"avail_status\": [\"available\"], \"name\": \"image-fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"action\": \"\", \"image_uuid\": null, \"uuid\": \"baf68b4a-f108-476c-8df5-325591054132\"}", "bootable": "no", "encrypted": "no", "avail_status": "[\"available\"]", "name": "image-fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "action": "", "image_uuid": null, "uuid": "baf68b4a-f108-476c-8df5-325591054132"}], "instance_types_v4": [], "service_hosts": [], "instance_groups": [], "systems": [{"name": "8b37cd27-dd14-43e8-b8aa-6977758dca0e", "description": ""}], "host_groups": [], "sw_updates": [], "images": [{"properties": "{\"hw_wrs_live_migration_timeout\": null, \"hw_wrs_live_migration_max_downtime\": null}", "description": "", "container_format": "bare", "avail_status": "[\"available\"]", "disk_format": "qcow2", "visibility": "public", "name": "cirros", "min_disk_size_gb": 0, "protected": "no", "nfvi_image_data": "{\"description\": \"\", \"name\": \"cirros\", \"container_format\": \"bare\", \"min_memory_size_mb\": 0, \"disk_format\": \"qcow2\", \"visibility\": \"public\", \"properties\": {\"hw_wrs_live_migration_timeout\": null, \"hw_wrs_live_migration_max_downtime\": null}, \"min_disk_size_gb\": 0, \"protected\": \"no\", \"action\": \"\", \"avail_status\": [\"available\"], \"uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\"}", "action": "", "min_memory_size_mb": 0, "uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d"}], "tenants": [{"description": "Bootstrap project for initializing the cloud.", "enabled": "1", "uuid": "1ea3514a-9311-4153-b109-9397b7d038c6", "name": "admin"}, {"description": "", "enabled": "1", "uuid": "66d84487-4cab-4bb5-94fd-de6170aed20c", "name": "internal_cinder"}, {"description": "Service Project for RegionOne/service", "enabled": "1", "uuid": "f1dcf022-82b9-4e7a-9376-f01b05276ff2", "name": "service"}], "networks": [{"is_shared": true, "segmentation_id": "500", "avail_status": "[]", "physical_network": "physnet1", "name": "external", "oper_state": "enabled", "admin_state": "unlocked", "mtu": 1500, "network_type": "vlan", "uuid": "78b76f2e-4e34-4534-a991-d946acb439f5"}, {"is_shared": true, "segmentation_id": "400", "avail_status": "[]", "physical_network": "physnet0", "name": "internal", "oper_state": "enabled", "admin_state": "unlocked", "mtu": 1500, "network_type": "vlan", "uuid": "b9ac0c6a-105a-45b2-834b-e0b751e25d5b"}]}, "version": 1} \ No newline at end of file +{"tables": {"instances_v5": [{"last_action_data": "{\"action_uuid\": \"7fdae047-13d6-441d-abf3-300a8495f35f\", \"action_seqnum\": 36, \"action_state\": \"completed\", \"reason\": \"\", \"nfvi_action_data\": {\"context\": {\"content\": \"{\\\"resize\\\": {\\\"flavorRef\\\": \\\"36ef7356-c794-4d74-b2dd-b9b336e6b256\\\"}}\", \"token_id\": \"gAAAAABe1UwVFjN69TMvAYmBOqwlultMSFw2CkBdpiUvdL7T6rMEetBZKVmTtoer0BvtAKh9hjl3npL5u2PTsc_0QqRyd2wO2dkKfuoWLN_MEOQILowwhNEQxyO0prbNVlWsyuvVvjTYS6o5O4YReSEKXkDX2Rv9wFxerC-mL3_a09OJZF_7uVA\", \"request_uuid\": \"7fdae047-13d6-441d-abf3-300a8495f35f\", \"version\": \"2.53\", \"tenant_id\": \"1ea3514a93114153b1099397b7d038c6\"}, \"from_cli\": true, \"skip_guest_notify\": false, \"action_uuid\": \"7fdae047-13d6-441d-abf3-300a8495f35f\", \"last_update_timestamp\": \"2020-06-01T18:42:29Z\", \"action_parameters\": \"{'instance-type-uuid': u'36ef7356-c794-4d74-b2dd-b9b336e6b256'}\", \"action_state\": \"initial\", \"skip_guest_vote\": false, \"reason\": \"\", \"action_type\": \"resize\", \"created_timestamp\": \"2020-06-01T18:42:29Z\"}, \"action_type\": \"resize\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "bc183e1f-86c2-41b1-88b1-e844bcbb7521", "elapsed_time_on_host": "387", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"7a57b69c-3b55-4537-8cc8-c97beb75471a\"], \"live_migration_timeout\": null, \"name\": \"cirros-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T18:44:57Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 0, \"ram\": 128, \"original_name\": \"medium\", \"vcpus\": 2, \"extra_specs\": {}, \"swap\": 0, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-0\", \"image_uuid\": null, \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"bc183e1f-86c2-41b1-88b1-e844bcbb7521\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-0", "action_data": "{\"action_uuid\": \"4536b1f3-2ddd-4bda-8f22-b5a54d3ef61e\", \"action_seqnum\": 37, \"action_state\": \"completed\", \"reason\": null, \"nfvi_action_data\": {\"context\": {\"content\": \"{\\\"revertResize\\\": null}\", \"token_id\": \"gAAAAABe1UwVFjN69TMvAYmBOqwlultMSFw2CkBdpiUvdL7T6rMEetBZKVmTtoer0BvtAKh9hjl3npL5u2PTsc_0QqRyd2wO2dkKfuoWLN_MEOQILowwhNEQxyO0prbNVlWsyuvVvjTYS6o5O4YReSEKXkDX2Rv9wFxerC-mL3_a09OJZF_7uVA\", \"request_uuid\": \"4536b1f3-2ddd-4bda-8f22-b5a54d3ef61e\", \"version\": \"2.53\", \"tenant_id\": \"1ea3514a93114153b1099397b7d038c6\"}, \"from_cli\": true, \"skip_guest_notify\": false, \"action_uuid\": \"4536b1f3-2ddd-4bda-8f22-b5a54d3ef61e\", \"last_update_timestamp\": \"2020-06-01T18:44:57Z\", \"action_parameters\": \"\", \"action_state\": \"completed\", \"skip_guest_vote\": false, \"reason\": null, \"action_type\": \"revert-resize\", \"created_timestamp\": \"2020-06-01T18:44:23Z\"}, \"action_type\": \"revert-resize\"}", "image_uuid": null, "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "355", "name": "cirros-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 4, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "107fc056-6c1d-4aec-8c5b-de9203aae97b", "elapsed_time_on_host": "3716", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"1fccdb35-55ce-468e-a034-3f4d449dbb43\"], \"live_migration_timeout\": null, \"name\": \"cirros-ephemeral-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T17:48:35Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 1, \"ram\": 64, \"original_name\": \"small_ephemeral\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 0, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-0\", \"image_uuid\": null, \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"107fc056-6c1d-4aec-8c5b-de9203aae97b\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-0", "action_data": "{\"action_uuid\": null, \"action_seqnum\": 3, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "image_uuid": null, "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "3716", "name": "cirros-ephemeral-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 6, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "84e315ce-56f8-49dc-ae25-ba06472261eb", "elapsed_time_on_host": "3687", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"1a002e19-52b2-4e3d-bfbb-b8eba2f14930\"], \"live_migration_timeout\": null, \"name\": \"cirros-swap-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T17:49:10Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 0, \"ram\": 64, \"original_name\": \"small_swap\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 1, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-1\", \"image_uuid\": null, \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"84e315ce-56f8-49dc-ae25-ba06472261eb\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-1", "action_data": "{\"action_uuid\": null, \"action_seqnum\": 5, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "image_uuid": null, "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "3666", "name": "cirros-swap-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 8, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "d9cc5957-f50f-4e5f-aee0-deaba829ff4a", "elapsed_time_on_host": "3617", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"a547de3f-b504-4917-bc9f-48242e9a1d79\"], \"live_migration_timeout\": null, \"name\": \"cirros-ephemeral-swap-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T17:49:59Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 1, \"ram\": 64, \"original_name\": \"small_ephemeral_swap\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 1, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-0\", \"image_uuid\": null, \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"d9cc5957-f50f-4e5f-aee0-deaba829ff4a\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-0", "action_data": "{\"action_uuid\": null, \"action_seqnum\": 7, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "image_uuid": null, "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "3617", "name": "cirros-ephemeral-swap-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 9, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "c62009f4-7a31-4bfd-a056-7427fa5b5c6d", "elapsed_time_on_host": "3555", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [], \"live_migration_timeout\": null, \"name\": \"cirros-image-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T18:46:54Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 0, \"ram\": 64, \"original_name\": \"small\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 0, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-1\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"c62009f4-7a31-4bfd-a056-7427fa5b5c6d\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-1", "action_data": "{\"action_uuid\": \"59f1020b-cf1b-434d-abc1-7b7348498f81\", \"action_seqnum\": 38, \"action_state\": \"completed\", \"reason\": \"\", \"nfvi_action_data\": {\"context\": {\"content\": \"{\\\"rebuild\\\": {\\\"name\\\": \\\"cirros-image-1\\\", \\\"imageRef\\\": \\\"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\\\"}}\", \"token_id\": \"gAAAAABe1UzIhO0ugVQx3Kcb6N76f4F2BJcFjxw16z7bYXT3q4HhiarNMDgfY6ldZtAv54kuohtarT6zbDkBMP7TeeB_J1UbuqkIyFmcGRgYjC1hAYovqgZhx7mQSWgkzeGIaMFuEroAcn532TN-ThT04SBNk0qCdHZvySs63tZmvKLc2RpMp_Q\", \"request_uuid\": \"59f1020b-cf1b-434d-abc1-7b7348498f81\", \"version\": \"2.53\", \"tenant_id\": \"1ea3514a93114153b1099397b7d038c6\"}, \"from_cli\": true, \"skip_guest_notify\": false, \"action_uuid\": \"59f1020b-cf1b-434d-abc1-7b7348498f81\", \"last_update_timestamp\": \"2020-06-01T18:45:29Z\", \"action_parameters\": \"{'instance-image-uuid': u'fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d', 'instance-name': u'cirros-image-1'}\", \"action_state\": \"initial\", \"skip_guest_vote\": false, \"reason\": \"\", \"action_type\": \"rebuild\", \"created_timestamp\": \"2020-06-01T18:45:29Z\"}, \"action_type\": \"rebuild\"}", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "231", "name": "cirros-image-1"}, {"last_action_data": "{\"action_uuid\": null, \"action_seqnum\": 12, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "guest_services": "{\"services\": {}, \"state\": null, \"nfvi_guest_services\": []}", "uuid": "21c551cf-3135-4ab3-9da5-85c3cf396526", "elapsed_time_on_host": "3557", "avail_status": "[]", "nfvi_instance_data": "{\"attached_volumes\": [\"f81227f6-a8b9-459e-b195-97ede3ddb71a\"], \"live_migration_timeout\": null, \"name\": \"cirros-image-with-volumes-1\", \"recovery_priority\": null, \"tenant_id\": \"1ea3514a-9311-4153-b109-9397b7d038c6\", \"avail_status\": [], \"nfvi_data\": {\"last_update_timestamp\": \"2020-06-01T17:51:38Z\", \"vm_state\": \"active\", \"task_state\": \"none\", \"power_state\": \"running\"}, \"live_migration_support\": true, \"instance_type\": {\"ephemeral\": 0, \"ram\": 64, \"original_name\": \"small\", \"vcpus\": 1, \"extra_specs\": {}, \"swap\": 0, \"disk\": 1}, \"oper_state\": \"enabled\", \"host_name\": \"compute-0\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"action\": \"\", \"admin_state\": \"unlocked\", \"uuid\": \"21c551cf-3135-4ab3-9da5-85c3cf396526\"}", "live_migration_support": true, "unlock_to_recover": false, "oper_state": "enabled", "host_name": "compute-0", "action_data": "{\"action_uuid\": null, \"action_seqnum\": 11, \"action_state\": null, \"reason\": \"\", \"nfvi_action_data\": null, \"action_type\": \"\"}", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "action": "", "admin_state": "unlocked", "recoverable": true, "elapsed_time_in_state": "3524", "name": "cirros-image-with-volumes-1"}], "instances_v4": [], "hypervisors": [{"stats_available": true, "mem_max_mb": 8191, "uuid": "2056f1d0-68fe-4e1e-ac34-52f3ee485f35", "vcpus_used": 2, "vcpus_max": 2, "running_instances": 2, "disk_max_gb": 9, "nfvi_hypervisor_data": "{\"mem_max_mb\": 8191, \"uuid\": \"2056f1d0-68fe-4e1e-ac34-52f3ee485f35\", \"vcpus_used\": 2, \"vcpus_max\": 2, \"disk_max_gb\": 9, \"admin_state\": \"unlocked\", \"host_name\": \"compute-1\", \"mem_free_mb\": 5563, \"mem_used_mb\": 2628, \"disk_used_gb\": 1, \"oper_state\": \"enabled\", \"running_vms\": 2}", "oper_state": "enabled", "host_name": "compute-1", "mem_free_mb": 5563, "admin_state": "unlocked", "mem_used_mb": 2628, "disk_used_gb": 1}, {"stats_available": true, "mem_max_mb": 8191, "uuid": "77ece7e2-4b5d-46ee-8c65-43d69e64a7f9", "vcpus_used": 5, "vcpus_max": 2, "running_instances": 4, "disk_max_gb": 9, "nfvi_hypervisor_data": "{\"mem_max_mb\": 8191, \"uuid\": \"77ece7e2-4b5d-46ee-8c65-43d69e64a7f9\", \"vcpus_used\": 5, \"vcpus_max\": 2, \"disk_max_gb\": 9, \"admin_state\": \"unlocked\", \"host_name\": \"compute-0\", \"mem_free_mb\": 5371, \"mem_used_mb\": 2820, \"disk_used_gb\": 3, \"oper_state\": \"enabled\", \"running_vms\": 4}", "oper_state": "enabled", "host_name": "compute-0", "mem_free_mb": 5371, "admin_state": "unlocked", "mem_used_mb": 2820, "disk_used_gb": 3}], "subnets": [{"is_dhcp_enabled": true, "network_uuid": "78b76f2e-4e34-4534-a991-d946acb439f5", "uuid": "b248db56-4a16-4951-9657-b54544a48b1c", "subnet_prefix": 24, "gateway_ip": "192.168.51.1", "ip_version": "4", "subnet_ip": "192.168.51.0", "name": "external"}, {"is_dhcp_enabled": true, "network_uuid": "b9ac0c6a-105a-45b2-834b-e0b751e25d5b", "uuid": "c97f8d67-6ffb-4daf-80ec-0082a2d8da2f", "subnet_prefix": 24, "gateway_ip": "192.168.50.1", "ip_version": "4", "subnet_ip": "192.168.50.0", "name": "internal"}], "hosts_v6": [{"uptime": "19072", "uuid": "9d36913b-53d7-4d1a-ab51-106672fe8411", "recover_instances": true, "host_services_locked": false, "name": "controller-0", "nfvi_host_data": "{\"sw_version\": \"25.09\", \"uptime\": 19072, \"openstack_control\": true, \"openstack_compute\": false, \"avail_status\": \"available\", \"nfvi_data\": {\"subfunction_oper\": \"n/a\", \"uuid\": \"9d36913b-53d7-4d1a-ab51-106672fe8411\", \"subfunctions\": \"controller\", \"avail_status\": \"available\", \"subfunction_avail\": \"n/a\", \"name\": \"controller-0\", \"subfunction_name\": \"n/a\", \"admin_state\": \"unlocked\", \"data_ports_avail\": \"n/a\", \"oper_state\": \"enabled\", \"data_ports_oper\": \"n/a\", \"data_ports_name\": \"n/a\", \"personality\": \"controller\"}, \"name\": \"controller-0\", \"oper_state\": \"enabled\", \"remote_storage\": false, \"action\": \"unlock\", \"admin_state\": \"unlocked\", \"personality\": \"controller\", \"uuid\": \"9d36913b-53d7-4d1a-ab51-106672fe8411\"}", "state": "enabled", "upgrade_inprogress": false, "action": "", "elapsed_time_in_state": "18419", "personality": "controller"}, {"uptime": "17116", "uuid": "9fb70a98-4e1d-48df-8ef2-ade117bb28b4", "recover_instances": true, "host_services_locked": false, "name": "controller-1", "nfvi_host_data": "{\"sw_version\": \"25.09\", \"uptime\": 17116, \"openstack_control\": true, \"openstack_compute\": false, \"avail_status\": \"available\", \"nfvi_data\": {\"subfunction_oper\": \"n/a\", \"uuid\": \"9fb70a98-4e1d-48df-8ef2-ade117bb28b4\", \"subfunctions\": \"controller\", \"avail_status\": \"available\", \"subfunction_avail\": \"n/a\", \"name\": \"controller-1\", \"subfunction_name\": \"n/a\", \"admin_state\": \"unlocked\", \"data_ports_avail\": \"n/a\", \"oper_state\": \"enabled\", \"data_ports_oper\": \"n/a\", \"data_ports_name\": \"n/a\", \"personality\": \"controller\"}, \"name\": \"controller-1\", \"oper_state\": \"enabled\", \"remote_storage\": false, \"action\": \"unlock\", \"admin_state\": \"unlocked\", \"personality\": \"controller\", \"uuid\": \"9fb70a98-4e1d-48df-8ef2-ade117bb28b4\"}", "state": "enabled", "upgrade_inprogress": false, "action": "", "elapsed_time_in_state": "16844", "personality": "controller"}, {"uptime": "15967", "uuid": "3bc1506f-3375-4204-8319-269b2b00ab58", "recover_instances": true, "host_services_locked": false, "name": "compute-0", "nfvi_host_data": "{\"sw_version\": \"25.09\", \"uptime\": 15967, \"openstack_control\": false, \"openstack_compute\": true, \"avail_status\": \"available\", \"nfvi_data\": {\"subfunction_oper\": \"n/a\", \"uuid\": \"3bc1506f-3375-4204-8319-269b2b00ab58\", \"subfunctions\": \"worker\", \"avail_status\": \"available\", \"subfunction_avail\": \"n/a\", \"name\": \"compute-0\", \"subfunction_name\": \"n/a\", \"admin_state\": \"unlocked\", \"data_ports_avail\": \"n/a\", \"oper_state\": \"enabled\", \"data_ports_oper\": \"n/a\", \"data_ports_name\": \"n/a\", \"personality\": \"worker\"}, \"name\": \"compute-0\", \"oper_state\": \"enabled\", \"remote_storage\": false, \"action\": \"unlock\", \"admin_state\": \"unlocked\", \"personality\": \"worker\", \"uuid\": \"3bc1506f-3375-4204-8319-269b2b00ab58\"}", "state": "enabled", "upgrade_inprogress": false, "action": "", "elapsed_time_in_state": "11671", "personality": "worker"}, {"uptime": "15963", "uuid": "97ba87d6-27d4-4daa-9ca1-40b580e3d5b7", "recover_instances": true, "host_services_locked": false, "name": "compute-1", "nfvi_host_data": "{\"sw_version\": \"25.09\", \"uptime\": 15963, \"openstack_control\": false, \"openstack_compute\": true, \"avail_status\": \"available\", \"nfvi_data\": {\"subfunction_oper\": \"n/a\", \"uuid\": \"97ba87d6-27d4-4daa-9ca1-40b580e3d5b7\", \"subfunctions\": \"worker\", \"avail_status\": \"available\", \"subfunction_avail\": \"n/a\", \"name\": \"compute-1\", \"subfunction_name\": \"n/a\", \"admin_state\": \"unlocked\", \"data_ports_avail\": \"n/a\", \"oper_state\": \"enabled\", \"data_ports_oper\": \"n/a\", \"data_ports_name\": \"n/a\", \"personality\": \"worker\"}, \"name\": \"compute-1\", \"oper_state\": \"enabled\", \"remote_storage\": false, \"action\": \"unlock\", \"admin_state\": \"unlocked\", \"personality\": \"worker\", \"uuid\": \"97ba87d6-27d4-4daa-9ca1-40b580e3d5b7\"}", "state": "enabled", "upgrade_inprogress": false, "action": "", "elapsed_time_in_state": "11672", "personality": "worker"}], "instance_types_v5": [{"mem_mb": 512, "live_migration_max_downtime": null, "uuid": "2fa093ba-f9fc-4a73-b7a4-32b155eebf39", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "m1.tiny"}, {"mem_mb": 2048, "live_migration_max_downtime": null, "uuid": "962d3c7b-d8cd-4bdd-9807-62ee58387c9a", "disk_gb": 20, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "m1.small"}, {"mem_mb": 8192, "live_migration_max_downtime": null, "uuid": "cbe77f5f-4ec6-45f5-be58-a3e6085bcac9", "disk_gb": 80, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 4, "have_details": true, "live_migration_timeout": null, "name": "m1.large"}, {"mem_mb": 16384, "live_migration_max_downtime": null, "uuid": "de4bce8d-be10-42eb-b706-2fdae7c96ed8", "disk_gb": 160, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 8, "have_details": true, "live_migration_timeout": null, "name": "m1.xlarge"}, {"mem_mb": 4096, "live_migration_max_downtime": null, "uuid": "e2e2d2f7-15a4-4c6a-a016-aa96a1c6807b", "disk_gb": 40, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "m1.medium"}, {"mem_mb": 128, "live_migration_max_downtime": null, "uuid": "1dbc5262-1671-48b8-9473-6033dfd7fe21", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 1, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "medium_swap"}, {"mem_mb": 64, "live_migration_max_downtime": null, "uuid": "36ef7356-c794-4d74-b2dd-b9b336e6b256", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "small"}, {"mem_mb": 64, "live_migration_max_downtime": null, "uuid": "56c244d2-8430-40d0-b7be-9a7a3a454805", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 1, "swap_gb": 1, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "small_ephemeral_swap"}, {"mem_mb": 128, "live_migration_max_downtime": null, "uuid": "5d049d11-a990-4a40-865f-d9ea3bb1bddc", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 1, "swap_gb": 0, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "medium_ephemeral"}, {"mem_mb": 64, "live_migration_max_downtime": null, "uuid": "ad83e761-ce7e-4e6c-ae49-93d8fc07348b", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 1, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "small_swap"}, {"mem_mb": 64, "live_migration_max_downtime": null, "uuid": "b0b2a3a9-126f-4759-8c8b-f95f0dd8e83f", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 1, "swap_gb": 0, "vcpus": 1, "have_details": true, "live_migration_timeout": null, "name": "small_ephemeral"}, {"mem_mb": 128, "live_migration_max_downtime": null, "uuid": "fabfbe43-69ed-458e-9b42-fe3420457d59", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 1, "swap_gb": 1, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "medium_ephemeral_swap"}, {"mem_mb": 128, "live_migration_max_downtime": null, "uuid": "fe00e091-fd6e-4d8e-81e0-ee0ead80b032", "disk_gb": 1, "guest_services": "{}", "auto_recovery": null, "ephemeral_gb": 0, "swap_gb": 0, "vcpus": 2, "have_details": true, "live_migration_timeout": null, "name": "medium"}], "host_aggregates": [], "hosts_v5": [], "volume_snapshots": [], "volumes_v1": [{"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"yes\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"cirros\", \"action\": \"\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"uuid\": \"7a57b69c-3b55-4537-8cc8-c97beb75471a\"}", "bootable": "yes", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "cirros", "action": "", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "uuid": "7a57b69c-3b55-4537-8cc8-c97beb75471a"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"no\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"empty_volume\", \"action\": \"\", \"image_uuid\": null, \"uuid\": \"f81227f6-a8b9-459e-b195-97ede3ddb71a\"}", "bootable": "no", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "empty_volume", "action": "", "image_uuid": null, "uuid": "f81227f6-a8b9-459e-b195-97ede3ddb71a"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"yes\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"cirros-ephemeral-swap\", \"action\": \"\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"uuid\": \"a547de3f-b504-4917-bc9f-48242e9a1d79\"}", "bootable": "yes", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "cirros-ephemeral-swap", "action": "", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "uuid": "a547de3f-b504-4917-bc9f-48242e9a1d79"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"yes\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"cirros-swap\", \"action\": \"\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"uuid\": \"1a002e19-52b2-4e3d-bfbb-b8eba2f14930\"}", "bootable": "yes", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "cirros-swap", "action": "", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "uuid": "1a002e19-52b2-4e3d-bfbb-b8eba2f14930"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"yes\", \"encrypted\": \"no\", \"avail_status\": [\"in-use\"], \"name\": \"cirros-ephemeral\", \"action\": \"\", \"image_uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"uuid\": \"1fccdb35-55ce-468e-a034-3f4d449dbb43\"}", "bootable": "yes", "encrypted": "no", "avail_status": "[\"in-use\"]", "name": "cirros-ephemeral", "action": "", "image_uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "uuid": "1fccdb35-55ce-468e-a034-3f4d449dbb43"}, {"size_gb": 1, "description": "", "nfvi_volume_data": "{\"size_gb\": 1, \"description\": \"\", \"bootable\": \"no\", \"encrypted\": \"no\", \"avail_status\": [\"available\"], \"name\": \"image-fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\", \"action\": \"\", \"image_uuid\": null, \"uuid\": \"baf68b4a-f108-476c-8df5-325591054132\"}", "bootable": "no", "encrypted": "no", "avail_status": "[\"available\"]", "name": "image-fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d", "action": "", "image_uuid": null, "uuid": "baf68b4a-f108-476c-8df5-325591054132"}], "instance_types_v4": [], "service_hosts": [], "instance_groups": [], "systems": [{"name": "8b37cd27-dd14-43e8-b8aa-6977758dca0e", "description": ""}], "host_groups": [], "sw_updates": [], "images": [{"properties": "{\"hw_wrs_live_migration_timeout\": null, \"hw_wrs_live_migration_max_downtime\": null}", "description": "", "container_format": "bare", "avail_status": "[\"available\"]", "disk_format": "qcow2", "visibility": "public", "name": "cirros", "min_disk_size_gb": 0, "protected": "no", "nfvi_image_data": "{\"description\": \"\", \"name\": \"cirros\", \"container_format\": \"bare\", \"min_memory_size_mb\": 0, \"disk_format\": \"qcow2\", \"visibility\": \"public\", \"properties\": {\"hw_wrs_live_migration_timeout\": null, \"hw_wrs_live_migration_max_downtime\": null}, \"min_disk_size_gb\": 0, \"protected\": \"no\", \"action\": \"\", \"avail_status\": [\"available\"], \"uuid\": \"fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d\"}", "action": "", "min_memory_size_mb": 0, "uuid": "fe42cee6-c2d5-478f-a8e2-d5f9c540ab7d"}], "tenants": [{"description": "Bootstrap project for initializing the cloud.", "enabled": "1", "uuid": "1ea3514a-9311-4153-b109-9397b7d038c6", "name": "admin"}, {"description": "", "enabled": "1", "uuid": "66d84487-4cab-4bb5-94fd-de6170aed20c", "name": "internal_cinder"}, {"description": "Service Project for RegionOne/service", "enabled": "1", "uuid": "f1dcf022-82b9-4e7a-9376-f01b05276ff2", "name": "service"}], "networks": [{"is_shared": true, "segmentation_id": "500", "avail_status": "[]", "physical_network": "physnet1", "name": "external", "oper_state": "enabled", "admin_state": "unlocked", "mtu": 1500, "network_type": "vlan", "uuid": "78b76f2e-4e34-4534-a991-d946acb439f5"}, {"is_shared": true, "segmentation_id": "400", "avail_status": "[]", "physical_network": "physnet0", "name": "internal", "oper_state": "enabled", "admin_state": "unlocked", "mtu": 1500, "network_type": "vlan", "uuid": "b9ac0c6a-105a-45b2-834b-e0b751e25d5b"}]}, "version": 1} \ No newline at end of file diff --git a/nfv/nfv-tests/nfv_unit_tests/tests/sw_update_testcase.py b/nfv/nfv-tests/nfv_unit_tests/tests/sw_update_testcase.py index 64db9781..2130eea8 100755 --- a/nfv/nfv-tests/nfv_unit_tests/tests/sw_update_testcase.py +++ b/nfv/nfv-tests/nfv_unit_tests/tests/sw_update_testcase.py @@ -285,8 +285,7 @@ class SwUpdateStrategyTestCase(testcase.NFVTestCase): admin_state=nfvi.objects.v1.HOST_ADMIN_STATE.UNLOCKED, oper_state=nfvi.objects.v1.HOST_OPER_STATE.ENABLED, avail_status=nfvi.objects.v1.HOST_AVAIL_STATUS.AVAILABLE, - software_load='12.01', - target_load='12.01', + sw_version='12.01', openstack_installed=True): """ Create a host @@ -321,8 +320,7 @@ class SwUpdateStrategyTestCase(testcase.NFVTestCase): oper_state=oper_state, avail_status=avail_status, action=nfvi.objects.v1.HOST_ACTION.NONE, - software_load=software_load, - target_load=target_load, + sw_version=sw_version, openstack_compute=openstack_compute, openstack_control=openstack_control, remote_storage=False, diff --git a/nfv/nfv-tests/nfv_unit_tests/tests/test_database_upgrades.py b/nfv/nfv-tests/nfv_unit_tests/tests/test_database_upgrades.py index 225a0e07..05db2e67 100755 --- a/nfv/nfv-tests/nfv_unit_tests/tests/test_database_upgrades.py +++ b/nfv/nfv-tests/nfv_unit_tests/tests/test_database_upgrades.py @@ -34,22 +34,22 @@ class TestNFVDatabaseUpgrade(testcase.NFVTestCase): config = dict() config['database_dir'] = self.db_dir database.database_initialize(config) - data_input = "%s/nfv_vim_db_stx_19.12" % root_dir - data_output = "%s/nfv_vim_db_stx_19.12.dump" % root_dir + data_input = "%s/nfv_vim_db_stx_25.09" % root_dir + data_output = "%s/nfv_vim_db_stx_25.09.dump" % root_dir database.database_load_data(data_input) database.database_dump_data(data_output) database.database_finalize() - def test_nfv_vim_database_upgrade_from_19_12(self): + def test_nfv_vim_database_upgrade_from_25_09(self): """ - Test VIM database upgrades from stx 19_12 + Test VIM database upgrades from stx 25_09 """ root_dir = os.environ['VIRTUAL_ENV'] # stage some old data devnull = open(os.devnull, 'w') try: vim_cmd = ("nfv-vim-manage db-load-data -d %s " - "-f %s/nfv_vim_db_stx_19.12" % (self.db_dir, root_dir)) + "-f %s/nfv_vim_db_stx_25.09" % (self.db_dir, root_dir)) subprocess.check_call([vim_cmd], shell=True, stderr=devnull) except subprocess.CalledProcessError: diff --git a/nfv/nfv-tests/nfv_unit_tests/tests/test_instance.py b/nfv/nfv-tests/nfv_unit_tests/tests/test_instance.py index 90b97951..7a7fed33 100755 --- a/nfv/nfv-tests/nfv_unit_tests/tests/test_instance.py +++ b/nfv/nfv-tests/nfv_unit_tests/tests/test_instance.py @@ -188,8 +188,7 @@ class TestInstance(testcase.NFVTestCase): def create_host(self, host_name, cpe=False, admin_state=nfvi.objects.v1.HOST_ADMIN_STATE.UNLOCKED, - software_load='12.01', - target_load='12.01'): + sw_version='12.01'): """ Create a host """ @@ -213,8 +212,7 @@ class TestInstance(testcase.NFVTestCase): oper_state=nfvi.objects.v1.HOST_OPER_STATE.ENABLED, avail_status=nfvi.objects.v1.HOST_AVAIL_STATUS.AVAILABLE, action=nfvi.objects.v1.HOST_ACTION.NONE, - software_load=software_load, - target_load=target_load, + sw_version=sw_version, openstack_compute=False, openstack_control=False, remote_storage=False, diff --git a/nfv/nfv-vim/nfv_vim/database/_database_infrastructure_module.py b/nfv/nfv-vim/nfv_vim/database/_database_infrastructure_module.py index e643a5cc..a29fd765 100755 --- a/nfv/nfv-vim/nfv_vim/database/_database_infrastructure_module.py +++ b/nfv/nfv-vim/nfv_vim/database/_database_infrastructure_module.py @@ -64,10 +64,10 @@ def database_host_add(host_obj): """ db = database_get() session = db.session() - query = session.query(model.Host_v7).filter(model.Host_v7.name == host_obj.name) + query = session.query(model.Host_v8).filter(model.Host_v8.name == host_obj.name) host = query.first() if not host: - host = model.Host_v7() + host = model.Host_v8() host.uuid = host_obj.uuid host.name = host_obj.name host.personality = host_obj.personality @@ -98,8 +98,8 @@ def database_host_delete(host_name): """ db = database_get() session = db.session() - query = session.query(model.Host_v7) - query.filter(model.Host_v7.name == host_name).delete() + query = session.query(model.Host_v8) + query.filter(model.Host_v8.name == host_name).delete() session.commit() @@ -109,7 +109,7 @@ def database_host_get_list(): """ db = database_get() session = db.session() - query = session.query(model.Host_v7) + query = session.query(model.Host_v8) host_objs = list() for host in query.all(): @@ -122,8 +122,7 @@ def database_host_get_list(): nfvi_host_data['avail_status'], nfvi_host_data['action'], nfvi_host_data['uptime'], - nfvi_host_data['software_load'], - nfvi_host_data['target_load'], + nfvi_host_data['sw_version'], nfvi_host_data['device_image_update'], nfvi_host_data['openstack_compute'], nfvi_host_data['openstack_control'], diff --git a/nfv/nfv-vim/nfv_vim/database/_database_migrate.py b/nfv/nfv-vim/nfv_vim/database/_database_migrate.py index b06df3a7..d9a9627c 100755 --- a/nfv/nfv-vim/nfv_vim/database/_database_migrate.py +++ b/nfv/nfv-vim/nfv_vim/database/_database_migrate.py @@ -12,6 +12,22 @@ from nfv_common import debug DLOG = debug.debug_get_logger('nfv_vim.database') +def _migrate_hosts_v7_to_v8(session, hosts_v7, hosts_v8): + """ + Replace software_load, target_load with sw_version + """ + if 0 == len(hosts_v8): + for host_v7 in hosts_v7: + host_v8 = model.Host_v8() + host_v8.data = host_v7.data + nfvi_host_data = json.loads(host_v7.nfvi_host_data) + nfvi_host_data['sw_version'] = None + nfvi_host_data.pop('software_load', None) + nfvi_host_data.pop('target_load', None) + host_v8.nfvi_host_data = json.dumps(nfvi_host_data) + session.add(host_v8) + + def _migrate_hosts_v6_to_v7(session, hosts_v6, hosts_v7): """ Migrate host_v6 table to host_v7 table @@ -37,3 +53,10 @@ def migrate_tables(session, table_names): hosts_v7 = hosts_v7_query.all() _migrate_hosts_v6_to_v7(session, hosts_v6, hosts_v7) hosts_v6_query.delete() + if 'hosts_v7' in table_names and 'hosts_v8' in table_names: + hosts_v7_query = session.query(model.Host_v7) + hosts_v7 = hosts_v7_query.all() + hosts_v8_query = session.query(model.Host_v8) + hosts_v8 = hosts_v8_query.all() + _migrate_hosts_v7_to_v8(session, hosts_v7, hosts_v8) + hosts_v7_query.delete() diff --git a/nfv/nfv-vim/nfv_vim/database/model/__init__.py b/nfv/nfv-vim/nfv_vim/database/model/__init__.py index 315a7401..a389b832 100755 --- a/nfv/nfv-vim/nfv_vim/database/model/__init__.py +++ b/nfv/nfv-vim/nfv_vim/database/model/__init__.py @@ -7,6 +7,7 @@ from nfv_vim.database.model._base import Base # noqa: F401 from nfv_vim.database.model._base import lookup_class_by_table # noqa: F401 from nfv_vim.database.model._host import Host_v6 # noqa: F401 from nfv_vim.database.model._host import Host_v7 # noqa: F401 +from nfv_vim.database.model._host import Host_v8 # noqa: F401 from nfv_vim.database.model._host_aggregate import HostAggregate # noqa: F401 from nfv_vim.database.model._host_group import HostGroup # noqa: F401 from nfv_vim.database.model._hypervisor import Hypervisor # noqa: F401 diff --git a/nfv/nfv-vim/nfv_vim/database/model/_host.py b/nfv/nfv-vim/nfv_vim/database/model/_host.py index 02237a3c..b14d407c 100755 --- a/nfv/nfv-vim/nfv_vim/database/model/_host.py +++ b/nfv/nfv-vim/nfv_vim/database/model/_host.py @@ -11,6 +11,31 @@ from nfv_vim.database.model._base import AsDictMixin from nfv_vim.database.model._base import Base +class Host_v8(AsDictMixin, Base): + """ + Host Database Table Entry + Note: Changes are only in nfvi_host_data to replace software_load and target_load with sw_version. + """ + __tablename__ = 'hosts_v8' + + uuid = Column(String(64), nullable=False, primary_key=True) + name = Column(String(64), nullable=False) + personality = Column(String(64), nullable=False) + state = Column(String(64), nullable=False) + action = Column(String(64), nullable=False) + upgrade_inprogress = Column(Boolean, nullable=False) + recover_instances = Column(Boolean, nullable=False) + uptime = Column(String(64), nullable=False) + elapsed_time_in_state = Column(String(64), nullable=False) + host_services_locked = Column(Boolean, nullable=False) + nfvi_host_data = Column(String(2048), nullable=False) + + def __repr__(self): + return "" % (self.uuid, self.name, + self.personality, self.state, + self.action, self.uptime) + + class Host_v7(AsDictMixin, Base): """ Host Database Table Entry diff --git a/nfv/nfv-vim/nfv_vim/nfvi/objects/v1/_host.py b/nfv/nfv-vim/nfv_vim/nfvi/objects/v1/_host.py index f3630c39..cd37ed31 100755 --- a/nfv/nfv-vim/nfv_vim/nfvi/objects/v1/_host.py +++ b/nfv/nfv-vim/nfv_vim/nfvi/objects/v1/_host.py @@ -106,7 +106,7 @@ class Host(ObjectData): NFVI Host Object """ def __init__(self, uuid, name, personality, admin_state, oper_state, - avail_status, action, uptime, software_load, target_load, + avail_status, action, uptime, sw_version, device_image_update=None, openstack_compute=False, openstack_control=False, @@ -119,8 +119,7 @@ class Host(ObjectData): avail_status=avail_status, action=action, uptime=uptime, - software_load=software_load, - target_load=target_load, + sw_version=sw_version, device_image_update=device_image_update, openstack_compute=openstack_compute, openstack_control=openstack_control, diff --git a/nfv/nfv-vim/nfv_vim/objects/_host.py b/nfv/nfv-vim/nfv_vim/objects/_host.py index fafcc6a9..479208fa 100755 --- a/nfv/nfv-vim/nfv_vim/objects/_host.py +++ b/nfv/nfv-vim/nfv_vim/objects/_host.py @@ -274,18 +274,11 @@ class Host(ObjectData): return self._upgrade_inprogress @property - def software_load(self): + def sw_version(self): """ - Returns software_load running on this host + Returns sw_version running on this host """ - return self._nfvi_host.software_load - - @property - def target_load(self): - """ - Returns target_load for this host - """ - return self._nfvi_host.target_load + return self._nfvi_host.sw_version @property def openstack_compute(self): diff --git a/nfv/tox.ini b/nfv/tox.ini index 4fd3aa23..b66cb97a 100644 --- a/nfv/tox.ini +++ b/nfv/tox.ini @@ -133,7 +133,7 @@ deps = {[nfv]deps} stestr testtools setenv = PYTHONDONTWRITEBYTECODE=True -commands = cp -v {[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_19.12 {envdir}/ +commands = cp -v {[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_25.09 {envdir}/ stestr --test-path={[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/tests run '{posargs}' stestr slowest @@ -147,7 +147,7 @@ deps = {[nfv]deps} setenv = PYTHON=coverage run --parallel-mode PYTHONDONTWRITEBYTECODE=True -commands = cp -v {[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_19.12 {envdir}/ +commands = cp -v {[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_25.09 {envdir}/ coverage erase stestr --test-path={[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/tests run '{posargs}' coverage combine