248ac60b73ef2e3e926dfa823f18081a358d6658
[cli.git] /
1 # Copyright © Intel Corporation 2019
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 open_cli_schema_version: 1.0
16 name: policy-create-outdated
17 description: Create a policy in PAP
18
19 info:
20   product: onap-dublin
21   service: policy
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24 parameters:
25   - name: policy-name
26     description: Onap policy Name
27     type: string
28     short_option: x
29     long_option: policy-name
30     is_optional: false
31   - name: policy-config-type
32     description: Policy config type
33     type: string
34     long_option: policy--config-type
35     short_option: t
36     is_optional: false
37   - name: policy-scope
38     description: Policy scope
39     type: string
40     long_option: policy-scope
41     short_option: s
42     is_optional: false
43   - name: onap-name
44     description: Onap name
45     type: string
46     long_option: onap-name
47     short_option: o
48     is_optional: false
49   - name: policy-config-body
50     description: Policy config body
51     type: string
52     long_option: policy-config-body
53     short_option: b
54     is_optional: false
55
56 http:
57   service:
58     name: policy
59     version: v1.0
60     auth: basic
61     mode: direct
62   request:
63     uri: /pdp/api/createPolicy
64     method: PUT
65     context:
66       remove_empty_node: true
67     body: '{"policyName": "${policy-name}",
68             "policyConfigType": "${policy-config-type}",
69             "policyScope": "${policy-scope}",
70             "onapName": "${onap-name}",
71             "configBody": "${policy-config-body}"}'
72     headers:
73       Content-Type: application/json
74       Accept: text/plain
75       Environment: TEST
76       ClientAuth: cHl0aG9uOnRlc3Q=
77
78   success_codes:
79     - 200
80     - 201