9e59252a74ef344053a859b4c9891d96b677b0e1
[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: service-model-create
17 description: Create Service model in SDC
18
19 info:
20   product: onap-elalto
21   service: sdc.catalog
22   author: ONAP HPA Team onap-discuss@lists.onap.org
23
24
25 parameters:
26   - name: service-name
27     description: Onap Service Name
28     type: string
29     short_option: x
30     long_option: service-name
31     is_optional: false
32   - name: description
33     description: Description for Service
34     type: string
35     short_option: y
36     long_option: description
37     is_optional: true
38   - name: project-code
39     description: Project code
40     type: string
41     long_option: project-code
42     short_option: z
43     is_optional: true
44   - name: category
45     description: Service category (options are "network l4+","network l1-3","e2e service","mobility","network service","voip call control")
46     type: string
47     short_option: b
48     long_option: category
49     is_optional: true
50     default_value: network l1-3
51   - name: category-display-name
52     description: Service category display name (Options are "Network L4+","Network L1-3","E2E Service","Network Service","Mobility","VoIP Call Control")
53     type: string
54     short_option: c
55     long_option: category-display-name
56     is_optional: true
57     default_value: Network L1-3
58   - name: icon-id
59     description: Service Icon id (options are "network_l_4","network_l_1-3"[use this icon for "Network L1-3","E2E Service","Network Service"],"mobility","call_controll")
60     type: string
61     short_option: e
62     long_option: icon-id
63     default_value: defaulticon
64     is_optional: true
65
66 results:
67   direction: portrait
68   attributes:
69     - name: id
70       description: Service ID
71       scope: short
72       type: string
73     - name: uuid
74       description: Service UUID
75       scope: short
76       type: string
77 http:
78   service:
79     name: sdc
80     version: v1.0
81     auth: basic
82     mode: direct
83   request:
84     uri: /sdc2/rest/v1/catalog/services
85     method: POST
86     body: '{
87             "artifacts":{},
88             "toscaArtifacts":{},
89             "contactId":"${host-username}",
90             "categories":[{
91               "name":"${category-display-name}",
92               "normalizedName":"${category}",
93               "uniqueId":"serviceNewCategory.${category}",
94               "icons":["${icon-id}"],
95               "subcategories":null,
96               "version":null,
97               "ownerId":null,
98               "empty":false,
99               "type":null }],
100            "description":"${description}",
101            "icon":"defaulticon",
102            "componentInstancesProperties":{},
103            "componentInstancesAttributes":{},
104            "name":"${service-name}",
105            "tags":["${service-name}"],
106            "capabilities":{},
107            "requirements":{},
108            "deploymentArtifacts":{},
109            "componentType":"SERVICE",
110            "projectCode":"${project-code}",
111            "componentInstances":[],
112            "properties":[],
113            "attributes":[],
114            "forwardingPaths":{},
115            "ecompGeneratedNaming":true,
116            "serviceApiArtifacts":{},
117            "instantiationType":"A-la-carte",
118            "environmentContext":"General_Revenue-Bearing"
119          }'
120   success_codes:
121     - 200
122     - 201
123   result_map:
124     id: $b{$.uniqueId}
125     uuid: $b{$.uuid}