ad56e529b47df2e31ddbc21becda3dcc7e8e2df0
[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: cloud-create
17 description: Create a cloud region in Onap
18
19 info:
20   product: onap-dublin
21   service: aai
22   author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com)
23
24
25 parameters:
26   - name: cloud-owner
27     description: Onap cloud owner
28     type: string
29     short_option: x
30     long_option: cloud-owner
31     is_optional: false
32   - name: region-name
33     description: Onap  region name
34     type: string
35     short_option: y
36     long_option:  region-name
37     is_optional: false
38   - name: cloud-type
39     description: Cloud type e.g openstack
40     type: string
41     short_option: q
42     long_option:  cloud-type
43     is_optional: false
44   - name: owner-defined-type
45     description: owner defined type
46     type: string
47     short_option: r
48     long_option: owner-type
49     is_optional: false
50   - name: cloud-region-version
51     description: cloud region version e.g titanium_cloud
52     type: string
53     short_option: w
54     long_option:  cloud-region-version
55     is_optional: false
56   - name: complex-name
57     description: Onap complex-name
58     type: string
59     short_option: n
60     long_option:  complex-name
61     is_optional: false
62   - name: cloud-zone
63     description: Onap cloud zone
64     type: string
65     short_option: g
66     long_option:  cloud-zone
67     is_optional: false
68   - name: region-name
69     description: Onap  region name
70     type: string
71     short_option: y
72     long_option:  region-name
73     is_optional: false
74   - name: sriov-automation
75     description: sriov automation, default is false
76     type: bool
77     short_option: S
78     long_option:  sriov-automation
79     is_optional: true
80     default: false
81   - name: identity-url
82     description: Onap identity-url, updated by multicloud if multicloud is used
83     type: string
84     short_option: i
85     long_option:  identity-url
86     is_optional: false
87   - name: esr-system-info-id
88     description: id for esr system (arbitrary UUID e.g 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bc8)
89     type: uuid
90     short_option: e
91     long_option:  esr-id
92     is_optional: false
93   - name: service-url
94     description: service-url i.e keystone url for openstack
95     type: string
96     short_option: url
97     long_option:  service-url
98     is_optional: false
99   - name: user-name
100     description: cloud user name
101     type: string
102     short_option: b
103     long_option:  user-name
104     is_optional: false
105   - name: password
106     description: cloud password
107     type: string
108     short_option: j
109     long_option:  password
110     is_optional: false
111   - name: system-type
112     description: system type for cloud e.g VIM
113     type: string
114     short_option: Q
115     long_option:  system-type
116     is_optional: false
117   - name: ssl-insecure
118     description: to use ssl insecure or not, default is true
119     type: bool
120     short_option: z
121     long_option:  ssl-insecure
122     is_optional: false
123   - name: cloud-domain
124     description: cloud domain, default is Default
125     type: string
126     short_option: c
127     long_option:  cloud-domain
128     is_optional: false
129   - name: default-tenant
130     description: default cloud tenant to use
131     type: string
132     short_option: l
133     long_option:  default-tenant
134     is_optional: false
135   - name: system-status
136     description: status of the cloud, default is active
137     type: string
138     short_option: k
139     long_option:  system-status
140     is_optional: false
141   - name: cloud-extra-info
142     description: extra info to register cloud , generally string with region id e.g {\"openstack-region-id\":\"region-id\"}, enter as {\\"openstack-region-id\\":\\"ONAP-POD-01-Rail-07\\"} with CLI
143     type: string
144     short_option: I
145     long_option:  extra-info
146     is_optional: false
147
148 http:
149   service:
150     auth: basic
151     mode: direct
152   request:
153     uri: /aai/v14/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${region-name}
154     method: PUT
155     body: '{
156                 "cloud-owner": "${cloud-owner}",
157                 "cloud-region-id": "${region-name}",
158                 "cloud-type": "${cloud-type}",
159                 "owner-defined-type": "${owner-defined-type}",
160                 "cloud-region-version": "${cloud-region-version}",
161                 "complex-name":"${complex-name}",
162                 "cloud-zone": "${cloud-zone}",
163                 "sriov-automation": "${sriov-automation}",
164                 "identity-url": "${identity-url}",
165                 "cloud-extra-info":"${cloud-extra-info}",
166                 "esr-system-info-list": {
167                 "esr-system-info":[
168                  {
169                       "esr-system-info-id":"${esr-system-info-id}",
170                       "service-url": "${service-url}",
171                       "user-name":"${user-name}",
172                       "password":"${password}",
173                       "system-type": "${system-type}",
174                       "ssl-insecure": "${ssl-insecure}",
175                       "cloud-domain":"${cloud-domain}",
176                       "default-tenant":"${default-tenant}",
177                       "system-status":"${system-status}"
178                    }]}
179                 }'
180   success_codes:
181     - 201