From b01676c41859a40568d81f846e25ff88818cc27d Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 8 Aug 2019 10:40:14 +0100 Subject: [PATCH] Remove 'hw:cpu_policy', 'hw:mem_page_size' extra specs from API samples In a future change, the use of 'hw:cpu_policy' will require a host to report PCPU inventory. Rather than modify the fake driver used in these tests to report such inventory, just use a different extra spec, 'hw:numa_nodes'. This has the added bonus of being supported by both the libvirt and Hyper-V virt drivers, unlike 'hw:cpu_policy' and 'hw:mem_page_size', which are only supported by the libvirt virt driver. Change-Id: Id203dc07f08557b1b094ec72e1df3493ec9524b1 Signed-off-by: Stephen Finucane --- api-guide/source/down_cells.rst | 6 ++---- doc/api_samples/flavors/v2.61/flavors-detail-resp.json | 3 +-- doc/api_samples/flavors/v2.75/flavors-detail-resp.json | 3 +-- doc/api_samples/servers/v2.47/server-get-resp.json | 3 +-- doc/api_samples/servers/v2.47/servers-details-resp.json | 3 +-- .../servers/v2.63/server-action-rebuild-resp.json | 3 +-- doc/api_samples/servers/v2.63/server-get-resp.json | 3 +-- doc/api_samples/servers/v2.63/server-update-resp.json | 3 +-- doc/api_samples/servers/v2.63/servers-details-resp.json | 3 +-- .../servers/v2.66/servers-details-with-changes-before.json | 3 +-- nova/tests/fixtures.py | 3 +-- .../api_samples/flavors/v2.61/flavors-detail-resp.json.tpl | 3 +-- .../api_samples/flavors/v2.75/flavors-detail-resp.json.tpl | 3 +-- .../api_samples/servers/v2.47/server-get-resp.json.tpl | 3 +-- .../api_samples/servers/v2.47/servers-details-resp.json.tpl | 3 +-- .../servers/v2.63/server-action-rebuild-resp.json.tpl | 3 +-- .../api_samples/servers/v2.63/server-get-resp.json.tpl | 3 +-- .../api_samples/servers/v2.63/server-update-resp.json.tpl | 3 +-- .../api_samples/servers/v2.63/servers-details-resp.json.tpl | 3 +-- .../v2.66/servers-details-with-changes-before.json.tpl | 3 +-- 20 files changed, 21 insertions(+), 42 deletions(-) diff --git a/api-guide/source/down_cells.rst b/api-guide/source/down_cells.rst index c7bdb83f5d97..d77ad27312af 100644 --- a/api-guide/source/down_cells.rst +++ b/api-guide/source/down_cells.rst @@ -130,8 +130,7 @@ behavior are described below: "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:cpu_policy": "dedicated", - "hw:mem_page_size": "2048" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, @@ -266,8 +265,7 @@ behavior are described below: "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:cpu_policy": "dedicated", - "hw:mem_page_size": "2048" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/doc/api_samples/flavors/v2.61/flavors-detail-resp.json b/doc/api_samples/flavors/v2.61/flavors-detail-resp.json index f615998043f5..980603f8909f 100644 --- a/doc/api_samples/flavors/v2.61/flavors-detail-resp.json +++ b/doc/api_samples/flavors/v2.61/flavors-detail-resp.json @@ -143,8 +143,7 @@ "rxtx_factor": 1.0, "description": null, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" } }, { diff --git a/doc/api_samples/flavors/v2.75/flavors-detail-resp.json b/doc/api_samples/flavors/v2.75/flavors-detail-resp.json index 58ca0e44badc..7adc9084dff3 100644 --- a/doc/api_samples/flavors/v2.75/flavors-detail-resp.json +++ b/doc/api_samples/flavors/v2.75/flavors-detail-resp.json @@ -143,8 +143,7 @@ "rxtx_factor": 1.0, "description": null, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" } }, { diff --git a/doc/api_samples/servers/v2.47/server-get-resp.json b/doc/api_samples/servers/v2.47/server-get-resp.json index e7d39431cde3..406b6d41aa8e 100644 --- a/doc/api_samples/servers/v2.47/server-get-resp.json +++ b/doc/api_samples/servers/v2.47/server-get-resp.json @@ -36,8 +36,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/doc/api_samples/servers/v2.47/servers-details-resp.json b/doc/api_samples/servers/v2.47/servers-details-resp.json index 626a0f7d72eb..6c6c2804be33 100644 --- a/doc/api_samples/servers/v2.47/servers-details-resp.json +++ b/doc/api_samples/servers/v2.47/servers-details-resp.json @@ -37,8 +37,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/doc/api_samples/servers/v2.63/server-action-rebuild-resp.json b/doc/api_samples/servers/v2.63/server-action-rebuild-resp.json index 546e7cb8bb41..e1db18192a1f 100644 --- a/doc/api_samples/servers/v2.63/server-action-rebuild-resp.json +++ b/doc/api_samples/servers/v2.63/server-action-rebuild-resp.json @@ -17,8 +17,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:cpu_policy": "dedicated", - "hw:mem_page_size": "2048" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/doc/api_samples/servers/v2.63/server-get-resp.json b/doc/api_samples/servers/v2.63/server-get-resp.json index c644f70a85cf..82c3b9bcf2c0 100644 --- a/doc/api_samples/servers/v2.63/server-get-resp.json +++ b/doc/api_samples/servers/v2.63/server-get-resp.json @@ -36,8 +36,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:cpu_policy": "dedicated", - "hw:mem_page_size": "2048" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/doc/api_samples/servers/v2.63/server-update-resp.json b/doc/api_samples/servers/v2.63/server-update-resp.json index 5a47c0c7cea7..9f2bbe6728b6 100644 --- a/doc/api_samples/servers/v2.63/server-update-resp.json +++ b/doc/api_samples/servers/v2.63/server-update-resp.json @@ -17,8 +17,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:cpu_policy": "dedicated", - "hw:mem_page_size": "2048" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/doc/api_samples/servers/v2.63/servers-details-resp.json b/doc/api_samples/servers/v2.63/servers-details-resp.json index 3810f0f19f4b..089a07ff02cc 100644 --- a/doc/api_samples/servers/v2.63/servers-details-resp.json +++ b/doc/api_samples/servers/v2.63/servers-details-resp.json @@ -37,8 +37,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:cpu_policy": "dedicated", - "hw:mem_page_size": "2048" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/doc/api_samples/servers/v2.66/servers-details-with-changes-before.json b/doc/api_samples/servers/v2.66/servers-details-with-changes-before.json index 9d3305228809..1f3c91460e1c 100644 --- a/doc/api_samples/servers/v2.66/servers-details-with-changes-before.json +++ b/doc/api_samples/servers/v2.66/servers-details-with-changes-before.json @@ -37,8 +37,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:cpu_policy": "dedicated", - "hw:mem_page_size": "2048" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/nova/tests/fixtures.py b/nova/tests/fixtures.py index bee0ed04b8f0..a53884129246 100644 --- a/nova/tests/fixtures.py +++ b/nova/tests/fixtures.py @@ -739,8 +739,7 @@ class DefaultFlavorsFixture(fixtures.Fixture): defaults = {'rxtx_factor': 1.0, 'disabled': False, 'is_public': True, 'ephemeral_gb': 0, 'swap': 0} extra_specs = { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" } default_flavors = [ objects.Flavor(context=ctxt, memory_mb=512, vcpus=1, diff --git a/nova/tests/functional/api_sample_tests/api_samples/flavors/v2.61/flavors-detail-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/flavors/v2.61/flavors-detail-resp.json.tpl index efc74ae6f13a..23bfdf27e531 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/flavors/v2.61/flavors-detail-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/flavors/v2.61/flavors-detail-resp.json.tpl @@ -143,8 +143,7 @@ "rxtx_factor": 1.0, "description": null, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" } }, { diff --git a/nova/tests/functional/api_sample_tests/api_samples/flavors/v2.75/flavors-detail-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/flavors/v2.75/flavors-detail-resp.json.tpl index 88bd02e2cc2a..bb4092aebcf6 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/flavors/v2.75/flavors-detail-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/flavors/v2.75/flavors-detail-resp.json.tpl @@ -143,8 +143,7 @@ "rxtx_factor": 1.0, "description": null, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" } }, { diff --git a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.47/server-get-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.47/server-get-resp.json.tpl index 809aa812342a..5568f7ab5e2c 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.47/server-get-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.47/server-get-resp.json.tpl @@ -21,8 +21,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.47/servers-details-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.47/servers-details-resp.json.tpl index 53fe2c90bc9e..cba2f9d102b9 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.47/servers-details-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.47/servers-details-resp.json.tpl @@ -22,8 +22,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-action-rebuild-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-action-rebuild-resp.json.tpl index 7b0b9038ce69..76b93ab7675e 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-action-rebuild-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-action-rebuild-resp.json.tpl @@ -16,8 +16,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-get-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-get-resp.json.tpl index 5dab6aa0e09e..ac6c385ce629 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-get-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-get-resp.json.tpl @@ -21,8 +21,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:cpu_policy": "dedicated", - "hw:mem_page_size": "2048" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-update-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-update-resp.json.tpl index 402222ce2925..d96971c4c46c 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-update-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/server-update-resp.json.tpl @@ -17,8 +17,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/servers-details-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/servers-details-resp.json.tpl index 2a9761633367..a64afc4a346f 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/servers-details-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.63/servers-details-resp.json.tpl @@ -22,8 +22,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512, diff --git a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.66/servers-details-with-changes-before.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.66/servers-details-with-changes-before.json.tpl index 7cfb1ed2efc8..9d42bbd49902 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/servers/v2.66/servers-details-with-changes-before.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/servers/v2.66/servers-details-with-changes-before.json.tpl @@ -22,8 +22,7 @@ "disk": 1, "ephemeral": 0, "extra_specs": { - "hw:mem_page_size": "2048", - "hw:cpu_policy": "dedicated" + "hw:numa_nodes": "1" }, "original_name": "m1.tiny.specs", "ram": 512,