openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #05892
Re: API specifications
Ah now it's time for me to apologize for the confusion. I had
collected a number of extensions documents prior to the nova project
moving to Github. They sat in a Launchpad branch. I never proposed a
merge. I'll put together a review request with the files added so they
can live in the nova project.
Here's a paste of what Chris sent for that, to get people started with
config_drive.
About This Extension
====================
The config-drive extension enables attaching a separate drive to the
Compute guest on instance create. It is used with the OpenStack
Compute 1.1 API to write configuration data into guest for those
guests whose root filesystems cannot be mounted by the Compute host.
To use this extension, you must have installed Compute, with libvirt
or Xen using local disk.
To obtain current information the extensions available to you, issue
an EXTENSION query on the OpenStack system where it is installed, such
as http://mycloud.com/v1.1/tenant/extensions.
Extension Overview
------------------
Name
Config Drive
Namespace
http://docs.openstack.org/ext/config-drive/api/v1.1
Alias
ORG-EXT
Contact
Christopher MacGown <chris@xxxxxxxxxxxxxxx>
Status
Alpha
Extension Version
v1.0 (2011-09-16)
Dependencies
Compute API 1.1
Doc Link (PDF)
http://
Doc Link (WADL)
http://
Short Description
This extension enables the assignment of config-drives to a compute
guest on instance create running in an OpenStack cloud.
Sample Query Responses
----------------------
As shown below, responses to an EXTENSION query in XML or JSON provide
basic information about the extension.
Extension Query Response: XML::
Extension Query Response: JSON::
Document Change History
-----------------------
============= =====================================
Revision Date Summary of Changes
2011-09-16 Initial draft
============= =====================================
Summary of Changes
==================
This extension to the OpenStack Compute API allows the addition of a
configuration drive to an instance.
New Action
----------
None
New Faults
----------
None
New Headers
-----------
None
New Resources
-------------
This extension to the OpenStack Compute API adds the following resources:
A config_drive attribute to the servers API that is None by default,
but can optionally be True or the imageRef of a config-drive image.
Upon instance create, a guest built with a True config_drive attribute
will create a local volume and partition it as a fat32 drive, all
passed in metadata, networks, and keys will be written to the
config_drive which is associated as the last available disk on the
instance.
Upon instance create, a guest built with an imageRef config_drive
attribute will create a local volume from the image.
New States
----------
Changes to the Cloud Servers Specification
------------------------------------------
In section 4.1.2 (Create Servers) of the API Specification: Examples
4.3 and 4.4 should optionally add the config-drive attribute as in the
below examples:
Example XML with config_drive attribute = True::
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
imageRef="http://servers.api.openstack.org/1234/images/52415800-8b69-11e0-9b19-734f6f006e54"
flavorRef="52415800-8b69-11e0-9b19-734f1195ff37"
name="new-server-test"
config=drive="True"
>
<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>
Example XML with config_drive attribute is an imageRef::
<?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1"
imageRef="http://servers.api.openstack.org/1234/images/
52415800-8b69-11e0-9b19-734f6f006e54"
flavorRef="52415800-8b69-11e0-9b19-734f1195ff37"
name="new-server-test"
config_drive="http://servers.api.openstack.org/1234/images/52415800-8b69-1341-9b19-734f6f006e54"
>
<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>
Example JSON with config_drive attribute is true::
{
"server" : {
"name" : "new-server-test",
"imageRef" :
"http://servers.api.openstack.org/1234/images/52415800-8b69-11e0-9b19-734f6f006e54",
"flavorRef" : "52415800-8b69-11e0-9b19-734f1195ff37",
"config_drive" : "true",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}
Example JSON with config_drive attribute is an imageRef::
{
"server" : {
"name" : "new-server-test",
"imageRef" :
"http://servers.api.openstack.org/1234/images/52415800-8b69-11e0-9b19-734f6f006e54",
"flavorRef" : "52415800-8b69-11e0-9b19-734f1195ff37",
"config_drive" :
"http://servers.api.openstack.org/1234/images/52415800-8b69-11e0-9b19-734f6f006e54",
"metadata" : {
"My Server Name" : "Apache1"
},
"personality" : [
{
"path" : "/etc/banner.txt",
"contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
b25zLiINCg0KLVJpY2hhcmQgQmFjaA=="
}
]
}
}
On Fri, Dec 2, 2011 at 12:18 PM, Nachi Ueno
<ueno.nachi@xxxxxxxxxxxxxxxxxxxx> wrote:
> Hi Chris
>
> Sorry, I missed that.
> Would you give me url?
>
> Such as console.py, it is not in contrib directory.
>
> 2011/12/2 Christopher MacGown <chris@xxxxxxxxxxxxxxx>:
>> Hi Nachi,
>>
>> At least for config_drive, it has been documented as an extension.
>>
>> - chris
>>
>> On Dec 2, 2011, at 10:07, Nachi Ueno <ueno.nachi@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>>> Hi Brian
>>>
>>> Thank you for your response.
>>> How about params which is missing in docs?
>>>
>>> accessIPv4
>>> accessIPv6
>>> adminPass
>>> config_drive
>>> security_groups
>>> networks
>>> blob
>>> keyname
>>> availability_zone
>>> reservation_id
>>> min_count
>>> max_count
>>> 2011/12/1 Brian Waldon <brian.waldon@xxxxxxxxxxxxx>:
>>>> Our consoles resource is not a part of the 1.1 (2.0) API. You are right in thinking it should be in the contrib directory. Additionally, it needs to be modified to act as an extension.
>>>>
>>>> Our current level of documentation of extensions is extremely lacking, so hopefully before Essex we can do a much better job.
>>>>
>>>> Brian Waldon
>>>>
>>>>
>>>> On Dec 1, 2011, at 1:37 PM, Nachi Ueno wrote:
>>>>
>>>>> Hi Nova-cores
>>>>>
>>>>> Is the Console function in OS API 1.1 specs?
>>>>> (See https://bugs.launchpad.net/nova/+bug/898266)
>>>>>
>>>>> The implementation is not in contrib directory, so it didn't looks an extension.
>>>>> But as 898266 mentioned, it is not described in API docs.
>>>>>
>>>>> And also, I checked API spces from code. (I know this is reverse way. :))
>>>>>
>>>>> There are another example,
>>>>> Create server could get,
>>>>>
>>>>> name (*)
>>>>> imageRef (*)
>>>>> flavorRef (*)
>>>>> accessIPv4
>>>>> accessIPv6
>>>>> adminPass
>>>>> config_drive
>>>>> security_groups
>>>>> networks
>>>>> blob
>>>>> keyname
>>>>> availability_zone
>>>>> reservation_id
>>>>> min_count
>>>>> max_count
>>>>> metadata (*)
>>>>> personality (*)
>>>>>
>>>>> And only * one is documented on API.
>>>>> http://docs.openstack.org/api/openstack-compute/1.1/content/CreateServers.html
>>>>>
>>>>> Doc-Team can not decide specs, so I suppose Nova-core are responsible
>>>>> to define these specs.
>>>>>
>>>>> Cheers
>>>>> Nachi
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~openstack
>>>>> Post to : openstack@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~openstack
>>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to : openstack@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
References