forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
275 lines
13 KiB
HTML
275 lines
13 KiB
HTML
<a name="EN-US_TOPIC_0134193006"></a><a name="EN-US_TOPIC_0134193006"></a>
|
|
|
|
<h1 class="topictitle1">Microversions</h1>
|
|
<div id="body14894508"><p class="msonormal" id="EN-US_TOPIC_0134193006__p38261652131610">v2.1 APIs support microversions for small/medium API changes or document changes.</p>
|
|
<p class="msonormal" id="EN-US_TOPIC_0134193006__p37764268">Users can use a microversion to obtain the latest API microversion supported by a cloud service. A cloud service that has been upgraded to the latest microversion is compatible with the original microversions. Users can also use a microversion to obtain new cloud service properties.</p>
|
|
<p class="msonormal" id="EN-US_TOPIC_0134193006__p4334098">The version API returns the minimum and maximum microversions. The client uses the two values to specify the microversion range supported by an API.</p>
|
|
<div class="section" id="EN-US_TOPIC_0134193006__section190304191812"><h4 class="sectiontitle">Microversion Response Example</h4><p id="EN-US_TOPIC_0134193006__p18212163710199">If the values of <strong id="EN-US_TOPIC_0134193006__b842352706111911">version</strong> and <strong id="EN-US_TOPIC_0134193006__b842352706111916">min_version</strong> are null, the endpoint does not support microversions.</p>
|
|
<ul id="EN-US_TOPIC_0134193006__ul6547192315193"><li class="msonormal" id="EN-US_TOPIC_0134193006__li1054792371917"><strong id="EN-US_TOPIC_0134193006__b1860923657112112">version</strong>: indicates the maximum microversion.</li><li class="msonormal" id="EN-US_TOPIC_0134193006__li1547172391915"><strong id="EN-US_TOPIC_0134193006__b1327822864112128">min_version</strong>: indicates the minimum microversion.</li></ul>
|
|
<p class="msonormal" id="EN-US_TOPIC_0134193006__p25637925">A microversion on the client must be within the range specified by <strong id="EN-US_TOPIC_0134193006__b1494616183112254">version</strong> and <strong id="EN-US_TOPIC_0134193006__b1270155551112254">min_version</strong> to access the endpoint. The client uses the following HTTP header to specify a microversion:</p>
|
|
<p class="msonormal" id="EN-US_TOPIC_0134193006__p63406026">X-OpenStack-Nova-API-Version: 2.4</p>
|
|
<p class="msonormal" id="EN-US_TOPIC_0134193006__p33783328">Since microversion 2.27, the client can also use the following header to specify a microversion:</p>
|
|
<p class="msonormal" id="EN-US_TOPIC_0134193006__p57218521189">Openstack-API-Version: compute 2.27</p>
|
|
<p id="EN-US_TOPIC_0134193006__p7977191872116">In the following response example, the maximum microversion is 2.14 and the minimum one is 2.1:</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0134193006__screen1119132681610">{
|
|
"versions": [
|
|
{
|
|
"id": "v2.0",
|
|
"links": [
|
|
{
|
|
"href": "http://openstack.example.com/v2/",
|
|
"rel": "self"
|
|
}
|
|
],
|
|
"status": "SUPPORTED",
|
|
"version": "",
|
|
"min_version": "",
|
|
"updated": "2011-01-21T11:33:21Z"
|
|
},
|
|
{
|
|
"id": "v2.1",
|
|
"links": [
|
|
{
|
|
"href": "http://openstack.example.com/v2.1/",
|
|
"rel": "self"
|
|
}
|
|
],
|
|
"status": "CURRENT",
|
|
"version": "2.14",
|
|
"min_version": "2.1",
|
|
"updated": "2013-07-23T11:33:21Z"
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0134193006__section953273282314"><h4 class="sectiontitle">Microversion Request Example</h4><p class="msonormal" id="EN-US_TOPIC_0134193006__p58946502">For example, you are required to use the API for details about an ECS to view the <strong id="EN-US_TOPIC_0134193006__b842352706141941">OS-EXT-SRV-ATTR:hostname</strong> field.</p>
|
|
<ul class="subitemlist" id="EN-US_TOPIC_0134193006__ul9937389"><li class="msonormal" id="EN-US_TOPIC_0134193006__li1335175318246"><strong id="EN-US_TOPIC_0134193006__b842352706142032_1">Using a v2 API without a microversion</strong><ul id="EN-US_TOPIC_0134193006__ul54974372156"><li id="EN-US_TOPIC_0134193006__li39179065">GET: https://<em id="EN-US_TOPIC_0134193006__i497403485019">{endpoint}</em>/v2/74610f3a5ad941998e91f076297ecf27/servers/detail<p id="EN-US_TOPIC_0134193006__p143171815116">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
|
|
</li><li id="EN-US_TOPIC_0134193006__li17067270">Headers
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0134193006__table19387710" frame="border" border="1" rules="all"><tbody><tr id="EN-US_TOPIC_0134193006__row14795382"><td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p57575265">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p33084893">application/json</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0134193006__row29328585"><td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p26805152">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p23733724">${token}</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul class="subitemlist" id="EN-US_TOPIC_0134193006__ul66731007"><li id="EN-US_TOPIC_0134193006__li43383525">Response body<pre class="screen" id="EN-US_TOPIC_0134193006__screen18136165412117">{
|
|
"servers": [
|
|
{
|
|
"tenant_id": "74610f3a5ad941998e91f076297ecf27",
|
|
"addresses": {
|
|
"05d4fb93-84e5-4964-853b-32992ffef627": [
|
|
{
|
|
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:20:17:95",
|
|
"OS-EXT-IPS:type": "fixed",
|
|
"addr": "192.168.0.228",
|
|
"version": 4
|
|
},
|
|
{
|
|
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:20:17:95",
|
|
"OS-EXT-IPS:type": "floating",
|
|
"addr": "192.168.51.61",
|
|
"version": 4
|
|
}
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"OS-EXT-STS:task_state": null,
|
|
"OS-DCF:diskConfig": "MANUAL",
|
|
"OS-EXT-AZ:availability_zone":"az1-dc1",
|
|
"links": [
|
|
{
|
|
"rel": "self",
|
|
"href": "https://None/v2.1/74610f3a5ad941998e91f076297ecf27/servers/89c312bb-285a-4026-a237-d441908c2f9e"
|
|
},
|
|
{
|
|
"rel": "bookmark",
|
|
"href": "https://None/74610f3a5ad941998e91f076297ecf27/servers/89c312bb-285a-4026-a237-d441908c2f9e"
|
|
}
|
|
],
|
|
"OS-EXT-STS:power_state": 1,
|
|
"id": "89c312bb-285a-4026-a237-d441908c2f9e",
|
|
"os-extended-volumes:volumes_attached": [
|
|
{
|
|
"id": "c70c4b8e-33bd-4d1f-ab16-14a5a38cdeaf"
|
|
}
|
|
],
|
|
"OS-EXT-SRV-ATTR:host": "pod05.eude01",
|
|
"image": {
|
|
"links": [
|
|
{
|
|
"rel": "bookmark",
|
|
"href": "https://None/74610f3a5ad941998e91f076297ecf27/images/1189efbf-d48b-46ad-a823-94b942e2a000"
|
|
}
|
|
],
|
|
"id": "1189efbf-d48b-46ad-a823-94b942e2a000"
|
|
},
|
|
"OS-SRV-USG:terminated_at": null,
|
|
"accessIPv4": "",
|
|
"accessIPv6": "",
|
|
"created": "2018-05-11T03:21:56Z",
|
|
"hostId": "fc7a8ff86bac050f0d9454b1b078dcc97060e819acbf06f04c3e338f",
|
|
"OS-EXT-SRV-ATTR:hypervisor_hostname": "nova012@7",
|
|
"key_name": "id_rsa",
|
|
"flavor": {
|
|
"links": [
|
|
{
|
|
"rel": "bookmark",
|
|
"href": "https://None/74610f3a5ad941998e91f076297ecf27/flavors/s3.small.1"
|
|
}
|
|
],
|
|
"id": "s3.small.1"
|
|
},
|
|
"security_groups": [
|
|
{
|
|
"name": "default"
|
|
}
|
|
],
|
|
"config_drive": "",
|
|
"OS-EXT-STS:vm_state": "active",
|
|
"OS-EXT-SRV-ATTR:instance_name": "instance-0016c624",
|
|
"user_id": "f79791beca3c48159ac2553fff22e166",
|
|
"name": "zt-test",
|
|
"progress": 0,
|
|
"OS-SRV-USG:launched_at": "2018-05-11T03:22:16.701600",
|
|
"updated": "2018-05-11T03:22:51Z",
|
|
"status": "ACTIVE"
|
|
}
|
|
]
|
|
}</pre>
|
|
</li><li class="msonormal" id="EN-US_TOPIC_0134193006__li13681172611223">Conclusion: The response body does not contain the <strong id="EN-US_TOPIC_0134193006__b842352706142323_1">OS-EXT-SRV-ATTR:hostname</strong> field.</li></ul>
|
|
</li></ul>
|
|
<ul class="subitemlist" id="EN-US_TOPIC_0134193006__ul20810330"><li class="msonormal" id="EN-US_TOPIC_0134193006__li184119416268"><strong id="EN-US_TOPIC_0134193006__b842352706142032_3">Using a v2.1 API with a microversion</strong><ul id="EN-US_TOPIC_0134193006__ul5317649152213"><li id="EN-US_TOPIC_0134193006__li41111342">GET: https://<em id="EN-US_TOPIC_0134193006__i893614539539">{endpoint}</em>/v2.1/74610f3a5ad941998e91f076297ecf27/servers/detail<p id="EN-US_TOPIC_0134193006__p711810406537">Obtain the endpoint from <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
|
|
</li><li id="EN-US_TOPIC_0134193006__li34457765">Headers
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0134193006__table41684430" frame="border" border="1" rules="all"><tbody><tr id="EN-US_TOPIC_0134193006__row5034912"><td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p5174700">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p16497581">application/json</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0134193006__row14260509"><td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p14250600">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p13447964">${token}</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0134193006__row53922812"><td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p5671647">X-OpenStack-Nova-API-Version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%"><p id="EN-US_TOPIC_0134193006__p56750271">2.26</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul class="subitemlist" id="EN-US_TOPIC_0134193006__ul7915144"><li id="EN-US_TOPIC_0134193006__li33369219">Response body<pre class="screen" id="EN-US_TOPIC_0134193006__screen68711132245">{
|
|
"servers": [
|
|
{
|
|
"tenant_id": "74610f3a5ad941998e91f076297ecf27",
|
|
"addresses": {
|
|
"05d4fb93-84e5-4964-853b-32992ffef627": [
|
|
{
|
|
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:20:17:95",
|
|
"OS-EXT-IPS:type": "fixed",
|
|
"addr": "192.168.0.228",
|
|
"version": 4
|
|
},
|
|
{
|
|
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:20:17:95",
|
|
"OS-EXT-IPS:type": "floating",
|
|
"addr": "192.168.51.61",
|
|
"version": 4
|
|
}
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"OS-EXT-STS:task_state": null,
|
|
"description": "zt-test",
|
|
"OS-EXT-SRV-ATTR:hostname": "zt-test",
|
|
"OS-DCF:diskConfig": "MANUAL",
|
|
"OS-EXT-AZ:availability_zone": "eu-de-01",
|
|
"links": [
|
|
{
|
|
"rel": "self",
|
|
"href": "https://None/v2.1/74610f3a5ad941998e91f076297ecf27/servers/89c312bb-285a-4026-a237-d441908c2f9e"
|
|
},
|
|
{
|
|
"rel": "bookmark",
|
|
"href": "https://None/74610f3a5ad941998e91f076297ecf27/servers/89c312bb-285a-4026-a237-d441908c2f9e"
|
|
}
|
|
],
|
|
"OS-EXT-STS:power_state": 1,
|
|
"id": "89c312bb-285a-4026-a237-d441908c2f9e",
|
|
"os-extended-volumes:volumes_attached": [
|
|
{
|
|
"delete_on_termination": true,
|
|
"id": "c70c4b8e-33bd-4d1f-ab16-14a5a38cdeaf"
|
|
}
|
|
],
|
|
"locked": false,
|
|
"OS-EXT-SRV-ATTR:kernel_id": "",
|
|
"OS-EXT-SRV-ATTR:host": "pod05.eude01",
|
|
"OS-EXT-SRV-ATTR:ramdisk_id": "",
|
|
"image": {
|
|
"links": [
|
|
{
|
|
"rel": "bookmark",
|
|
"href": "https://None/74610f3a5ad941998e91f076297ecf27/images/1189efbf-d48b-46ad-a823-94b942e2a000"
|
|
}
|
|
],
|
|
"id": "1189efbf-d48b-46ad-a823-94b942e2a000"
|
|
},
|
|
"accessIPv4": "",
|
|
"OS-SRV-USG:terminated_at": null,
|
|
"accessIPv6": "",
|
|
"OS-EXT-SRV-ATTR:launch_index": 0,
|
|
"created": "2018-05-11T03:21:56Z",
|
|
"OS-EXT-SRV-ATTR:user_data": null,
|
|
"hostId": "fc7a8ff86bac050f0d9454b1b078dcc97060e819acbf06f04c3e338f",
|
|
"OS-EXT-SRV-ATTR:reservation_id": "r-pbqmaxer",
|
|
"OS-EXT-SRV-ATTR:root_device_name": "/dev/vda",
|
|
"host_status": "UP",
|
|
"OS-EXT-SRV-ATTR:hypervisor_hostname": "nova012@7",
|
|
"tags": [],
|
|
"key_name": "id_rsa",
|
|
"flavor": {
|
|
"links": [
|
|
{
|
|
"rel": "bookmark",
|
|
"href": "https://None/74610f3a5ad941998e91f076297ecf27/flavors/s3.small.1"
|
|
}
|
|
],
|
|
"id": "s3.small.1"
|
|
},
|
|
"security_groups": [
|
|
{
|
|
"name": "default"
|
|
}
|
|
],
|
|
"config_drive": "",
|
|
"OS-EXT-STS:vm_state": "active",
|
|
"OS-EXT-SRV-ATTR:instance_name": "instance-0016c624",
|
|
"user_id": "f79791beca3c48159ac2553fff22e166",
|
|
"name": "zt-test",
|
|
"progress": 0,
|
|
"OS-SRV-USG:launched_at": "2018-05-11T03:22:16.701600",
|
|
"updated": "2018-05-11T03:22:51Z",
|
|
"status": "ACTIVE"
|
|
}
|
|
]
|
|
}</pre>
|
|
</li><li class="msonormal" id="EN-US_TOPIC_0134193006__li9256123413243">Conclusion: The response body contains the <strong id="EN-US_TOPIC_0134193006__b842352706142323_3">OS-EXT-SRV-ATTR:hostname</strong> field.</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0134193004.html">Request Format</a></div>
|
|
</div>
|
|
</div>
|
|
|