nova/doc/api_samples/os-block-device-mapping-v2-boot/server-post-req.xml
Nikola Dipanov 8c3475706d Servers API for the new BDM format
This patch makes the nova API aware and able to accept the new block
device mapping format introduced in
If30afdb59d4c4268b97d3d10270df2cc729a0c4c when booting an instance.

It does so by introducing a new extension into the v2 API. There is no
v3 extension as part of this patch because volume extension is going
away in v3 and thus this functionality can be part of the core servers
extension. This will be done in a subsequent patch.

The compute API create method will still convert these back to the
legacy format for the time being until the compute API will know how to
take advantage of the new format.

As this change adds the new API extension, marking it as DocImpact so
that the changes and the API data format can be documented.

blueprint: improve-block-device-handling
Change-Id: I2c1b63e41deca26f727fb9ed912a55494db9c76c
2013-07-26 12:33:01 +02:00

23 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" imageRef="http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" flavorRef="http://openstack.example.com/openstack/flavors/1" name="new-server-test">
<metadata>
<meta key="My Server Name">Apache1</meta>
</metadata>
<personality>
<file path="/etc/banner.txt">
ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
</file>
</personality>
<block_device_mapping_v2>
<mapping device_name="/dev/sdb1" source_type="blank" destination_type="local" delete_on_termination="True" guest_format="swap" boot_index="-1"></mapping>
<mapping device_name="/dev/sda1" source_type="volume" destination_type="volume" uuid="fake-volume-id-1" boot_index="0"></mapping>
</block_device_mapping_v2>
</server>