f2f129e342e8780cb5c4ed397ba3de6ab20a3cd2
[cli.git] /
1 # Copyright (c) 2019, CMCC Technologies Co., Ltd.
2 # Licensed under the Apache License, Version 2.0 (the "License")
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
6 # Unless required by applicable law or agreed to in writing, software
7 # distributed under the License is distributed on an "AS IS" BASIS,
8 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 # See the License for the specific language governing permissions and
10 # limitations under the License.
11
12 open_cli_schema_version: 1.0
13 name: vfc-nslcm-get-subscription
14 description: vfc nsclm subscribe notification
15
16 info:
17   product: onap-dublin
18   service: vfc
19   author: ONAP VFC Team (yangyanyj@chinamobile.com)
20
21 parameters:
22   - name: callback-uri
23     description: callback-uri
24     type: string
25     short_option: c
26     long_option: callback-uri
27     is_optional: false
28   - name: notification-types
29     description: the type of notification
30     type: string
31     short_option: n
32     long_option: notification-types
33     is_optional: false
34
35 results:
36   direction: portrait
37   attributes:
38     - name: subscription_id
39       description: subscription_id
40       scope: short
41       type: string
42     - name: callback-uri
43       description: callback-uri
44       scope: short
45       type: string
46     - name: links
47       description: links
48       scope: short
49       type: string
50     - name: filter
51       description: filter
52       scope: short
53       type: string
54
55 http:
56   service:
57     auth: none
58     mode: direct
59   request:
60     uri: /api/nslcm/v1/subscriptions
61     method: POST
62     context:
63       remove_empty_node: true
64     body:
65     '{
66       "callbackUri": "${callback-uri}",
67       "authentication": {
68         "authType": ["BASIC"],
69         "paramsBasic": {
70           "username": "username",
71           "password": "password"
72         }
73       },
74       "filter": {
75         "notificationTypes": ["${notification-types}"],
76         "operationTypes": [
77           "INSTANTIATE"
78         ],
79         "operationStates": [
80           "STARTING"
81         ]
82       }
83     }'
84
85     headers:
86       Content-Type: application/json
87       Accept: application/json
88   success_codes:
89     - 201
90   result_map:
91     subscription_id: $b{$.subscriptionId}
92     callback-Uri: $b{$.callbackUri}
93     links: $b{$.links}
94     filter: $b{$.filter}