blob: e216919016dcd1a7ab3cefb21bd5460f76e13946 [file] [log] [blame]
# 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:9292'
methods:
- name: 'image_list'
url: ['GET', 'v2/images']
outputs:
image_id: {'json_extract': 'lambda x: [i["id"] for i in x["images"]]', '_type': 'resource'}
- name: 'image_create'
url: ['POST', 'v2/images']
inputs:
name: {'_type': 'string'}
image_id: {'_type': 'resource'}
visibility: {'_type': 'visibility'}
container_format: {'_type': 'container_format'}
disk_format: {'_type': 'disk_format'}
min_disk: {'_type': 'integer'}
min_ram: {'_type': 'integer'}
#protected: {'_type': 'bool'}
properties: {'_type': 'dict'}
tags: {'_type': 'dict'}
outputs:
image_id: {'json_extract': 'lambda x: x["id"]', '_type': 'resource'}
- name: 'image_update'
url: ['PATH', 'v2/images/%(image_id)s']
inputs:
url_input:
image_id: {'_type', 'resource', 'required': 'True'}
path: {'_type': 'string'}
value: {'_type': 'string'}
op: {'_type': 'patch_operation'}
url: {'_type': 'string'}
metadata: {'_type': 'dict'}
- name: 'image_deactivate'
url: ['POST', 'v2/images/%(image_id)s/actions/deactivate']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
- name: 'image_reactivaate'
url: ['POST', 'v2/images/%(image_id)s/actions/reactivate']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
- name: 'image_delete'
url: ['DELETE', 'v2/images/%(image_id)s']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
- name: 'image_put_data'
url: ['PUT', 'v2/images/%(image_id)s/file']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
raw_data: {'_type': 'string'}
- name: 'image_tag_add'
url: ['PUT', 'v2/images/%(image_id)s/tags/%(tag_id)s']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
tag_id: {'_type': 'string', 'required': 'True'}
- name: 'image_tag_delete'
url: ['DELETE', 'v2/images/%(image_id)s/tags/%(tag_id)s']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
tag_id: {'_type': 'string', 'required': 'True'}
- name: 'image_member_create'
url: ['POST', 'v2/images/%(image_id)s/members']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
member: {'_type': 'resource', 'resource_name': 'tenant_id'}
- name: 'image_members_list'
url: ['GET', 'v2/images/%(image_id)s/members']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
outputs:
tenant_id: {'_type': 'resource', 'json_extract': 'lambda x: [i["member_id"] for i in x["members"]]'}
- name: 'image_member_delete'
url: ['DELETE', 'v2/images/%(image_id)s/members/%(tenant_id)s']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
tenant_id: {'_type': 'resource', 'required': 'True'}
- name: 'image_member_update'
url: ['PUT', 'v2/images/%(image_id)s/members/%(tenant_id)s']
inputs:
url_input:
image_id: {'_type': 'resource', 'required': 'True'}
tenant_id: {'_type': 'resource', 'required': 'True'}
status: {'_type': 'image_status'}
- name: 'image_resource_type_create'
url: ['POST', 'v2/metadefs/namespaces/%(namespace)s/resource_types']
inputs:
url_input:
namespace: {'_type': 'string', 'required': 'True'}
name: {'_type': 'string', 'required': 'True'}
prefix: {'_type': 'string'}
properties_target: {'_type': 'string'}
- name: 'image_namespace_create'
url: ['POST', 'v2/metadefs/namespaces']
inputs:
namespace: {'_type': 'string', 'required': 'True'}
display_name: {'_type': 'string'}
description: {'_type': 'string'}
visibility: {'_type': 'visibility'}
#protected: {'_type': 'bool'}
properties: {'_type': 'dict'}
objects: {'_type': 'dict'}
resource_type_associations : {'_type': 'dict'}
- name: 'image_task_create'
url: ['POST', 'v2/tasks']
# - name: 'image_task_list'
# url: ['GET', 'v2/tasks']
# outputs:
# task_id: {'_type': 'resource', 'json_extract': 'lambda x: [i["id"] for i in x["tasks"]]'}