updates personality to []map[string]string where map has path and contents
diff --git a/openstack/compute/v2/servers/requests.go b/openstack/compute/v2/servers/requests.go
index b7c1611..c740dfb 100644
--- a/openstack/compute/v2/servers/requests.go
+++ b/openstack/compute/v2/servers/requests.go
@@ -125,9 +125,10 @@
// Metadata [optional] contains key-value pairs (up to 255 bytes each) to attach to the server.
Metadata map[string]string
- // Personality [optional] includes the path and contents of a file to inject into the server at launch.
- // The maximum size of the file is 255 bytes (decoded).
- Personality []byte
+ // Personality [optional] includes a list of maps with the path and contents
+ // of a file to inject into the server at launch. Contents should be
+ // base64 encoded. The maximum size of the file is 255 bytes (decoded).
+ Personality []map[string]string
// ConfigDrive [optional] enables metadata injection through a configuration drive.
ConfigDrive bool
@@ -156,8 +157,7 @@
server["user_data"] = &encoded
}
if opts.Personality != nil {
- encoded := base64.StdEncoding.EncodeToString(opts.Personality)
- server["personality"] = &encoded
+ server["personality"] = opts.Personality
}
if opts.ConfigDrive {
server["config_drive"] = "true"
@@ -406,9 +406,10 @@
// Metadata [optional] contains key-value pairs (up to 255 bytes each) to attach to the server.
Metadata map[string]string
- // Personality [optional] includes the path and contents of a file to inject into the server at launch.
- // The maximum size of the file is 255 bytes (decoded).
- Personality []byte
+ // Personality [optional] includes a list of maps with the path and contents
+ // of a file to inject into the server at launch. Contents should be
+ // base64 encoded. The maximum size of the file is 255 bytes (decoded).
+ Personality []map[string]string
}
// ToServerRebuildMap formats a RebuildOpts struct into a map for use in JSON
@@ -445,8 +446,7 @@
}
if opts.Personality != nil {
- encoded := base64.StdEncoding.EncodeToString(opts.Personality)
- server["personality"] = &encoded
+ server["personality"] = opts.Personality
}
return map[string]interface{}{"rebuild": server}, nil
diff --git a/rackspace/compute/v2/servers/requests.go b/rackspace/compute/v2/servers/requests.go
index 809183e..96dc931 100644
--- a/rackspace/compute/v2/servers/requests.go
+++ b/rackspace/compute/v2/servers/requests.go
@@ -36,9 +36,10 @@
// Metadata [optional] contains key-value pairs (up to 255 bytes each) to attach to the server.
Metadata map[string]string
- // Personality [optional] includes the path and contents of a file to inject into the server at launch.
- // The maximum size of the file is 255 bytes (decoded).
- Personality []byte
+ // Personality [optional] includes a list of maps with the path and contents
+ // of a file to inject into the server at launch. Contents should be
+ // base64 encoded. The maximum size of the file is 255 bytes (decoded).
+ Personality []map[string]string
// ConfigDrive [optional] enables metadata injection through a configuration drive.
ConfigDrive bool
@@ -130,9 +131,10 @@
// Metadata [optional] contains key-value pairs (up to 255 bytes each) to attach to the server.
Metadata map[string]string
- // Personality [optional] includes the path and contents of a file to inject into the server at launch.
- // The maximum size of the file is 255 bytes (decoded).
- Personality []byte
+ // Personality [optional] includes a list of maps with the path and contents
+ // of a file to inject into the server at launch. Contents should be
+ // base64 encoded. The maximum size of the file is 255 bytes (decoded).
+ Personality []map[string]string
// Rackspace-specific stuff begins here.