From ba880b136bee77159ab98bde438ed61d76ec3949 Mon Sep 17 00:00:00 2001 From: Guillaume Giamarchi Date: Thu, 19 Feb 2015 23:53:30 +0100 Subject: [PATCH] Code clean-up --- .../providers/openstack/resource_openstack_fw_firewall_v1.go | 3 +-- builtin/providers/openstack/resource_openstack_fw_policy_v1.go | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/builtin/providers/openstack/resource_openstack_fw_firewall_v1.go b/builtin/providers/openstack/resource_openstack_fw_firewall_v1.go index 9d5764357..16b2014a7 100644 --- a/builtin/providers/openstack/resource_openstack_fw_firewall_v1.go +++ b/builtin/providers/openstack/resource_openstack_fw_firewall_v1.go @@ -1,7 +1,6 @@ package openstack import ( - "errors" "fmt" "log" "time" @@ -258,7 +257,7 @@ func waitForFirewallDeletion(networkingClient *gophercloud.ServiceClient, id str log.Printf("[DEBUG] Firewall %s is actually deleted", id) return "", "DELETED", nil } - return nil, "", errors.New(fmt.Sprintf("Unexpected status code %d", httpStatus.Actual)) + return nil, "", fmt.Errorf("Unexpected status code %d", httpStatus.Actual) } log.Printf("[DEBUG] Firewall %s deletion is pending", id) diff --git a/builtin/providers/openstack/resource_openstack_fw_policy_v1.go b/builtin/providers/openstack/resource_openstack_fw_policy_v1.go index 815059752..e58b994fc 100644 --- a/builtin/providers/openstack/resource_openstack_fw_policy_v1.go +++ b/builtin/providers/openstack/resource_openstack_fw_policy_v1.go @@ -62,9 +62,6 @@ func resourceFWPolicyV1() *schema.Resource { func resourceFWPolicyV1Create(d *schema.ResourceData, meta interface{}) error { - // TODO To remove - time.Sleep(time.Second * 5) - config := meta.(*Config) networkingClient, err := config.networkingV2Client(d.Get("region").(string)) if err != nil {