create server should return adminPass
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
Invalid
|
Undecided
|
Unassigned |
Bug Description
on rackspace's cloud servers the response for a server create returns the initial root password as adminPass in the API response, but the raw response json is lost when the server instance is returned and the adminPass attribute isn't stored on the object.
This means you can get the adminPass when creating a server on the Rackspace cloud with the python-openstacksdk
I'm monkey-patching Resource with the following code:
from openstack import connection, resource
class PatchedResource
def create_by_id(self, *args, **kwargs):
resp = super(PatchedRe
return resp
resource.Resource = PatchedResource
This is obviously a hack, I think could do something a tad bit tighter by monkeypatching compute.
As I understand it not all cloud's provide an adminPass when creating an instance and key_pairs is the recommend strategy for initial authorization to new servers. Nevertheless the adminPass is super convenient and my ideal client for using OpenStack clouds wouldn't throw out useful information from the response. I hope it would be possible to expose a cleaner solution for retrieving the adminPass from the create_server method when using the Rackspace's OpenStack(ish?) Cloud.
I'm not sure if the ideal fix from the python-openstacksdk perspective is to make the adminPass a proper attribute (admin_pass) on the server instance, or if it would be better to somehow attach the raw response object to the conn.compute.
I hope this is descriptive and helpful.
1. Maybe here, https:/
I talked to clayg on IRC and explained some of this, but this should be handled in the Rackspace extension. The relevant bug over there is https:/ /github. com/rackerlabs/ rackspace- sdk-plugin/ issues/ 21