amazon ec2 - Programmatically setting instance name with the OpenStack Nova API -


i have resigned myself fact many of features ec2 users accustomed (in particular, tagging) not exist in openstack. there is, however, 1 piece of functionality absence driving me crazy.

although openstack doesn't have full support instance tags (like ec2 does), does have notion of instance name. name exposed web ui, allows set it:

instance name in instance list

editing instance name

this name exposed through nova list command line utility.

however (and problem) field not exposed through nova-ec2 api layer. cleanest way them integrate existing ec2 platform tools simulate instance tag name "name", don't this. what's more, can't figure out nova api endpoint can use read , write name (it doesn't seem documented on api reference); of course must somehow possible since web client , nova-client can both somehow it.

at moment, i'm forced change manually website every time launch new instance. (i can't during instance creation because use nova-ec2 api, not nova command line client).

my question is:

  1. is there way read/write instance name through ec2 api layer?
  2. failing that, rest endpoint set programmatically?
  3. (bonus): nova's progress on supporting general instance tagging?

the python novaclient.v1_1 package has method on server object:

def update(self, server, name=none):     """     update name or password server.      :param server: :class:`server` (or id) update.     :param name: update server's name.     """     if name none:         return      body = {         "server": {             "name": name,         },     }      self._update("/servers/%s" % base.getid(server), body) 

this indicates can update name of server post-ing following json http://nova-api:port/v2.0/servers/{server-id}:

{   "server": {       "name": "new_name"   } } 

of course, of usual authentication headers (namely x-auth-token keystone server) still required, easier use client library whatever language prefer manage that.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -