-
-
Notifications
You must be signed in to change notification settings - Fork 204
Closed
Description
Nova and Rackspace Autoscale both require personality file contents passed through the API to be base64-encoded. python-novaclient transparently base64-encodes the personality contents:
https://github.com/openstack/python-novaclient/blob/ecebc308b33/novaclient/v1_1/servers.py#L458
However, pyrax does not. When I create an Autoscale group with a personality file that has ASCII contents, the resulting file on the server is junk binary data.
au = pyrax.autoscale
sg = au.create(
name="testasg",
cooldown=30,
min_entities=1,
max_entities=1,
launch_config_type="launch_server",
server_name="testasgnode",
flavor="2",
image="042395fc-728c-4763-86f9-9b0cacb00701",
disk_config="AUTO",
personality=[{'path': "/tmp/testing", 'contents': "testtest"}],
)
However, if I create an Autoscale group with a personality file that has base64-encoded contents, the resulting file on the server contains the expected content.
au = pyrax.autoscale
sg = au.create(
name="testasg",
cooldown=30,
min_entities=1,
max_entities=1,
launch_config_type="launch_server",
server_name="testasgnode",
flavor="2",
image="042395fc-728c-4763-86f9-9b0cacb00701",
disk_config="AUTO",
personality=[{'path': "/tmp/testing", 'contents': "dGVzdHRlc3QK"}],
)
The Autoscale interface in pyrax should base64-encode the contents of each personality file before sending it to the Autoscale API.
Metadata
Metadata
Assignees
Labels
No labels