diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/MultiCloud-Deployment-Guide.rst | 82 | ||||
-rw-r--r-- | docs/Multicloud-Fake_Cloud-Guide.rst | 22 |
2 files changed, 71 insertions, 33 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> diff --git a/docs/Multicloud-Fake_Cloud-Guide.rst b/docs/Multicloud-Fake_Cloud-Guide.rst index dc8af4c..1df19b7 100644 --- a/docs/Multicloud-Fake_Cloud-Guide.rst +++ b/docs/Multicloud-Fake_Cloud-Guide.rst @@ -22,30 +22,28 @@ Register vio information into AAI service with region name "vmware" and region i .. code-block:: console $ curl -X PUT -H "X-TransactionId":"get_aai_subr" -H "X-FromAppId":"AAI" -H "Accept":"application/json" \ - -H "Content-Type:"application/json" \ + -H "Content-Type:"application/json" -H "Authorization:Basic QUFJOkFBSQ==" \ https://aai_ip:aai_port/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/vmware/fake \ -d "{ "cloud-owner": "vmware", - "cloud-region-id": "vio", + "cloud-region-id": "fake", "cloud-type": "vmware", "cloud-region-version": "4.0", - "identity-url": "http://MSB_IP:MSB_PORT/api/multicloud-vio/v0/vmware_fake/identity/v3", - "sriov-automation": false, - "resource-version": "1505892661724", + "identity-url": "http://MSB_IP:MSB_PORT/api/multicloud/v0/vmware_fake/identity/v3", + "cloud-zone": "cloud zone", + "complex-name": "complex name", "esr-system-info-list": { "esr-system-info": [ { - "esr-system-info-id": "62e17285-c207-42b0-9d55-b472b274c254", - "system-name": "vim-fake-cloud", + "system-name": "vmware-fake-cloud", "type": "vim", "service-url": "http://127.0.0.1:5000/v3", "user-name": "admin", "password": "vmware", - "system-type": "vim", - "ssl-insecure": false, + "system-type": "VIM", + "ssl-insecure": true, "cloud-domain": "default", "default-tenant": "admin", - "resource-version": "1505892661819" } ] } @@ -59,7 +57,7 @@ the identity url reprent the fake cloud identity url. Test Examples ~~~~~~~~~~~~~ -the ${fake_identiy_url}= "http://MSB_IP:MSB_PORT/api/multicloud-vio/v0/vmware_fake/identity/v3" +the ${fake_identiy_url}= "http://MSB_IP:MSB_PORT/api/multicloud/v0/vmware_fake/identity/v3" the ${msb_address} = "MSB_IP:MSB_PORT" Get auth token @@ -76,7 +74,7 @@ test.json content example: :: { - "auth": sudo pip install virtualenv{ + "auth": { "scope": {"project": {"id": “<project-id>”}}, "identity": { |