Add an extension to show the network id of a virtual interface

This extension adds the OS-EXT-VIF-NET:net_id param
so that users can determine vif plunged into which network now.

DocImpact

Change-Id: I56bef5c45f7f545aa5e9b13760dff1c802da0f8f
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
This commit is contained in:
Zhi Yan Liu
2013-03-07 17:57:21 +08:00
parent 8f2d50381d
commit 50e30a6b13
24 changed files with 430 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/openstack/flavors/1",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBpdCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5kIGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVsc2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4gQnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRoZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlvdSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vyc2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}

View File

@@ -0,0 +1,19 @@
<?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>
</server>

View File

@@ -0,0 +1,16 @@
{
"server": {
"adminPass": "m62Pu3gkXXV2",
"id": "a98dd3ae-5feb-4b4b-afa4-25e830ad3305",
"links": [
{
"href": "http://openstack.example.com/v2/openstack/servers/a98dd3ae-5feb-4b4b-afa4-25e830ad3305",
"rel": "self"
},
{
"href": "http://openstack.example.com/openstack/servers/a98dd3ae-5feb-4b4b-afa4-25e830ad3305",
"rel": "bookmark"
}
]
}
}

View File

@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="37443b33-eb80-4eea-90d8-f90778f53dea" adminPass="ffV6E5gsNPpi">
<metadata/>
<atom:link href="http://openstack.example.com/v2/openstack/servers/37443b33-eb80-4eea-90d8-f90778f53dea" rel="self"/>
<atom:link href="http://openstack.example.com/openstack/servers/37443b33-eb80-4eea-90d8-f90778f53dea" rel="bookmark"/>
</server>

View File

@@ -0,0 +1,9 @@
{
"virtual_interfaces": [
{
"id": "cec8b9bb-5d22-4104-b3c8-4c35db3210a6",
"mac_address": "fa:16:3e:3c:ce:6f",
"OS-EXT-VIF-NET:net_id": "cec8b9bb-5d22-4104-b3c8-4c35db3210a7"
}
]
}

View File

@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<virtual_interfaces
xmlns:OS-EXT-VIF-NET="http://docs.openstack.org/compute/ext/extended-virtual-interfaces-net/api/v1.1"
xmlns="http://docs.openstack.org/compute/api/v1.1">
<virtual_interface id="94edf7aa-565a-469a-8f45-656b4acf8229"
mac_address="fa:16:3e:7d:31:9a"
OS-EXT-VIF-NET:net_id="94edf7aa-565a-469a-8f45-656b4acf8230"/>
</virtual_interfaces>

View File

@@ -56,6 +56,14 @@
"namespace": "http://docs.openstack.org/compute/ext/extended_status/api/v1.1",
"updated": "2011-11-03T00:00:00+00:00"
},
{
"alias": "OS-EXT-VIF-NET",
"description": "Adds network id parameter to the virtual interface list.",
"links": [],
"name": "ExtendedVIFNet",
"namespace": "http://docs.openstack.org/compute/ext/extended-virtual-interfaces-net/api/v1.1",
"updated": "2013-03-07T00:00:00+00:00"
},
{
"alias": "OS-FLV-DISABLED",
"description": "Support to show the disabled status of a flavor.",

View File

@@ -21,6 +21,9 @@
<extension alias="OS-EXT-STS" updated="2011-11-03T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/extended_status/api/v1.1" name="ExtendedStatus">
<description>Extended Status support.</description>
</extension>
<extension alias="OS-EXT-VIF-NET" updated="2013-03-07T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/extended-virtual-interfaces-net/api/v1.1" name="ExtendedVIFNet">
<description>Adds network id parameter to the virtual interface list.</description>
</extension>
<extension alias="OS-FLV-DISABLED" updated="2012-08-29T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/flavor_disabled/api/v1.1" name="FlavorDisabled">
<description>Support to show the disabled status of a flavor.</description>
</extension>