aboutsummaryrefslogtreecommitdiffstats
path: root/products/onap-elalto/features/aai/src/main/resources/open-cli-schema/infra/cloud/cloud-create-schema-elalto.yaml
blob: 00c9712e5664b77b7906821b1a99c539bc665424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#  Copyright 2019 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

open_cli_schema_version: 1.0
name: cloud-create
description: Create a cloud region in Onap

info:
  product: onap-elalto
  service: aai
  author: ONAP CLI Team onap-discuss@lists.onap.org


parameters:
  - name: cloud-owner
    description: Onap cloud owner
    type: string
    short_option: x
    long_option: cloud-owner
    is_optional: false
  - name: region-name
    description: Onap  region name
    type: string
    short_option: y
    long_option:  region-name
    is_optional: false
  - name: cloud-type
    description: Cloud type e.g openstack
    type: string
    short_option: q
    long_option:  cloud-type
    is_optional: false
  - name: owner-type
    description: owner defined type
    type: string
    short_option: r
    long_option: owner-type
    is_optional: false
  - name: cloud-region-version
    description: cloud region version e.g titanium_cloud
    type: string
    short_option: w
    long_option:  cloud-region-version
    is_optional: false
  - name: complex-name
    description: Onap complex-name
    type: string
    short_option: n
    long_option:  complex-name
    is_optional: false
  - name: cloud-zone
    description: Onap cloud zone
    type: string
    short_option: g
    long_option:  cloud-zone
    is_optional: false
  - name: region-name
    description: Onap  region name
    type: string
    short_option: y
    long_option:  region-name
    is_optional: false
  - name: sriov-automation
    description: sriov automation, default is false
    type: bool
    short_option: S
    long_option:  sriov-automation
    is_optional: true
    default_value: false
  - name: identity-url
    description: Onap identity-url, updated by multicloud if multicloud is used
    type: string
    short_option: i
    long_option:  identity-url
    is_optional: false
  - name: esr-id
    description: id for esr system (arbitrary UUID e.g 5c85ce1f-aa78-4ebf-8d6f-4b62773e9bc8)
    type: uuid
    short_option: e
    long_option:  esr-id
    is_optional: false
  - name: service-url
    description: service-url i.e keystone url for openstack
    type: string
    short_option: url
    long_option:  service-url
    is_optional: false
  - name: username
    description: cloud user name
    type: string
    short_option: b
    long_option:  username
    is_optional: false
  - name: password
    description: cloud password
    type: string
    short_option: j
    long_option:  password
    is_optional: false
  - name: system-type
    description: system type for cloud e.g VIM
    type: string
    short_option: Q
    long_option:  system-type
    is_optional: false
  - name: ssl-insecure
    description: to use ssl insecure or not, default is true
    type: bool
    short_option: z
    long_option:  ssl-insecure
    is_optional: false
  - name: cloud-domain
    description: cloud domain, default is Default
    type: string
    short_option: c
    long_option:  cloud-domain
    is_optional: false
  - name: default-tenant
    description: default cloud tenant to use
    type: string
    short_option: l
    long_option:  default-tenant
    is_optional: false
  - name: system-status
    description: status of the cloud, default is active
    type: string
    short_option: k
    long_option:  system-status
    is_optional: false

http:
  service:
    auth: basic
    mode: direct
  request:
    uri: /aai/v16/cloud-infrastructure/cloud-regions/cloud-region/${cloud-owner}/${region-name}
    method: PUT
    body: '{
                "cloud-owner": "${cloud-owner}",
                "cloud-region-id": "${region-name}",
                "cloud-type": "${cloud-type}",
                "owner-defined-type": "${owner-type}",
                "cloud-region-version": "${cloud-region-version}",
                "complex-name":"${complex-name}",
                "cloud-zone": "${cloud-zone}",
                "sriov-automation": "${sriov-automation}",
                "identity-url": "${identity-url}",
                "cloud-extra-info":"{\"openstack-region-id\":\"${region-name}\"}",
                "esr-system-info-list": {
                "esr-system-info":[
                 {
                      "esr-system-info-id":"${esr-id}",
                      "service-url": "${service-url}",
                      "user-name":"${username}",
                      "password":"${password}",
                      "system-type": "${system-type}",
                      "ssl-insecure": "${ssl-insecure}",
                      "cloud-domain":"${cloud-domain}",
                      "default-tenant":"${default-tenant}",
                      "system-status":"${system-status}"
                   }]}
                }'
  success_codes:
    - 201