1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (c) 2017-2018 VMware, Inc.
5 ==========================
6 ONAP MultiCloud Test Guide
7 ==========================
12 The env HOST_IP is msb-iag service cluster-ip value is "10.43.188.78"(see it above).
13 The vimid is "vmware_vio" the registered name in aai.
19 # VIO openstack support keystone V2 version, vio proxy-plugin will check the request body format, if request body format
20 # is keystone V2 format will access keystone V2 service, if not it will access keystone V3 service.
21 # this example show how to access keystone V2 service.
22 .. code-block:: console
24 $ curl -X POST -d @testV2.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0/<vimid>/identity/v2.0/tokens
32 "tenantName": "admin",
33 "passwordCredentials": {
42 There are a large amounts of data including service endpoint, user information, etc.
43 For our testing We take nova and identity service endpoint address and auth token which is in response header named “X-Subject-Token”.
45 # you can find the endpoint url namespace is "api/multicloiud-vio/v0", it represent the multicloud-vio service, So
46 requests sending to mulitcloud-vio will be forwarded to backend VIO openstack.
50 http://$msb_address/api/multicloud-vio/v0/<vimid>/identity
53 http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
59 # send request to multicloud-framework(broker) service to get token
61 .. code-block:: console
63 $ curl -X POST -d @test.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0/<vimid>/identity/v3/auth/tokens
65 test.json content example:
70 "auth": sudo pip install virtualenv{
71 "scope": {"project": {"id": “<project-id>”}},
74 "password": {"user": {"domain": {"name": “<doman-name>”}, "password": “<user-password>”, "name": “<user-name>”}}, "methods": ["password"]
81 There are a large amounts of data including service endpoint, user information, etc.
82 For our testing We take nova and identity service endpoint address and auth token which is in response header named “X-Subject-Token”.
84 # you can find the endpoint url namespace is "api/multicloiud-vio/v0", it represent the multicloud-vio service, So
85 requests sending to mulitcloud-vio will be forwarded to backend VIO openstack.
89 http://$msb_address/api/multicloud-vio/v0/<vimid>/identity
92 http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
98 Use identity’s endpoint: http://$msb_address/api/multicloud-vio/v0/<vimid>/identity/
100 .. code-block:: console
102 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/identity/projects
108 Use nova’s endpoint: http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
111 .. code-block:: console
113 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/os-hypervisors/detail
116 List instance of user’s project
117 --------------------------------
119 .. code-block:: console
121 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers
127 you need to input <server-id> in url path.
129 .. code-block:: console
131 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/vimid/nova/tenantid/servers/<server-id>
137 you need to input <server-id> in url path
139 .. code-block:: console
141 $ curl -X POST -d '{"os-stop":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action
147 you need to input <server-id> in url path
149 .. code-block:: console
151 $ curl -X POST -d '{"os-start":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action
157 you need to input <server-id> in url path
159 .. code-block:: console
161 $ curl -X POST -d '{"suspend":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action
167 you need to input <server-id> in url path
169 .. code-block:: console
171 $ curl -X POST -d '{"resume":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action
177 you need to input <server-id> in url path
179 .. code-block:: console
181 $ curl -X POST -d '{"pause":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action
187 you need to input <server-id> in url path
189 .. code-block:: console
191 $ curl -X POST -d '{"unpause":null}' -H 'X-Auth-Token:<token> -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action
197 you need to input <server-id> in url path
199 .. code-block:: console
201 $ curl -X POST -d '{"reboot":{"type":"HARD"}}' -H 'X-Auth-Token:<token> -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action
207 create uploading image task by image url:
209 .. code-block:: console
211 $ curl -X POST -d '{"input": {"image_properties":
212 {"container_format": "bare", "name": "<image_name>"},
213 "import_from_format": "<disk_format>",
214 "import_from": "<image_url>"},
216 -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/tasks
218 get the taskid from response body,then query the task status by taskid.
220 .. code-block:: console
222 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/tasks/<taskid>
224 You can see the description and properties of task in response body,if 'status' is success, it will show image_id in
227 query the image status by image_id
229 .. code-block:: console
231 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/images/<image_id>