Rename v2_0 and add remaining boilerplate
diff --git a/openstack/networking/v2/networks/doc.go b/openstack/networking/v2/networks/doc.go
new file mode 100644
index 0000000..83c4a6a
--- /dev/null
+++ b/openstack/networking/v2/networks/doc.go
@@ -0,0 +1 @@
+package networks
diff --git a/openstack/networking/v2/networks/errors.go b/openstack/networking/v2/networks/errors.go
new file mode 100644
index 0000000..83c4a6a
--- /dev/null
+++ b/openstack/networking/v2/networks/errors.go
@@ -0,0 +1 @@
+package networks
diff --git a/openstack/networking/v2/networks/requests.go b/openstack/networking/v2/networks/requests.go
new file mode 100644
index 0000000..b74608b
--- /dev/null
+++ b/openstack/networking/v2/networks/requests.go
@@ -0,0 +1,17 @@
+package networks
+
+// User-defined options sent to the API when creating or updating a network.
+type NetworkOpts struct {
+ // The administrative state of the network, which is up (true) or down (false).
+ AdminStateUp bool `json:"admin_state_up"`
+ // The network name (optional)
+ Name string `json:"name"`
+ // Indicates whether this network is shared across all tenants. By default,
+ // only administrative users can change this value.
+ Shared bool `json:"shared"`
+ // Admin-only. The UUID of the tenant that will own the network. This tenant
+ // can be different from the tenant that makes the create network request.
+ // However, only administrative users can specify a tenant ID other than their
+ // own. You cannot change this value through authorization policies.
+ TenantID string `json:"tenant_id"`
+}
diff --git a/openstack/networking/v2/networks/requests_test.go b/openstack/networking/v2/networks/requests_test.go
new file mode 100644
index 0000000..083ca59
--- /dev/null
+++ b/openstack/networking/v2/networks/requests_test.go
@@ -0,0 +1,17 @@
+package networks
+
+import (
+ "github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/testhelper"
+)
+
+const TokenID = "123"
+
+func ServiceClient() *gophercloud.ServiceClient {
+ return &gophercloud.ServiceClient{
+ Provider: &gophercloud.ProviderClient{
+ TokenID: TokenID,
+ },
+ Endpoint: testhelper.Endpoint(),
+ }
+}
diff --git a/openstack/networking/v2/networks/results.go b/openstack/networking/v2/networks/results.go
new file mode 100644
index 0000000..dddeed7
--- /dev/null
+++ b/openstack/networking/v2/networks/results.go
@@ -0,0 +1,27 @@
+package networks
+
+// A Network represents a a virtual layer-2 broadcast domain.
+type Network struct {
+ // Id is the unique identifier for the network.
+ Id string `json:"id"`
+ // Name is the (not necessarily unique) human-readable identifier for the network.
+ Name string `json:"name"`
+ // AdminStateUp is administrative state of the network. If false, network is down.
+ AdminStateUp bool `json:"admin_state_up"`
+ // Status indicates if the network is operational. Possible values: active, down, build, error.
+ Status string `json:"status"`
+ // Subnets are IP address blocks that can be used to assign IP addresses to virtual instances.
+ Subnets []string `json:"subnets"`
+ // Shared indicates whether the network can be accessed by any tenant or not.
+ Shared bool `json:"shared"`
+ // TenantId is the owner of the network. Admins may specify TenantId other than their own.
+ TenantId string `json:"tenant_id"`
+ // RouterExternal indicates if the network is connected to an external router.
+ RouterExternal bool `json:"router:external"`
+ // ProviderPhysicalNetwork is the name of the provider physical network.
+ ProviderPhysicalNetwork string `json:"provider:physical_network"`
+ // ProviderNetworkType is the type of provider network (eg "vlan").
+ ProviderNetworkType string `json:"provider:network_type"`
+ // ProviderSegmentationId is the provider network identifier (such as the vlan id).
+ ProviderSegmentationId string `json:"provider:segmentation_id"`
+}
diff --git a/openstack/networking/v2/networks/results_test.go b/openstack/networking/v2/networks/results_test.go
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/openstack/networking/v2/networks/results_test.go
diff --git a/openstack/networking/v2/networks/urls.go b/openstack/networking/v2/networks/urls.go
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/openstack/networking/v2/networks/urls.go
diff --git a/openstack/networking/v2/networks/urls_test.go b/openstack/networking/v2/networks/urls_test.go
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/openstack/networking/v2/networks/urls_test.go