1 ==========================
2 ONAP MultiCloud Test Guide
3 ==========================
8 The env HOST_IP is msb-iag service cluster-ip value is "10.43.188.78"(see it above).
9 The vimid is "vmware_vio" the registered name in aai.
15 # VIO openstack support keystone V2 version, vio proxy-plugin will check the request body format, if request body format
16 # is keystone V2 format will access keystone V2 service, if not it will access keystone V3 service.
17 # this example show how to access keystone V2 service.
18 .. code-block:: console
20 $ curl -X POST -d @testV2.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0/<vimid>/identity/v2.0/tokens
28 "tenantName": "admin",
29 "passwordCredentials": {
38 There are a large amounts of data including service endpoint, user information, etc.
39 For our testing We take nova and identity service endpoint address and auth token which is in response header named “X-Subject-Token”.
41 # you can find the endpoint url namespace is "api/multicloiud-vio/v0", it represent the multicloud-vio service, So
42 requests sending to mulitcloud-vio will be forwarded to backend VIO openstack.
46 http://$msb_address/api/multicloud-vio/v0/<vimid>/identity
49 http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
55 # send request to multicloud-framework(broker) service to get token
57 .. code-block:: console
59 $ curl -X POST -d @test.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0/<vimid>/identity/v3/auth/tokens
61 test.json content example:
66 "auth": sudo pip install virtualenv{
67 "scope": {"project": {"id": “<project-id>”}},
70 "password": {"user": {"domain": {"name": “<doman-name>”}, "password": “<user-password>”, "name": “<user-name>”}}, "methods": ["password"]
77 There are a large amounts of data including service endpoint, user information, etc.
78 For our testing We take nova and identity service endpoint address and auth token which is in response header named “X-Subject-Token”.
80 # you can find the endpoint url namespace is "api/multicloiud-vio/v0", it represent the multicloud-vio service, So
81 requests sending to mulitcloud-vio will be forwarded to backend VIO openstack.
85 http://$msb_address/api/multicloud-vio/v0/<vimid>/identity
88 http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
94 Use identity’s endpoint: http://$msb_address/api/multicloud-vio/v0/<vimid>/identity/
96 .. code-block:: console
98 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/identity/projects
104 Use nova’s endpoint: http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid>
107 .. code-block:: console
109 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/os-hypervisors/detail
112 List instance of user’s project
113 --------------------------------
115 .. code-block:: console
117 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers
123 you need to input <server-id> in url path.
125 .. code-block:: console
127 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/vimid/nova/tenantid/servers/<server-id>
133 you need to input <server-id> in url path
135 .. code-block:: console
137 $ 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
143 you need to input <server-id> in url path
145 .. code-block:: console
147 $ 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
153 you need to input <server-id> in url path
155 .. code-block:: console
157 $ 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
163 you need to input <server-id> in url path
165 .. code-block:: console
167 $ 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
173 you need to input <server-id> in url path
175 .. code-block:: console
177 $ 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
183 you need to input <server-id> in url path
185 .. code-block:: console
187 $ 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
193 you need to input <server-id> in url path
195 .. code-block:: console
197 $ 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
203 create uploading image task by image url:
205 .. code-block:: console
207 $ curl -X POST -d '{"input": {"image_properties":
208 {"container_format": "bare", "name": "<image_name>"},
209 "import_from_format": "<disk_format>",
210 "import_from": "<image_url>"},
212 -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/tasks
214 get the taskid from response body,then query the task status by taskid.
216 .. code-block:: console
218 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/tasks/<taskid>
220 You can see the description and properties of task in response body,if 'status' is success, it will show image_id in
223 query the image status by image_id
225 .. code-block:: console
227 $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/images/<image_id>