mirror of https://github.com/hashicorp/packer
parent
33a84c0938
commit
637968f2dd
@ -1,23 +0,0 @@
|
||||
package googlecompute
|
||||
|
||||
import (
|
||||
"code.google.com/p/google-api-go-client/compute/v1beta16"
|
||||
)
|
||||
|
||||
// GoogleComputeClient represents a GCE client.
|
||||
type GoogleComputeClient struct {
|
||||
ProjectId string
|
||||
Service *compute.Service
|
||||
Zone string
|
||||
clientSecrets *clientSecrets
|
||||
}
|
||||
|
||||
// DeleteImage deletes the named image. Returns a Global Operation.
|
||||
func (g *GoogleComputeClient) DeleteImage(name string) (*compute.Operation, error) {
|
||||
imagesDeleteCall := g.Service.Images.Delete(g.ProjectId, name)
|
||||
operation, err := imagesDeleteCall.Do()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return operation, nil
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
package googlecompute
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// waitForInstanceState.
|
||||
func waitForInstanceState(desiredState string, zone string, name string, client *GoogleComputeClient, timeout time.Duration) error {
|
||||
return nil
|
||||
/*
|
||||
f := func() (string, error) {
|
||||
return client.InstanceStatus(zone, name)
|
||||
}
|
||||
return waitForState("instance", desiredState, f, timeout)
|
||||
*/
|
||||
}
|
||||
|
||||
// waitForZoneOperationState.
|
||||
func waitForZoneOperationState(desiredState string, zone string, name string, client *GoogleComputeClient, timeout time.Duration) error {
|
||||
return nil
|
||||
/*
|
||||
f := func() (string, error) {
|
||||
return client.ZoneOperationStatus(zone, name)
|
||||
}
|
||||
return waitForState("operation", desiredState, f, timeout)
|
||||
*/
|
||||
}
|
||||
|
||||
// waitForGlobalOperationState.
|
||||
func waitForGlobalOperationState(desiredState string, name string, client *GoogleComputeClient, timeout time.Duration) error {
|
||||
/*
|
||||
f := func() (string, error) {
|
||||
return client.GlobalOperationStatus(name)
|
||||
}
|
||||
return waitForState("operation", desiredState, f, timeout)
|
||||
*/
|
||||
return nil
|
||||
}
|
||||
Loading…
Reference in new issue