| # 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:9001' |
| |
| methods: |
| - name: 'zone_list' |
| url: ['GET', 'v2/zones'] |
| outputs: |
| zone_id: {'json_extract': 'lambda x: [i["id"] for i in x["zones"]]', '_type': 'resource'} |
| pool_id: {'json_extract': 'lambda x: [i["pool_id"] for i in x["zones"]]', '_type': 'resource'} |
| domain_name: {'json_extract': 'lambda x: [i["name"] for i in x["zones"]]', '_type': 'resource'} |
| |
| - name: 'zone_create' |
| url: ['POST', 'v2/zones'] |
| inputs: |
| name: {'required': 'True', '_type': 'domain'} |
| email: {'required': 'True', '_type': 'mail'} |
| description: {'_type': 'string'} |
| ttl: {'_type': 'integer'} |
| type: {'_type': 'zone_type'} |
| masters: {'_type': 'list_hostname'} |
| outputs: |
| zone_id: {'json_extract': 'lambda x: x["id"]', '_type': 'resource'} |
| pool_id: {'json_extract': 'lambda x: x["pool_id"]', '_type': 'resource'} |
| domain_name: {'json_extract': 'lambda x: x["name"]', '_type': 'resource'} |
| |
| - name: 'zone_update' |
| url: ['PATCH', 'v2/zones/%(zone_id)s'] |
| inputs: |
| url_input: |
| zone_id: {'required': True, '_type': 'resource'} |
| email: {'required': 'True', '_type': 'mail'} |
| description: {'_type': 'string'} |
| ttl: {'_type': 'integer'} |
| type: {'_type': 'zone_type'} |
| masters: {'_type': 'list_hostname'} |
| |
| - name: 'zone_delete' |
| url: ['DELETE', 'v2/zones/%(zone_id)s'] |
| inputs: |
| url_input: |
| zone_id: {'required': True, '_type': 'resource'} |
| |
| - name: 'zone_transfer_create' |
| url: ['POST', 'v2/zones/%(zone_id)s/tasks/transfer_requests'] |
| inputs: |
| url_input: |
| zone_id: {'required': True, '_type': 'resource'} |
| description: {'_type': 'string'} |
| target_project_id: {'_type': 'resource', 'resource_name': 'tenant_id'} |
| outputs: |
| zone_transfer_id: {'json_extract': 'lambda x: x["id"]', '_type': 'resource'} |
| zone_transfer_key: {'json_extract': 'lambda x: x["key"]', '_type': 'resource'} |
| |
| - name: 'zone_transfer_list' |
| url: ['GET', 'v2/zones/tasks/transfer_requests'] |
| outputs: |
| zone_transfer_id: {'json_extract': 'lambda x: [i["id"] for i in x["transfer_requests"]]', '_type': 'resource'} |
| zone_transfer_key: {'json_extract': 'lambda x: [i["key"] for i in x["transfer_requests"]]', '_type': 'resource'} |
| |
| - name: 'zone_transfer_accept' |
| url: ['POST', 'v2/zones/tasks/transfer_accepts'] |
| inputs: |
| key: {'_type': 'resource', 'resource_name': 'zone_transfer_key'} |
| zone_transfer_request_id: {'_type': 'resource', 'resource_name': 'zone_transfer_id'} |
| |
| |
| - name: 'record_create' |
| url: ['POST', 'v2/zones/%(zone_id)s/recordsets'] |
| inputs: |
| url_input: |
| zone_id: {'required': True, '_type': 'resource'} |
| #name: {'required': 'True', '_type': 'resource', 'resource_name': 'zone_name_id'} |
| description: {'_type': 'string'} |
| records: {'required': 'True', '_type': 'record', 'expand': 'True'} |
| #records: {'required': 'True', '_type': 'list_record'} |
| ttl: {'_type': 'integer'} |
| #type: {'required': 'True', '_type': 'record_type'} |
| outputs: |
| record_id: {'json_extract': 'lambda x: x["id"]', '_type': 'resource'} |
| |
| - name: 'record_update' |
| url: ['PUT', 'v2/zones/%(zone_id)s/recordsets/%(record_id)s'] |
| inputs: |
| url_input: |
| zone_id: {'required': True, '_type': 'resource'} |
| record_id: {'required': True, '_type': 'resource'} |
| #name: {'required': 'True', '_type': 'resource', 'resource_name': 'zone_name_id'} |
| #description: {'_type': 'string'} |
| #records: {'required': 'True', '_type': 'list_record'} |
| #ttl: {'_type': 'integer'} |
| #type: {'_type': 'record_type'} |
| |
| # - name: 'blacklist_create' |
| # url: ['POST', 'v2/blacklists'] |
| # inputs: |
| # description: {'_type': 'string'} |
| # pattern: {'_type': 'regex'} |
| # outputs: |
| # blacklist_id: {'json_extract': 'lambda x: x["id"]', '_type': 'resource'} |
| # |
| # - name: 'blacklist_update' |
| # url: ['PATCH', 'v2/blacklists/%(blacklist_id)s'] |
| # inputs: |
| # url_input: |
| # blacklist_id: {'required': 'True', '_type': 'resource'} |
| # description: {'_type': 'string'} |
| # pattern: {'_type': 'regex'} |
| # |
| # - name: 'blacklist_delete' |
| # url: ['DELETE', 'v2/blacklists/%(blacklist_id)s'] |
| # inputs: |
| # url_input: |
| # blacklist_id: {'required': 'True', '_type': 'resource'} |
| # |
| # - name: 'blacklist_list' |
| # url: ['GET', 'v2/blacklists'] |
| # outputs: |
| # blacklist_id: {'json_extract': 'lambda x: [i["id"] for i in x["blacklists"]]', '_type': 'resource'} |