fixes for failing unit tests after changes
diff --git a/openstack/networking/v2/extensions/external/requests.go b/openstack/networking/v2/extensions/external/requests.go
index f626f66..1ee39d2 100644
--- a/openstack/networking/v2/extensions/external/requests.go
+++ b/openstack/networking/v2/extensions/external/requests.go
@@ -10,7 +10,7 @@
// and optional fields, with the addition of the External field.
type CreateOpts struct {
networks.CreateOpts
- External *bool `json:"router:extenal,omitempty"`
+ External *bool `json:"router:external,omitempty"`
}
// ToNetworkCreateMap casts a CreateOpts struct to a map.
@@ -22,8 +22,8 @@
// resources. It embeds networks.UpdateOpts and so inherits all of its required
// and optional fields, with the addition of the External field.
type UpdateOpts struct {
- Parent networks.UpdateOpts
- External *bool `json:"router:extenal,omitempty"`
+ networks.UpdateOpts
+ External *bool `json:"router:external,omitempty"`
}
// ToNetworkUpdateMap casts an UpdateOpts struct to a map.
diff --git a/openstack/networking/v2/extensions/external/results_test.go b/openstack/networking/v2/extensions/external/results_test.go
index 8e5200a..5187d2e 100644
--- a/openstack/networking/v2/extensions/external/results_test.go
+++ b/openstack/networking/v2/extensions/external/results_test.go
@@ -10,6 +10,7 @@
"github.com/gophercloud/gophercloud/pagination"
th "github.com/gophercloud/gophercloud/testhelper"
fake "github.com/gophercloud/gophercloud/testhelper/client"
+ "github.com/rackspace/gophercloud"
)
func TestList(t *testing.T) {
@@ -174,7 +175,7 @@
`)
})
- options := CreateOpts{networks.CreateOpts{Name: "ext_net", AdminStateUp: Up}, true}
+ options := CreateOpts{networks.CreateOpts{Name: "ext_net", AdminStateUp: gophercloud.Enabled}, gophercloud.Enabled}
res := networks.Create(fake.ServiceClient(), options)
n, err := ExtractCreate(res)
@@ -222,7 +223,7 @@
`)
})
- options := UpdateOpts{networks.UpdateOpts{Name: "new_name"}, true}
+ options := UpdateOpts{networks.UpdateOpts{Name: "new_name"}, gophercloud.Enabled}
res := networks.Update(fake.ServiceClient(), "4e8e5957-649f-477b-9e5b-f1f75b21c03c", options)
n, err := ExtractUpdate(res)