SDC service-model commands for onboarding
[cli.git] / products / onap-dublin / features / sdc / src / main / resources / open-cli-schema / service-model / service-model-create-schema-dublin.yaml
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-dublin
21   service: sdc
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 http:
74   service:
75     name: sdc
76     version: v1.0
77     auth: basic
78     mode: direct
79   request:
80     uri: /sdc2/rest/v1/catalog/services
81     method: POST
82     body: '{
83             "artifacts":{},
84             "toscaArtifacts":{},
85             "contactId":"${host-username}",
86             "categories":[{
87               "name":"${category-display-name}",
88               "normalizedName":"${category}",
89               "uniqueId":"serviceNewCategory.${category}",
90               "icons":["${icon-id}"],
91               "subcategories":null,
92               "version":null,
93               "ownerId":null,
94               "empty":false,
95               "type":null }],
96            "description":"${description}",
97            "icon":"defaulticon",
98            "componentInstancesProperties":{},
99            "componentInstancesAttributes":{},
100            "name":"${service-name}",
101            "tags":["${service-name}"],
102            "capabilities":{},
103            "requirements":{},
104            "deploymentArtifacts":{},
105            "componentType":"SERVICE",
106            "projectCode":"${project-code}",
107            "componentInstances":[],
108            "properties":[],
109            "attributes":[],
110            "forwardingPaths":{},
111            "ecompGeneratedNaming":true,
112            "serviceApiArtifacts":{},
113            "instantiationType":"A-la-carte",
114            "environmentContext":"General_Revenue-Bearing"
115          }'
116   success_codes:
117     - 200
118     - 201
119   result_map:
120     ID: $b{$.uniqueId}