605d2992171e1edbb40d635dcfde3dfcabd0d2c3
[cli.git] /
1 # Copyright 2019 Huawei Technologies Co., Ltd.
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: complex-update
17 description: Update a cloud complex in Onap
18
19 info:
20   product: onap-elalto
21   service: aai
22   author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com)
23
24 parameters:
25   - name: physical-location-id
26     description: id of physical location
27     type: string
28     short_option: x
29     long_option: physical-location-id
30     is_optional: false
31   - name: data-center-code
32     description: datacenter name
33     type: string
34     short_option: y
35     long_option:  data-center-code
36     is_optional: false
37   - name: complex-name
38     description: complex name
39     type: string
40     short_option: z
41     long_option:  complex-name
42     is_optional: false
43   - name: identity-url
44     description: identity url for complex
45     type: string
46     short_option: q
47     long_option:  identity-url
48     is_optional: false
49   - name: physical-location-type
50     description: complex physical location type
51     type: string
52     short_option: r
53     long_option:  physical-location-type
54     is_optional: false
55   - name: street1
56     description: name of street 1 for complex
57     type: string
58     short_option: i
59     long_option:  street1
60     is_optional: false
61   - name: street2
62     description:  name of street 2 for complex
63     type: string
64     short_option: j
65     long_option: street2
66     is_optional: false
67   - name: city
68     description: city complex is located in
69     type: string
70     short_option: g
71     long_option:  city
72     is_optional: false
73   - name: state
74     description: state complex is located in
75     type: string
76     short_option: S
77     long_option:  state
78     is_optional: false
79   - name: postal-code
80     description: postal code for complex
81     type: string
82     short_option: w
83     long_option:  postal-code
84     is_optional: false
85   - name: country
86     description: country complex is located
87     type: string
88     short_option: k
89     long_option:  country
90     is_optional: false
91   - name: region
92     description: region complex is located
93     type: string
94     short_option: l
95     long_option:  region
96     is_optional: false
97   - name: latitude
98     description: latitude of complex location
99     type: string
100     short_option: lt
101     long_option:  latitude
102     is_optional: false
103   - name: longitude
104     description: longitude of complex location
105     type: string
106     short_option: lo
107     long_option:  longitude
108     is_optional: false
109   - name: elevation
110     description: elevation of complex location
111     type: string
112     short_option: o
113     long_option:  elevation
114     is_optional: false
115   - name: lata
116     description: lata of complex
117     type: string
118     short_option: la
119     long_option:  lata
120     is_optional: false
121   - name: resource-version
122     description: resource version of complex to be updated
123     type: uuid
124     short_option: R
125     long_option:  resource-version
126     is_optional: false
127
128
129 http:
130   service:
131     auth: basic
132     mode: direct
133   request:
134     uri: /aai/v16/cloud-infrastructure/complexes/complex/${complex-name}
135     method: PUT
136     body:  '{
137             "physical-location-id": "${physical-location-id}",
138             "data-center-code": "${data-center-code}",
139             "complex-name": "${complex-name}",
140             "identity-url": "${identity-url}",
141             "physical-location-type": "${physical-location-type}",
142             "street1": "${street1}",
143             "street2": "${street2}",
144             "city": "${city}",
145             "state": "${state}",
146             "postal-code": "${postal-code}",
147             "country": "${country}",
148             "region": "${region}",
149             "latitude": "${latitude}",
150             "longitude": "${longitude}",
151             "elevation": "${elevation}",
152             "lata": "${lata}",
153             "resource-version": "${resource-version}"
154             }'
155   success_codes:
156     - 200