i want to write tests for an adapter over google compute engine and google container engine.
for example:
node = gce.managedInstanceGroup("myGroup").createNode()
//do something with node
node.delete()
when i try to use the resize operation on a managed cluster to add a node, i get back an operation:
{
"kind": "compute#operation",
"id": --
"name": "operation---",
"zone": "https://www.googleapis.com/compute/v1/projects/--/zones/us-east1-d",
"operationType": "compute.instanceGroupManagers.resize",
"targetLink": "https://www.googleapis.com/compute/v1/projects/--/zones/us-east1-d/instanceGroupManagers/---grp",
"targetId": "--",
"status": "DONE",
"user": "--@--.iam.gserviceaccount.com",
"progress": 100,
"insertTime": "2016-05-10T04:40:28.281-07:00",
"startTime": "2016-05-10T04:40:28.283-07:00",
"endTime": "2016-05-10T04:40:28.283-07:00",
"selfLink": "https://www.googleapis.com/compute/v1/projects/--/zones/us-east1-d/operations/operation---"
}
i don't see a way to extract which nodes are being created by it. i can get a list of all nodes and see which ones are with status CREATING, but that doesn't mean they were created by MY operation. i can't just delete them, i don't know where they're from.
is there a way to determine exactly which nodes my resize operation created in the managed instance group?
additionally, how can i tell when my operation specifically is completed, if there isn't? how can i clean up my nodes?
as an alternative, is there a way to add nodes to a managed instance group other than the resize operation?