diff --git a/openstack/networking/v2/extensions/external/requests.go b/openstack/networking/v2/extensions/external/requests.go
index a29c2fa..f195cfa 100644
--- a/openstack/networking/v2/extensions/external/requests.go
+++ b/openstack/networking/v2/extensions/external/requests.go
@@ -19,27 +19,23 @@
 	External bool
 }
 
-func (o CreateOpts) ToMap() map[string]map[string]interface{} {
-	outer := o.Parent.ToMap()
+func (o CreateOpts) ToNetworkCreateMap() map[string]map[string]interface{} {
+	outer := o.Parent.ToNetworkCreateMap()
 
 	outer["network"]["router:external"] = o.External
 
 	return outer
 }
 
-func (o CreateOpts) IsCreateOpts() bool { return true }
-
 type UpdateOpts struct {
 	Parent   networks.UpdateOpts
 	External bool
 }
 
-func (o UpdateOpts) ToMap() map[string]map[string]interface{} {
-	outer := o.Parent.ToMap()
+func (o UpdateOpts) ToNetworkUpdateMap() map[string]map[string]interface{} {
+	outer := o.Parent.ToNetworkUpdateMap()
 
 	outer["network"]["router:external"] = o.External
 
 	return outer
 }
-
-func (o UpdateOpts) IsUpdateOpts() bool { return true }
diff --git a/openstack/networking/v2/networks/requests.go b/openstack/networking/v2/networks/requests.go
index 8b28291..6088b36 100644
--- a/openstack/networking/v2/networks/requests.go
+++ b/openstack/networking/v2/networks/requests.go
@@ -1,8 +1,6 @@
 package networks
 
 import (
-	"fmt"
-
 	"github.com/racker/perigee"
 	"github.com/rackspace/gophercloud"
 	"github.com/rackspace/gophercloud/pagination"
@@ -59,14 +57,13 @@
 	return res
 }
 
-type CreateOptsInt interface {
-	ToMap() map[string]map[string]interface{}
-	IsCreateOpts() bool
+type CreateOptsBuilder interface {
+	ToNetworkCreateMap() map[string]map[string]interface{}
 }
 
 type CreateOpts networkOpts
 
-func (o CreateOpts) ToMap() map[string]map[string]interface{} {
+func (o CreateOpts) ToNetworkCreateMap() map[string]map[string]interface{} {
 	inner := make(map[string]interface{})
 
 	if o.AdminStateUp != nil {
@@ -88,8 +85,6 @@
 	return outer
 }
 
-func (o CreateOpts) IsCreateOpts() bool { return true }
-
 // Create accepts a CreateOpts struct and creates a new network using the values
 // provided. This operation does not actually require a request body, i.e. the
 // CreateOpts struct argument can be empty.
@@ -97,15 +92,10 @@
 // The tenant ID that is contained in the URI is the tenant that creates the
 // network. An admin user, however, has the option of specifying another tenant
 // ID in the CreateOpts struct.
-func Create(c *gophercloud.ServiceClient, opts CreateOptsInt) CreateResult {
+func Create(c *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult {
 	var res CreateResult
 
-	if opts.IsCreateOpts() != true {
-		res.Err = fmt.Errorf("Must provide valid create opts")
-		return res
-	}
-
-	reqBody := opts.ToMap()
+	reqBody := opts.ToNetworkCreateMap()
 
 	// Send request to API
 	_, res.Err = perigee.Request("POST", createURL(c), perigee.Options{
@@ -117,14 +107,13 @@
 	return res
 }
 
-type UpdateOptsInt interface {
-	ToMap() map[string]map[string]interface{}
-	IsUpdateOpts() bool
+type UpdateOptsBuilder interface {
+	ToNetworkUpdateMap() map[string]map[string]interface{}
 }
 
 type UpdateOpts networkOpts
 
-func (o UpdateOpts) ToMap() map[string]map[string]interface{} {
+func (o UpdateOpts) ToNetworkUpdateMap() map[string]map[string]interface{} {
 	inner := make(map[string]interface{})
 
 	if o.AdminStateUp != nil {
@@ -143,19 +132,12 @@
 	return outer
 }
 
-func (o UpdateOpts) IsUpdateOpts() bool { return true }
-
 // Update accepts a UpdateOpts struct and updates an existing network using the
 // values provided. For more information, see the Create function.
-func Update(c *gophercloud.ServiceClient, networkID string, opts UpdateOptsInt) UpdateResult {
+func Update(c *gophercloud.ServiceClient, networkID string, opts UpdateOptsBuilder) UpdateResult {
 	var res UpdateResult
 
-	if opts.IsUpdateOpts() != true {
-		res.Err = fmt.Errorf("Must provide valid update opts")
-		return res
-	}
-
-	reqBody := opts.ToMap()
+	reqBody := opts.ToNetworkUpdateMap()
 
 	// Send request to API
 	_, res.Err = perigee.Request("PUT", getURL(c, networkID), perigee.Options{
