d723d2bd72d614ab176c062303759ed473184f8c
[cli.git] /
1 open_cli_schema_version: 1.0
2 name: service-model-create
3 description: Create Service model in SDC
4
5 info:
6   product: onap-1.1
7   service: sdc
8   author: ONAP CLI Team onap-discuss@lists.onap.org
9
10
11 parameters:
12   - name: name
13     description: Onap Service Name
14     type: string
15     short_option: x
16     long_option: name
17     is_optional: false
18   - name: description
19     description: Description for Service
20     type: string
21     short_option: y
22     long_option: description
23     is_optional: true
24   - name: project-code
25     description: Project code
26     type: string
27     long_option: project-code
28     short_option: z
29     is_optional: true
30   - name: category
31     description: Service category
32     type: string
33     short_option: b
34     long_option: category
35     is_optional: true
36     default_value: network l1-3
37   - name: category-display-name
38     description: Service category display name
39     type: string
40     short_option: c
41     long_option: category-display-name
42     is_optional: true
43     default_value: Network L1-3
44   - name: icon-id
45     description: Service Icon id
46     type: string
47     short_option: e
48     long_option: icon-id
49     default_value: defaulticon
50     is_optional: true
51
52 results:
53   direction: portrait
54   attributes:
55     - name: ID
56       description: Service ID
57       scope: short
58       type: string
59 http:
60   service:
61     name: sdc
62     version: v1.0
63     auth: basic
64     mode: direct
65   request:
66     uri: /sdc2/rest/v1/catalog/services
67     method: POST
68     body: '{"componentType": "SERVICE", "properties": [], "requirements": {}, "toscaArtifacts": {}, "tags": ["CLI", "${name}"], "artifacts": {}, "description": "${description}", "serviceApiArtifacts": {}, "capabilities": {}, "name": "${name}", "componentInstancesProperties": {}, "componentInstancesAttributes": {}, "contactId": "${onap-username}", "groups": [], "projectCode": "${project-code}", "deploymentArtifacts": {}, "attributes": [], "componentInstances": [], "categories": [{"normalizedName": "${category}", "name": "${category-display-name}", "uniqueId": "serviceNewCategory.${category}", "icons": ["${icon-id}"]}], "icon": "${icon-id}"}'
69   success_codes:
70     - 200
71     - 201
72   result_map:
73     ID: $b{$.uniqueId}
74