Skip to content

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
@stephenplusplus stephenplusplus force-pushed the spp--1073-instance-groups branch from 78248e9 to 1c8a342 Compare May 16, 2016 17:41
@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" notifications@github.com
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.

* @param {string} options.pageToken - A previously-returned page token
* 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.

This comment was marked as spam.

@stephenplusplus stephenplusplus force-pushed the spp--1073-instance-groups branch from 8ec4b35 to 1be1df5 Compare May 18, 2016 19:38
@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!

miguelvelezsa pushed a commit that referenced this pull request Jul 23, 2025
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/gax-nodejs/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)

Fixes https://github.com/googleapis/gax-nodejs/issues/1319 🦕
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