Fixes to client setup and build tags
diff --git a/openstack/client.go b/openstack/client.go
index 4fcf057..a73f301 100644
--- a/openstack/client.go
+++ b/openstack/client.go
@@ -293,3 +293,12 @@
}
return &gophercloud.ServiceClient{Provider: client, Endpoint: url}, nil
}
+
+func NewNetworkV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
+ eo.ApplyDefaults("network")
+ url, err := client.EndpointLocator(eo)
+ if err != nil {
+ return nil, err
+ }
+ return &gophercloud.ServiceClient{Provider: client, Endpoint: url}, nil
+}