rackspace / gophercloud

A Go SDK for OpenStack. IN FEATURE FREEZE. See Issue #592
http://gophercloud.io
Other
456 stars 181 forks source link

[WIP] Rackspace Auto Scale: groups #569

Closed bison closed 4 years ago

bison commented 8 years ago

Adds a package for Rackspace Auto Scale groups.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.03%) to 80.177% when pulling 86ba0bdd7cef26ea8b2676018cfd7bd9df02ca4f on bison:autoscale-groups into d62a69f7484d2e2b90c68991ccc91c3309d80b1e on rackspace:master.

bison commented 8 years ago

Getting started on the final bit of adding Auto Scale support, but a few things are a little awkward already.

First, when you GET an individual group, the response consists of a UUID, configuration object, state object, launch configuration object, and a list of scaling policies. When listing groups, the groups only contain the UUID and the state object, so the others will be empty or nil. That seems kind of confusing, but I'm not sure what can be done about it.

Second, you don't update a group resource directly, you update its configuration at its /config URL, which you can also GET separately from the group. So, does it make more sense to have GetConfig and UpdateConfig (with an ConfigUpdateOpts type) methods in this package, or just have groups.Update apply to /config?