I just want to clarify "waiting" - do you mean waiting in create_node or deploy_node method?
IIRC, currently create_node doesn't wait for node to actually be up and running in any of the drivers. Only method which waits is deploy_node which calls driver.wait_until_running underneath. In any case, I'm fine with adding the extra attribute to the base OpenStack driver, but yes, we should also create a new RackConnect driver which inherits from the OpenStack / Rackspace driver and does the following: 1. Update node.public_ips attribute to include additional public IP you have mentioned above 2. Modify wait_until_running to wait for node to be in "DEPLOYED" state 3. If RackConnect only considers node to be running once metadata key has been set to "DEPLOYED" then we should also modify the code to only set node.state to NodeState.RUNNING if this metadata key has been set. On Sun, Sep 1, 2013 at 8:10 PM, Chris Johnson < [email protected]> wrote: > I was able to accomplish what I need just by adding a new key to the extra > dict but I'm not sure that's the most intuitive place for it. Plus, a > separate driver may be a good idea anyway because to really support > servers built this way libcloud should wait for the post-build automation > to run before calling it complete. > > diff --git a/libcloud/compute/drivers/openstack.py > b/libcloud/compute/drivers/openstack.py > index 648d451..1aea25f 100644 > --- a/libcloud/compute/drivers/openstack.py > +++ b/libcloud/compute/drivers/openstack.py > @@ -1716,6 +1716,7 @@ class OpenStack_1_1_NodeDriver(OpenStackNodeDriver): > driver=self, > extra=dict( > hostId=api_node['hostId'], > + access_ips=api_node.get('accessIPv4'), > # Docs says "tenantId", but actual is "tenant_id". *sigh* > # Best handle both. > tenantId=api_node.get('tenant_id') or api_node['tenantId'], > > > Here's a PR for this change: > https://github.com/apache/libcloud/pull/140/files > > > -----Original Message----- > From: Tomaz Muraus <[email protected]> > Reply-To: "[email protected]" <[email protected]> > Date: Sunday, September 1, 2013 12:44 PM > To: dev <[email protected]> > Subject: Re: [dev] Rackspace Rackconnect support in Libcloud > > >Yeah what Alex said. I'm also not aware of an existing Rack Connect > >driver. > > > >How we should proceed depends on how much do you need to extend the base > >OpenStack driver: > > > >1. If you need to add a bunch of new functionality and extension methods, > >then we should create a new RackConnect driver which inherits from the > >OpenStack one and add RackConnect specific functionality there. > > > >2. If you just need "accessIPv4" value (I would imagine this is an > >internal > >/ service net IP address), in this case I'm fine with modifying base > >OpenStack driver to look for this attribute and add it to node.private_ips > >list if it exists. > > > > > >On Sun, Sep 1, 2013 at 7:19 PM, Alex Gaynor <[email protected]> > wrote: > > > >> Hey Chris, > >> > >> I don't believe anyone is currently working on this. I'm not super > >>familiar > >> with the APIs for interacting with Rackconnect, but when you send the PR > >> I'm happy to take a look to see if the way it's integrated looks right > >>for > >> libcloud. > >> > >> Alex > >> > >> > >> On Sun, Sep 1, 2013 at 10:02 AM, Chris Johnson < > >> [email protected]> wrote: > >> > >> > Hello, > >> > > >> > I've recently been working on a project where we needed to use > >>salt-cloud > >> > to provision servers in a Rackspace cloud environment with > >>Rackconnect. > >> To > >> > accomplish that I extended the libcloud/compute/drivers/openstack.py > >> > driver to provide the accessIPv4 value from the instance details. > >> > > >> > If I had a need for it I would image others would as well but before I > >> > submitted a pull request I thought I would check here first to see if > >> that > >> > work is already being done somewhere else or if there's a better > >> approach. > >> > > >> > Chris Johnson > >> > > >> > > >> > >> > >> -- > >> "I disapprove of what you say, but I will defend to the death your > >>right to > >> say it." -- Evelyn Beatrice Hall (summarizing Voltaire) > >> "The people's good is the highest law." -- Cicero > >> GPG Key fingerprint: 125F 5C67 DFE9 4084 > >> > > > > >
