Renaming functions to be more appropriate to their task
diff --git a/acceptance/openstack/compute/v2/floatingip_test.go b/acceptance/openstack/compute/v2/floatingip_test.go
index 32f9a04..de6efc9 100644
--- a/acceptance/openstack/compute/v2/floatingip_test.go
+++ b/acceptance/openstack/compute/v2/floatingip_test.go
@@ -71,11 +71,11 @@
FloatingIP: fip.IP,
}
- err := floatingip.AssociateFloatingIP(client, associateOpts).ExtractErr()
+ err := floatingip.AssociateInstance(client, associateOpts).ExtractErr()
th.AssertNoErr(t, err)
t.Logf("Associated floating IP %v from instance %v", fip.IP, serverId)
defer func() {
- err = floatingip.DisassociateFloatingIP(client, associateOpts).ExtractErr()
+ err = floatingip.DisassociateInstance(client, associateOpts).ExtractErr()
th.AssertNoErr(t, err)
t.Logf("Disassociated floating IP %v from instance %v", fip.IP, serverId)
}()
@@ -108,11 +108,11 @@
FixedIP: fixedIP,
}
- err = floatingip.AssociateFloatingIP(client, associateOpts).ExtractErr()
+ err = floatingip.AssociateInstance(client, associateOpts).ExtractErr()
th.AssertNoErr(t, err)
t.Logf("Associated floating IP %v from instance %v with Fixed IP %v", fip.IP, serverId, fixedIP)
defer func() {
- err = floatingip.DisassociateFloatingIP(client, associateOpts).ExtractErr()
+ err = floatingip.DisassociateInstance(client, associateOpts).ExtractErr()
th.AssertNoErr(t, err)
t.Logf("Disassociated floating IP %v from instance %v with Fixed IP %v", fip.IP, serverId, fixedIP)
}()
diff --git a/openstack/compute/v2/extensions/floatingip/requests.go b/openstack/compute/v2/extensions/floatingip/requests.go
index 941dc3b..8206462 100644
--- a/openstack/compute/v2/extensions/floatingip/requests.go
+++ b/openstack/compute/v2/extensions/floatingip/requests.go
@@ -100,7 +100,7 @@
// association / disassociation
// Associate pairs an allocated floating IP with an instance
-// Deprecated. Use AssociateFloatingIP.
+// Deprecated. Use AssociateInstance.
func Associate(client *gophercloud.ServiceClient, serverId, fip string) AssociateResult {
var res AssociateResult
@@ -112,8 +112,8 @@
return res
}
-// AssociateFloatingIP pairs an allocated floating IP with an instance.
-func AssociateFloatingIP(client *gophercloud.ServiceClient, opts AssociateOpts) AssociateResult {
+// AssociateInstance pairs an allocated floating IP with an instance.
+func AssociateInstance(client *gophercloud.ServiceClient, opts AssociateOpts) AssociateResult {
var res AssociateResult
associateInfo, err := opts.ToAssociateMap()
@@ -138,7 +138,7 @@
}
// Disassociate decouples an allocated floating IP from an instance
-// Deprecated. Use DisassociateFloatingIP.
+// Deprecated. Use DisassociateInstance.
func Disassociate(client *gophercloud.ServiceClient, serverId, fip string) DisassociateResult {
var res DisassociateResult
@@ -150,8 +150,8 @@
return res
}
-// DisassociateFloatingIP decouples an allocated floating IP from an instance
-func DisassociateFloatingIP(client *gophercloud.ServiceClient, opts AssociateOpts) DisassociateResult {
+// DisassociateInstance decouples an allocated floating IP from an instance
+func DisassociateInstance(client *gophercloud.ServiceClient, opts AssociateOpts) DisassociateResult {
var res DisassociateResult
associateInfo, err := opts.ToAssociateMap()
diff --git a/openstack/compute/v2/extensions/floatingip/requests_test.go b/openstack/compute/v2/extensions/floatingip/requests_test.go
index b92496b..4d86fe2 100644
--- a/openstack/compute/v2/extensions/floatingip/requests_test.go
+++ b/openstack/compute/v2/extensions/floatingip/requests_test.go
@@ -78,7 +78,7 @@
FloatingIP: "10.10.10.2",
}
- err := AssociateFloatingIP(client.ServiceClient(), associateOpts).ExtractErr()
+ err := AssociateInstance(client.ServiceClient(), associateOpts).ExtractErr()
th.AssertNoErr(t, err)
}
@@ -93,7 +93,7 @@
FixedIP: "166.78.185.201",
}
- err := AssociateFloatingIP(client.ServiceClient(), associateOpts).ExtractErr()
+ err := AssociateInstance(client.ServiceClient(), associateOpts).ExtractErr()
th.AssertNoErr(t, err)
}
@@ -108,7 +108,7 @@
th.AssertNoErr(t, err)
}
-func TestDisassociateFloatingIP(t *testing.T) {
+func TestDisassociateInstance(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
HandleDisassociateSuccessfully(t)
@@ -118,6 +118,6 @@
FloatingIP: "10.10.10.2",
}
- err := DisassociateFloatingIP(client.ServiceClient(), associateOpts).ExtractErr()
+ err := DisassociateInstance(client.ServiceClient(), associateOpts).ExtractErr()
th.AssertNoErr(t, err)
}