summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-19 09:36:32 +0000
committerGerrit Code Review <review@openstack.org>2017-06-19 09:36:32 +0000
commit3e02460e2ef1a9eeff3fb860a1ff8609a11616a9 (patch)
treeecad470842db1f8bef9b66f0def80c35a8f6f84c
parent3e732d332a26ec168c378714d65280cd77b32b28 (diff)
parent7ba0b7ad5f4302d4501fcf48760d152e3e5b60d3 (diff)
Merge "[placement] Increase test coverage"
-rw-r--r--nova/tests/functional/api/openstack/placement/gabbits/inventory.yaml51
1 files changed, 45 insertions, 6 deletions
diff --git a/nova/tests/functional/api/openstack/placement/gabbits/inventory.yaml b/nova/tests/functional/api/openstack/placement/gabbits/inventory.yaml
index 8080a75..0e59eed 100644
--- a/nova/tests/functional/api/openstack/placement/gabbits/inventory.yaml
+++ b/nova/tests/functional/api/openstack/placement/gabbits/inventory.yaml
@@ -642,18 +642,57 @@ tests:
642 openstack-api-version: placement 1.5 642 openstack-api-version: placement 1.5
643 status: 204 643 status: 204
644 644
645- name: get inventories after deletion
646 GET: /resource_providers/$ENVIRON['RP_UUID']/inventories
647 response_json_paths:
648 $.resource_provider_generation: 7
649 $.inventories: {}
650
651- name: delete empty inventories 645- name: delete empty inventories
652 DELETE: /resource_providers/$ENVIRON['RP_UUID']/inventories 646 DELETE: /resource_providers/$ENVIRON['RP_UUID']/inventories
653 request_headers: 647 request_headers:
654 openstack-api-version: placement 1.5 648 openstack-api-version: placement 1.5
655 status: 204 649 status: 204
656 650
651- name: get inventories after deletions
652 GET: /resource_providers/$ENVIRON['RP_UUID']/inventories
653 response_json_paths:
654 $.resource_provider_generation: 8
655 $.inventories: {}
656
657- name: post an inventory again
658 POST: /resource_providers/$ENVIRON['RP_UUID']/inventories
659 request_headers:
660 content-type: application/json
661 data:
662 resource_class: DISK_GB
663 total: 2048
664 reserved: 512
665 min_unit: 10
666 max_unit: 1024
667 step_size: 10
668 allocation_ratio: 1.0
669 status: 201
670 response_headers:
671 location: $SCHEME://$NETLOC/resource_providers/$ENVIRON['RP_UUID']/inventories/DISK_GB
672 response_json_paths:
673 $.resource_provider_generation: 9
674 $.total: 2048
675 $.reserved: 512
676
677- name: delete all inventory with put
678 PUT: /resource_providers/$ENVIRON['RP_UUID']/inventories
679 request_headers:
680 content-type: application/json
681 openstack-api-version: placement 1.4
682 data:
683 resource_provider_generation: 9
684 inventories: {}
685 response_json_paths:
686 $.resource_provider_generation: 10
687 $.inventories: {}
688 status: 200
689
690- name: get generation after deletion
691 GET: /resource_providers/$ENVIRON['RP_UUID']/inventories
692 response_json_paths:
693 $.resource_provider_generation: 10
694 $.inventories: {}
695
657- name: delete inventories earlier version 696- name: delete inventories earlier version
658 DELETE: /resource_providers/$ENVIRON['RP_UUID']/inventories 697 DELETE: /resource_providers/$ENVIRON['RP_UUID']/inventories
659 request_headers: 698 request_headers: