Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Conversation

bison
Copy link
Contributor

@bison bison commented Mar 24, 2016

Adds support for Rackspace Auto Scale.

Docs: https://developer.rackspace.com/docs/autoscale/v1/developer-guide/

Fixes #418

"loadBalancerId": 123456,
},
},
DrainingTimeout: 0, // TODO: This is optional, is this right?
Copy link
Contributor Author

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{}?

Copy link
Contributor

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.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 79.959% when pulling 66ce2e7 on bison:rax-auto-scale into 3dc5217 on rackspace:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 79.984% when pulling cce6f7f on bison:rax-auto-scale into 3dc5217 on rackspace:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 80.008% when pulling 9d758a8 on bison:rax-auto-scale into 3dc5217 on rackspace:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 80.017% when pulling ff2278f on bison:rax-auto-scale into 3dc5217 on rackspace:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 80.047% when pulling 53a18f1 on bison:rax-auto-scale into 3dc5217 on rackspace:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 80.071% when pulling 3a0d82b on bison:rax-auto-scale into 3dc5217 on rackspace:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 80.1% when pulling c6394f5 on bison:rax-auto-scale into 3dc5217 on rackspace:master.

@bison
Copy link
Contributor Author

bison commented Mar 29, 2016

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?

@jrperritt
Copy link
Contributor

Smaller PRs would be appreciated.

@bison
Copy link
Contributor Author

bison commented Mar 29, 2016

Cool. Closing this.

@bison bison closed this Mar 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants