| # Copyright 2015 Red Hat |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| # not use this file except in compliance with the License. You may obtain |
| # a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations |
| # under the License. |
| |
| base_url: 'http://127.0.0.1:8776' |
| |
| methods: |
| - name: 'volume_create' |
| url: ['POST', 'v2/%(tenant_id)s/volumes'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume: |
| availability_zone: {'_type': 'string'} |
| source_volid: {'_type': 'resource', 'resource_name': 'volume_id'} |
| description: {'_type': 'string'} |
| snapshot_id: {'_type': 'resource'} |
| size: {'_type': 'byte', 'required': 'True'} |
| name: {'_type': 'string'} |
| imageRef: {'_type': 'resource', 'resource_name': 'image_id'} |
| volume_type: {'_type': 'string'} |
| metadata: {'_type': 'string'} |
| outputs: |
| volume_id: {'json_extract': 'lambda x: x["volume"]["id"]', '_type': 'resource'} |
| snapshot_id: {'json_extract': 'lambda x: x["volume"]["snapshot_id"]', '_type': 'resource'} |
| |
| - name: 'volume_list' |
| url: ['GET', 'v2/%(tenant_id)s/volumes'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| sort: {'_type': 'string'} |
| limit: {'_type': 'integer'} |
| marker: {'_type': 'string'} |
| outputs: |
| volume_id: {'json_extract': 'lambda x: [i["id"] for i in x["volumes"]]', '_type': 'resource'} |
| |
| - name: 'volume_update' |
| url: ['PUT', 'v2/%(tenant_id)s/volumes/%(volume_id)s'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_id: {'_type': 'resource', 'required': 'True'} |
| |
| - name: 'volume_delete' |
| url: ['DELETE', 'v2/%(tenant_id)s/volumes/%(volume_id)s'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_id: {'_type': 'resource', 'required': 'True'} |
| |
| |
| - name: 'volume_extend' |
| url: ['POST', 'v2/%(tenant_id)s/volumes/%(volume_id)s/action'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_id: {'_type': 'resource', 'required': 'True'} |
| os-extend: |
| new_size: {'_type': 'byte'} |
| |
| - name: 'volume_reset_status' |
| url: ['POST', 'v2/%(tenant_id)s/volumes/%(volume_id)s/action'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_id: {'_type': 'resource', 'required': 'True'} |
| os-reset_status: |
| status: {'_type': 'volume_status'} |
| attach_status: {'_type': 'string'} |
| migration_status: {'_type': 'string'} |
| |
| - name: 'volume_image_metadata' |
| url: ['POST', 'v2/%(tenant_id)s/volumes/%(volume_id)s/action'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_id: {'_type': 'resource', 'required': 'True'} |
| os-set_image_metadata: |
| metadata: |
| image_id: {'_type': 'resource'} |
| image_name: {'_type': 'string'} |
| kernel_id: {'_type': 'string'} |
| ramdisk_id: {'_type': 'string'} |
| |
| - name: 'volume_image_remove_metadata' |
| url: ['POST', 'v2/%(tenant_id)s/volumes/%(volume_id)s/action'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_id: {'_type': 'resource', 'required': 'True'} |
| os-unset_image_metadata: |
| key: {'_type': 'string'} |
| |
| - name: 'volume_types_list' |
| url: ['GET', 'v2/%(tenant_id)s/types'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| outputs: |
| volume_type_id: {'_type': 'resource', 'json_extract': 'lambda x: [i["id"] for i in x["volume_types"]]'} |
| |
| - name: 'volume_types_create' |
| url: ['POST', 'v2/%(tenant_id)s/types'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_type: |
| name: {'_type': 'string'} |
| extra_specs: {'_type': 'dict'} |
| outputs: |
| volume_type_id: {'_type': 'resource', 'json_extract': 'lambda x: x["volume_type"]["id"]'} |
| |
| - name: 'volume_types_update' |
| url: ['PUT', 'v2/%(tenant_id)s/types/%(volume_type_id)s'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_type_id: {'_type': 'resource', 'required': 'True'} |
| volume_type: |
| name: {'_type': 'string'} |
| extra_specs: {'_type': 'dict'} |
| |
| - name: 'volume_types_delete' |
| url: ['DELETE', 'v2/%(tenant_id)s/types/%(volume_type_id)s'] |
| inputs: |
| url_input: |
| tenant_id: {'_type': 'resource', 'required': 'True'} |
| volume_type_id: {'_type': 'resource', 'required': 'True'} |