-
Notifications
You must be signed in to change notification settings - Fork 180
[WIP] Add Rackspace Auto Scale support #546
Conversation
"loadBalancerId": 123456, | ||
}, | ||
}, | ||
DrainingTimeout: 0, // TODO: This is optional, is this right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is optional, and may not be in the response when requesting a launch configuration -- zero is actually not a valid value. Should I ditch the Args
type and have that just be a map[string]interface{}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you've got the right idea here. We want the fields to be as specific as possible, so for some things we have no choice but map[string]interface{}
but we want that to be a last resort. If you don't want the DrainingTimeout
field to show up if it's empty, you can use the encoding/json
package (instead of the mapstructure
package) to unmarshal the JSON into the Configuration
and use json:"draining_timeout,omitempty"
for the field's struct tag.
So, all the bits for webhooks are done, and the diff is already pretty big. Would it be easier if I close this and open a separate PR for each package (webhooks, policies, launch, and groups) as I get to those, or do you prefer one giant PR? |
Smaller PRs would be appreciated. |
Cool. Closing this. |
Adds support for Rackspace Auto Scale.
Docs: https://developer.rackspace.com/docs/autoscale/v1/developer-guide/
Fixes #418