Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compute: implement InstanceGroups #1320

Merged

Conversation

stephenplusplus
Copy link
Contributor

@stephenplusplus stephenplusplus commented May 16, 2016

RE: #1073

To Dos

  • Docs
  • Tests
    • System
    • Unit

This adds support for instance groups:

var gce = gcloud.compute();
var zone = gce.zone('us-central1-a');

// Get all of the instance groups in the project (also available in stream mode)
gce.getInstanceGroups(function(err, instanceGroups) {});

// Get all of the instance groups in a zone (also available in stream mode)
zone.getInstanceGroups(function(err, instanceGroups) {});

// Reference an existing instance group
var instanceGroup = zone.instanceGroup('instance-group-name');

// Add VMs to an instance group (1 or more)
instanceGroup.add([
  zone.vm('my-vm'),
  zone.vm('my-other-vm')
], function(err, operation, apiResponse) {});

// Remove them (1 or more)
instanceGroup.remove(zone.vm('my-vm'), function(err, operation, apiResponse) {});

// Get the VMs from the group (also available in stream mode)
instanceGroup.getVms(function(err, vms) {});

@stephenplusplus stephenplusplus added api: compute Issues related to the Compute Engine API. don't merge labels May 16, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 16, 2016
@callmehiphop callmehiphop mentioned this pull request May 16, 2016
20 tasks
@stephenplusplus
Copy link
Contributor Author

@callmehiphop I originally had the type called Group, then felt that was a little short, so I expanded it to InstanceGroup -- which would you prefer?

@callmehiphop
Copy link
Contributor

I like InstanceGroup!
On May 17, 2016 11:13 AM, "Stephen Sawchuk" [email protected]
wrote:

@callmehiphop https://github.com/callmehiphop I originally had the type
called Group, then felt that was a little short, so I expanded it to
InstanceGroup -- which would you prefer?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1320 (comment)

@coveralls
Copy link

coveralls commented May 17, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 8ec4b35 on stephenplusplus:spp--1073-instance-groups into 17e510b on GoogleCloudPlatform:master.

@stephenplusplus
Copy link
Contributor Author

@callmehiphop Ready for a review, good sir.

* representing part of the larger set of results to view.
* @param {function} callback - The callback function.
* @param {?error} callback.err - An error returned while making this request.
* @param {module:compute/instance-group} callback.instanceGroups -

This comment was marked as spam.

@stephenplusplus
Copy link
Contributor Author

@callmehiphop Done!

@coveralls
Copy link

coveralls commented May 18, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 1be1df5 on stephenplusplus:spp--1073-instance-groups into b877420 on GoogleCloudPlatform:master.

@stephenplusplus
Copy link
Contributor Author

@callmehiphop looks mergable to you?

@stephenplusplus stephenplusplus merged commit 0fdff64 into googleapis:master May 18, 2016
@callmehiphop
Copy link
Contributor

@stephenplusplus yeah, sorry, looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: compute Issues related to the Compute Engine API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants