From 3d534b59d03e7be30ae2881c67705b74beb30302 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Tue, 27 Mar 2018 15:36:19 +0530 Subject: CLI: policy-push Issue-ID: CLI-78 Change-Id: Ib24080e7c6a9628f6464b8ba37dec2f8d7f6e858 Signed-off-by: Kanagaraj Manickam k00365106 --- .../policy/policy-push-schema-beijing-moco.json | 24 +++++++++ .../policy/policy-push-schema-beijing-sample.yaml | 23 +++++++++ .../policy/policy-push-schema-beijing.yaml | 59 ++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-beijing-moco.json create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-beijing-sample.yaml create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-push-schema-beijing.yaml (limited to 'products/onap-beijing/features') diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-beijing-moco.json b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-beijing-moco.json new file mode 100644 index 00000000..c718c6cf --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-beijing-moco.json @@ -0,0 +1,24 @@ +[ + { + "request": { + "method": "put", + "uri": "/pdp/api/pushPolicy", + "headers": { + "Authorization": "Basic dGVzdHBkcDphbHBoYTEyMw==", + "ClientAuth": "cHl0aG9uOnRlc3Q=", + "Environment": "ONAP-CLI", + "Accept": "application/json", + "Content-Type": "application/json" + }, + "json": { + "policyName": "com.CSIT_zojumpfzo0zijii_VoLTE", + "policyType": "BRMS_PARAM", + "pdpGroup": "default" + } + }, + "response": { + "status": 200, + "json": {} + } + } +] \ No newline at end of file diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-beijing-sample.yaml b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-beijing-sample.yaml new file mode 100644 index 00000000..b9e08029 --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-beijing-sample.yaml @@ -0,0 +1,23 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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. + +open_cli_sample_version: 1.0 +name: policy-push +version: onap-beijing +samples: + sample1: + name: policy-push + input: --policy-group default --policy-name com.CSIT_zojumpfzo0zijii_VoLTE --policy-type BRMS_PARAM + moco: policy-push-schema-beijing-moco.json + output: \ No newline at end of file diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-push-schema-beijing.yaml b/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-push-schema-beijing.yaml new file mode 100644 index 00000000..66d75057 --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-push-schema-beijing.yaml @@ -0,0 +1,59 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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. + +open_cli_schema_version: 1.0 +name: policy-push +description: Push a policy in pdp + +info: + product: onap-beijing + service: policy + author: ONAP CLI Team onap-discuss@lists.onap.org + state: experimental + +parameters: + - name: policy-name + description: Onap policy Name + type: string + short_option: x + long_option: policy-name + is_optional: false + - name: policy-type + description: Policy type + type: string + long_option: policy-type + short_option: b + is_optional: false + - name: policy-group + description: Policy pdp group + type: string + long_option: policy-group + short_option: c + is_optional: false + +http: + service: + name: policy + version: v1.0 + auth: basic + mode: direct + request: + uri: /pdp/api/pushPolicy + method: PUT + context: + remove_empty_node: true + body: '{"policyName": "${policy-name}", "policyType": "${policy-type}", "pdpGroup": "${policy-group}"}' + + success_codes: + - 200 -- cgit 1.2.3-korg From 30d1d1a148e501bc1d796eee0f271fe4229d7d41 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Tue, 27 Mar 2018 15:37:12 +0530 Subject: CLI: policy-config-create Issue-ID: CLI-78 Change-Id: I382d6ece9068cd71f55c7219e26192886119f3bc Signed-off-by: Kanagaraj Manickam k00365106 --- .../policy-config-create-schema-beijing-moco.json | 25 ++++++++ ...policy-config-create-schema-beijing-sample.yaml | 23 ++++++++ .../policy-config-create-schema-beijing.yaml | 68 ++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-config-create-schema-beijing-moco.json create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-config-create-schema-beijing-sample.yaml create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-config-create-schema-beijing.yaml (limited to 'products/onap-beijing/features') diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-config-create-schema-beijing-moco.json b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-config-create-schema-beijing-moco.json new file mode 100644 index 00000000..746e7f5f --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-config-create-schema-beijing-moco.json @@ -0,0 +1,25 @@ +[ + { + "request": { + "method": "put", + "uri": "/pdp/api/createPolicy", + "headers": { + "Authorization": "Basic dGVzdHBkcDphbHBoYTEyMw==", + "ClientAuth": "cHl0aG9uOnRlc3Q=", + "Environment": "ONAP-CLI", + "Accept": "application/json", + "Content-Type": "application/json" + }, + "json": { + "configBody": "{}", + "policyConfigType": "MicroService", + "policyName": "com.MicroServicevFirewall", + "onapName": "DCAE" + } + }, + "response": { + "status": 200, + "json": {} + } + } +] \ No newline at end of file diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-config-create-schema-beijing-sample.yaml b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-config-create-schema-beijing-sample.yaml new file mode 100644 index 00000000..93b2ea58 --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-config-create-schema-beijing-sample.yaml @@ -0,0 +1,23 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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. + +open_cli_sample_version: 1.0 +name: policy-config-create +version: onap-beijing +samples: + sample1: + name: policy-config-create + input: --policy-name com.MicroServicevFirewall --policy-type MicroService --policy-config {"service":"tca_policy"} + moco: policy-config-create-schema-beijing-moco.json + output: \ No newline at end of file diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-config-create-schema-beijing.yaml b/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-config-create-schema-beijing.yaml new file mode 100644 index 00000000..036aa736 --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-config-create-schema-beijing.yaml @@ -0,0 +1,68 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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. + +open_cli_schema_version: 1.0 +name: policy-config-create +description: Create config policy + +info: + product: onap-beijing + service: policy + author: ONAP CLI Team onap-discuss@lists.onap.org + state: experimental + +parameters: + - name: policy-name + description: Onap policy Name + type: string + short_option: x + long_option: policy-name + is_optional: false + - name: policy-config + description: Configuration of policy + type: json + short_option: y + long_option: policy-config + is_optional: false + - name: policy-onap-component-name + description: ONAP component name + type: string + long_option: policy-onap-component-name + short_option: z + is_optional: false + default_value: DCAE + - name: policy-type + description: Policy cofig type + type: string + long_option: policy-type + short_option: b + is_optional: false + +http: + service: + name: policy + version: v1.0 + auth: basic + mode: direct + request: + uri: /pdp/api/createPolicy + method: PUT + context: + remove_empty_node: true + body: '{"configBody": "${policy-config}","policyConfigType": "${policy-type}","policyName": "${ policy-name}","onapName": "${policy-onap-component-name}"}' + headers: + accept: text/html + + success_codes: + - 200 \ No newline at end of file -- cgit 1.2.3-korg From 0450fb9c9ed42035098ad5f990d46acc0d204cb4 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Tue, 27 Mar 2018 15:37:43 +0530 Subject: CLI: policy-list Issue-ID: CLI-78 Change-Id: If61f2f738e308b24d67424b922c653c53c965e53 Signed-off-by: Kanagaraj Manickam k00365106 --- .../policy/policy-list-schema-beijing-moco.json | 45 ++++++++++++++ .../policy/policy-list-schema-beijing-sample.yaml | 23 +++++++ .../policy/policy-list-schema-beijing.yaml | 71 ++++++++++++++++++++++ 3 files changed, 139 insertions(+) create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-list-schema-beijing-moco.json create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-list-schema-beijing-sample.yaml create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-list-schema-beijing.yaml (limited to 'products/onap-beijing/features') diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-list-schema-beijing-moco.json b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-list-schema-beijing-moco.json new file mode 100644 index 00000000..650edeb9 --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-list-schema-beijing-moco.json @@ -0,0 +1,45 @@ +[ + { + "request": { + "method": "post", + "uri": "/pdp/api/getConfig", + "headers": { + "Authorization": "Basic dGVzdHBkcDphbHBoYTEyMw==", + "ClientAuth": "cHl0aG9uOnRlc3Q=", + "Environment": "ONAP-CLI", + "Accept": "application/json", + "Content-Type": "application/json" + }, + "json": { + "configAttributes": {}, + "unique": false, + "ecompName": "DCAE", + "configName": ".*", + "policyName": ".*vCPE*" + } + }, + "response": { + "status": 200, + "json": [ + { + "policyConfigMessage": "Config Retrieved! ", + "policyConfigStatus": "CONFIG_RETRIEVED", + "type": "JSON", + "config": "{\"service\":\"tca_policy\",\"location\":\"SampleServiceLocation\",\"uuid\":\"test\",\"policyName\":\"MicroServicevCPE\",\"description\":\"MicroService vCPE Policy\",\"configName\":\"SampleConfigName\",\"templateVersion\":\"OpenSource.version.1\",\"version\":\"1.1.0\",\"priority\":\"1\",\"policyScope\":\"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"riskType\":\"SampleRiskType\",\"riskLevel\":\"1\",\"guard\":\"False\",\"content\":{\"policyVersion\":\"v0.0.1\",\"threshholds\":[{\"severity\":\"MAJOR\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":\"0\",\"closedLoopEventStatus\":\"ABATED\",\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"direction\":\"EQUAL\"},{\"severity\":\"CRITICAL\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":\"0\",\"closedLoopEventStatus\":\"ONSET\",\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"direction\":\"GREATER\"}],\"policyName\":\"DCAE.Config_tca-hi-lo\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"eventName\":\"Measurement_vGMUX\"}}", + "policyName": "com.Config_MS_CSIT_285k2x28vv6flay_vCPE.1.xml", + "policyType": "MicroService", + "policyVersion": "1", + "matchingConditions": { + "ONAPName": "DCAE", + "ConfigName": "SampleConfigName", + "service": "tca_policy", + "uuid": "test", + "Location": "SampleServiceLocation" + }, + "responseAttributes": {}, + "property": null + } + ] + } + } +] \ No newline at end of file diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-list-schema-beijing-sample.yaml b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-list-schema-beijing-sample.yaml new file mode 100644 index 00000000..27a96b60 --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-list-schema-beijing-sample.yaml @@ -0,0 +1,23 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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. + +open_cli_sample_version: 1.0 +name: policy-list +version: onap-beijing +samples: + sample1: + name: policy-list + input: --no-title --format csv + moco: policy-list-schema-beijing-moco.json + output: com.Config_MS_CSIT_285k2x28vv6flay_vCPE.1.xml,MicroService diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-list-schema-beijing.yaml b/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-list-schema-beijing.yaml new file mode 100644 index 00000000..9e17616e --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-list-schema-beijing.yaml @@ -0,0 +1,71 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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. + +open_cli_schema_version: 1.0 +name: policy-list +description: List policies + +info: + product: onap-beijing + service: policy + author: ONAP CLI Team onap-discuss@lists.onap.org + state: experimental + +parameters: + - name: policy-onap-component-name + description: ONAP component name + type: string + long_option: policy-onap-component-name + short_option: x + is_optional: true + default_value: DCAE + +results: + direction: landscape + attributes: + - name: name + description: Policy Name + scope: short + type: string + - name: type + description: Policy type + scope: short + type: string + - name: config + description: Policy configuration + scope: long + type: json + - name: rules + description: Policy rules + scope: long + type: json +http: + service: + name: policy + version: v1.0 + auth: basic + mode: direct + request: + uri: /pdp/api/getConfig + method: POST + body: '{"configAttributes": {}, "unique": false, "ecompName": "${policy-onap-component-name}", "configName": ".*", "policyName": ".*"}' + + success_codes: + - 200 + + result_map: + name: $b{$.[*].policyName} + type: $b{$.[*].policyType} + config: $b{$.[*].config} + rules: $b{$.[*].matchingConditions} \ No newline at end of file -- cgit 1.2.3-korg From f3d14df9c66cef6ea1eb84d542fbc47dd6e0d7fc Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Tue, 27 Mar 2018 15:38:32 +0530 Subject: CLI: policy-operational-create Issue-ID: CLI-78 Change-Id: Iffcf11d8bf0bf333c7a8335ad7ea777534b4353a Signed-off-by: Kanagaraj Manickam k00365106 --- .../policy-ops-create-schema-beijing-moco.json | 33 +++++++++ .../policy-ops-create-schema-beijing-sample.yaml | 23 +++++++ .../policy-operational-create-schema-beijing.yaml | 79 ++++++++++++++++++++++ 3 files changed, 135 insertions(+) create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-ops-create-schema-beijing-moco.json create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-ops-create-schema-beijing-sample.yaml create mode 100644 products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-operational-create-schema-beijing.yaml (limited to 'products/onap-beijing/features') diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-ops-create-schema-beijing-moco.json b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-ops-create-schema-beijing-moco.json new file mode 100644 index 00000000..2dcba161 --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-ops-create-schema-beijing-moco.json @@ -0,0 +1,33 @@ +[ + { + "request": { + "method": "put", + "uri": "/pdp/api/createPolicy", + "headers": { + "Authorization": "Basic dGVzdHBkcDphbHBoYTEyMw==", + "ClientAuth": "cHl0aG9uOnRlc3Q=", + "Environment": "ONAP-CLI", + "Accept": "application/json", + "Content-Type": "application/json" + }, + "json": { + "policyConfigType": "BRMS_PARAM", + "policyName": "com.BRMSParamvCPE", + "policyDescription": "BRMS-policy", + "policyScope": "com", + "attributes": { + "MATCHING": { + "controller" : "amsterdam" + }, + "RULE": { + "templateName": "ClosedLoopControlName" + } + } + } + }, + "response": { + "status": 200, + "json": {} + } + } +] \ No newline at end of file diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-ops-create-schema-beijing-sample.yaml b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-ops-create-schema-beijing-sample.yaml new file mode 100644 index 00000000..c99aad9b --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-sample/policy/policy-ops-create-schema-beijing-sample.yaml @@ -0,0 +1,23 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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. + +open_cli_sample_version: 1.0 +name: policy-operational-create +version: onap-beijing +samples: + sample1: + name: policy-operational-create + input: --policy-name com.BRMSParamvCPE --policy-description BRMS-policy --policy-type BRMS_PARAM --policy-scope com --policy-match controller=amsterdam --policy-rule templateName=ClosedLoopControlName + moco: policy-ops-create-schema-beijing-moco.json + output: \ No newline at end of file diff --git a/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-operational-create-schema-beijing.yaml b/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-operational-create-schema-beijing.yaml new file mode 100644 index 00000000..055764f9 --- /dev/null +++ b/products/onap-beijing/features/policy/src/main/resources/open-cli-schema/policy/policy-operational-create-schema-beijing.yaml @@ -0,0 +1,79 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# 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. + +open_cli_schema_version: 1.0 +name: policy-operational-create +description: Create operational policy + +info: + product: onap-beijing + service: policy + author: ONAP CLI Team onap-discuss@lists.onap.org + state: experimental + +parameters: + - name: policy-name + description: Onap policy Name + type: string + short_option: x + long_option: policy-name + is_optional: false + - name: policy-description + description: Description for policy + type: string + short_option: y + long_option: policy-description + is_optional: false + - name: policy-scope + description: Policy scope + type: string + long_option: policy-scope + short_option: z + is_optional: false + - name: policy-type + description: Policy type + type: string + long_option: policy-type + short_option: b + is_optional: false + - name: policy-match + description: Policy matching attributes + type: map + long_option: policy-match + short_option: c + is_optional: false + - name: policy-rule + description: Policy rule attributes + type: map + long_option: policy-rule + short_option: i + is_optional: false + +http: + service: + name: policy + version: v1.0 + auth: basic + mode: direct + request: + uri: /pdp/api/createPolicy + method: PUT + context: + remove_empty_node: true + body: '{"policyConfigType":"${policy-type}","policyName":"${policy-name}","policyDescription":"${policy-description}","policyScope":"${policy-scope}","attributes":{"MATCHING":"${policy-match}","RULE":"${policy-rule}"}}' + headers: + accept: text/html + + success_codes: + - 200 -- cgit 1.2.3-korg