diff options
author | liangke <lokyse@163.com> | 2017-10-23 16:24:37 +0800 |
---|---|---|
committer | liangke <lokyse@163.com> | 2017-10-30 11:42:00 +0800 |
commit | abfed00c0697e1593d3c829b9da14faab25ac84f (patch) | |
tree | 62ae146781112c42690abb1f13fe9c13761708c5 /docs/MultiCloud-Deployment-Guide.rst | |
parent | 42fbfdc598d852e24c17edf2dfa89f73bdbf217e (diff) |
Update fake_cloud registry and keystone v2.0
Change-Id: I60df7777dfed0ff0fac46aff9df2146076a9335b
Issue-Id: MULTICLOUD-4
Signed-off-by: liangke <lokyse@163.com>
Diffstat (limited to 'docs/MultiCloud-Deployment-Guide.rst')
-rw-r--r-- | docs/MultiCloud-Deployment-Guide.rst | 82 |
1 files changed, 61 insertions, 21 deletions
diff --git a/docs/MultiCloud-Deployment-Guide.rst b/docs/MultiCloud-Deployment-Guide.rst index 11c1e5f..03db16f 100644 --- a/docs/MultiCloud-Deployment-Guide.rst +++ b/docs/MultiCloud-Deployment-Guide.rst @@ -171,14 +171,54 @@ The env HOST_IP is msb-iag service cluster-ip value is "10.43.188.78"(see it abo The vimid is "vmware_vio" the registered name in aai. -Get auth token --------------- +Get V2 auth token +----------------- + +# VIO openstack support keystone V2 version, vio proxy-plugin will check the request body format, if request body format +# is keystone V2 format will access keystone V2 service, if not it will access keystone V3 service. +# this example show how to access keystone V2 service. +.. code-block:: console + + $ curl -X POST -d @testV2.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0/<vimid>/identity/v2.0/tokens + +testV2.json content: + +:: + + { + "auth": { + "tenantName": "admin", + "passwordCredentials": { + "username": "admin", + "password": "vmware" + } + } + } + + +Response: +There are a large amounts of data including service endpoint, user information, etc. +For our testing We take nova and identity service endpoint address and auth token which is in response header named “X-Subject-Token”. + +# you can find the endpoint url namespace is "api/multicloiud-vio/v0", it represent the multicloud-vio service, So +requests sending to mulitcloud-vio will be forwarded to backend VIO openstack. + + +Identity endpoint: + http://$msb_address/api/multicloud-vio/v0/<vimid>/identity + +Nova endpoint: + http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid> + + +Get V3 auth token +----------------- # send request to multicloud-framework(broker) service to get token .. code-block:: console - $ curl -X POST -d @test.json -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud/v0/<vimid>/identity/auth/tokens + $ curl -X POST -d @test.json -H 'Content-Type:application/json' http://$msb_address/api/multicloud/v0/<vimid>/identity/v3/auth/tokens test.json content example: @@ -204,31 +244,31 @@ requests sending to mulitcloud-vio will be forwarded to backend VIO openstack. Identity endpoint: - http://$HOST_IP/api/multicloud-vio/v0/<vimid>/identity + http://$msb_address/api/multicloud-vio/v0/<vimid>/identity Nova endpoint: - http://$HOST_IP/api/multicloud-vio/v0/<vimid>/compute/<user-tenantid> + http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid> List projects ------------- -Use identity’s endpoint: http://$HOST_IP/api/multicloud-vio/v0/<vimid>/identity/ +Use identity’s endpoint: http://$msb_address/api/multicloud-vio/v0/<vimid>/identity/ .. code-block:: console - $ curl -X GET -H 'X-Auth-Token:<token>' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/identity/projects + $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/identity/projects Get os Hypervisor ----------------- -Use nova’s endpoint: http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid> +Use nova’s endpoint: http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<user-tenantid> .. code-block:: console - $ curl -X GET -H 'X-Auth-Token:<token>' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/os-hypervisors/detail + $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/os-hypervisors/detail List instance of user’s project @@ -236,7 +276,7 @@ List instance of user’s project .. code-block:: console - $ curl -X GET -H 'X-Auth-Token:<token>' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers + $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers Show instance detail @@ -246,7 +286,7 @@ you need to input <server-id> in url path. .. code-block:: console - $ curl -X GET -H 'X-Auth-Token:<token>' http://$HOST_IP/api/multicloud-vio/v0/vimid/nova/tenantid/servers/<server-id> + $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/vimid/nova/tenantid/servers/<server-id> Shutdown instance @@ -256,7 +296,7 @@ you need to input <server-id> in url path .. code-block:: console - $ curl -X POST -d '{"os-stop":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action + $ 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 Start instance @@ -266,7 +306,7 @@ you need to input <server-id> in url path .. code-block:: console - $ curl -X POST -d '{"os-start":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action + $ 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 Suspend instance @@ -276,7 +316,7 @@ you need to input <server-id> in url path .. code-block:: console - $ curl -X POST -d '{"suspend":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action + $ 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 Resume instance @@ -286,7 +326,7 @@ you need to input <server-id> in url path .. code-block:: console - $ curl -X POST -d '{"resume":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action + $ 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 Pause instance @@ -296,7 +336,7 @@ you need to input <server-id> in url path .. code-block:: console - $ curl -X POST -d '{"pause":null}' -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action + $ 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 Unpasue instance @@ -306,7 +346,7 @@ you need to input <server-id> in url path .. code-block:: console - $ curl -X POST -d '{"unpause":null}' -H 'X-Auth-Token:<token> -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action + $ 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 Reboot instance @@ -316,7 +356,7 @@ you need to input <server-id> in url path .. code-block:: console - $ curl -X POST -d '{"reboot":{"type":"HARD"}}' -H 'X-Auth-Token:<token> -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/nova/<tenantid>/servers/<server-id>/action + $ 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 Upload Image Task @@ -331,13 +371,13 @@ create uploading image task by image url: "import_from_format": "<disk_format>", "import_from": "<image_url>"}, "type": "import"}' - -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/glance/v2/tasks + -H 'X-Auth-Token:<token>' -H 'Content-Type:application/json' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/tasks get the taskid from response body,then query the task status by taskid. .. code-block:: console - $ curl -X GET -H 'X-Auth-Token:<token>' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/glance/v2/tasks/<taskid> + $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/tasks/<taskid> You can see the description and properties of task in response body,if 'status' is success, it will show image_id in result block. @@ -346,7 +386,7 @@ query the image status by image_id .. code-block:: console - $ curl -X GET -H 'X-Auth-Token:<token>' http://$HOST_IP/api/multicloud-vio/v0/<vimid>/glance/v2/images/<image_id> + $ curl -X GET -H 'X-Auth-Token:<token>' http://$msb_address/api/multicloud-vio/v0/<vimid>/glance/v2/images/<image_id> |