Update test utilities & build file

This commit is contained in:
Nick Sardo
2017-06-01 15:26:05 -07:00
parent 05aaef3edc
commit 7248c61ea5
3 changed files with 12 additions and 11 deletions

View File

@@ -717,9 +717,10 @@ func (cont *GCEIngressController) Init() {
// invoking deleteStaticIPs.
func (cont *GCEIngressController) CreateStaticIP(name string) string {
gceCloud := cont.Cloud.Provider.(*gcecloud.GCECloud)
ip, err := gceCloud.ReserveGlobalStaticIP(name, "")
addr := &compute.Address{Name: name}
ip, err := gceCloud.ReserveGlobalAddress(addr)
if err != nil {
if delErr := gceCloud.DeleteGlobalStaticIP(name); delErr != nil {
if delErr := gceCloud.DeleteGlobalAddress(name); delErr != nil {
if cont.isHTTPErrorCode(delErr, http.StatusNotFound) {
Logf("Static ip with name %v was not allocated, nothing to delete", name)
} else {