2 This work is licensed under a Creative Commons Attribution 4.0
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
14 The vimid is "vmware_vio" the registered name in aai.
20 # VIO openstack support keystone V2 version, vio proxy-plugin will check the
21 request body format, if request body format
22 # is keystone V2 format will access keystone V2 service, if not it will access
24 # this example show how to access keystone V2 service.
26 .. code-block:: console
28 $ curl -X POST -d @testV2.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0/<vimid>/identity/v2.0/tokens
36 "tenantName": "admin",
37 "passwordCredentials": {
46 There are a large amounts of data including service endpoint, user information,
48 For our testing We take nova and identity service endpoint address and auth
49 token which is in response header named “X-Subject-Token”.
51 # you can find the endpoint url namespace is "api/multicloiud-vio/v0", it
52 represent the multicloud-vio service, So
53 requests sending to mulitcloud-vio will be forwarded to backend VIO openstack.
58 http://$msb_address/api/multicloud-vio/v0/<vimid>/identity
62 http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
68 # send request to multicloud-framework(broker) service to get token
70 .. code-block:: console
72 $ curl -X POST -d @test.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0/<vimid>/identity/v3/auth/tokens
74 test.json content example:
79 "auth": sudo pip install virtualenv{
80 "scope": {"project": {"id": “<project-id>”}},
83 "password": {"user": {"domain": {"name": “<doman-name>”}, "password": “<user-password>”, "name": “<user-name>”}}, "methods": ["password"]
90 There are a large amounts of data including service endpoint, user information,
92 For our testing We take nova and identity service endpoint address and auth
93 token which is in response header named “X-Subject-Token”.
95 # you can find the endpoint url namespace is "api/multicloiud-vio/v0", it
96 represent the multicloud-vio service, So
97 requests sending to mulitcloud-vio will be forwarded to backend VIO openstack.
102 http://$msb_address/api/multicloud-vio/v0/<vimid>/identity
106 http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
112 Use identity’s endpoint: http://$msb_address/api/multicloud-vio/v0/<vimid>/identity/
114 .. code-block:: console
116 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/identity/projects
122 Use nova’s endpoint: http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
125 .. code-block:: console
127 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/os-hypervisors/detail
130 List instance of user’s project
131 --------------------------------
133 .. code-block:: console
135 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers
141 you need to input <server-id> in url path.
143 .. code-block:: console
145 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/vimid/nova/tenantid/servers/<server-id>
151 you need to input <server-id> in url path
153 .. code-block:: console
155 $ 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
161 you need to input <server-id> in url path
163 .. code-block:: console
165 $ 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
171 you need to input <server-id> in url path
173 .. code-block:: console
175 $ 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
181 you need to input <server-id> in url path
183 .. code-block:: console
185 $ 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
191 you need to input <server-id> in url path
193 .. code-block:: console
195 $ 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
201 you need to input <server-id> in url path
203 .. code-block:: console
205 $ 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
211 you need to input <server-id> in url path
213 .. code-block:: console
215 $ 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
221 create uploading image task by image url:
223 .. code-block:: console
225 $ curl -X POST -d '{"input": {"image_properties":
226 {"container_format": "bare", "name": "<image_name>"},
227 "import_from_format": "<disk_format>",
228 "import_from": "<image_url>"},
230 -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/tasks
232 get the taskid from response body,then query the task status by taskid.
234 .. code-block:: console
236 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/tasks/<taskid>
238 You can see the description and properties of task in response body,if 'status'
239 is success, it will show image_id in result block.
241 query the image status by image_id
243 .. code-block:: console
245 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/images/<image_id>