Feature/filestorage sharenetworks create (#118)
* sfs: Add support for share networks Create
* sfs: Add Manila to acceptance test environment
* sfs: Add acceptance tests for share networks Create
* sfs: Remove unused urls
Some url functions were introduced but they belong to other
PRs. Will be repushed with in the correct PRs
* sfs: Make name and descr required for creating share network
* sfs: Remove required parameters
After taking a close look at the code it appeared that 'name'
and 'description' are not required parameters
diff --git a/openstack/sharedfilesystems/v2/sharenetworks/results.go b/openstack/sharedfilesystems/v2/sharenetworks/results.go
new file mode 100644
index 0000000..9a2891a
--- /dev/null
+++ b/openstack/sharedfilesystems/v2/sharenetworks/results.go
@@ -0,0 +1,52 @@
+package sharenetworks
+
+import "github.com/gophercloud/gophercloud"
+
+// ShareNetwork contains all the information associated with an OpenStack
+// ShareNetwork.
+type ShareNetwork struct {
+ // The Share Network ID
+ ID string `json:"id"`
+ // The UUID of the project where the share network was created
+ ProjectID string `json:"project_id"`
+ // The neutron network ID
+ NeutronNetID string `json:"neutron_net_id"`
+ // The neutron subnet ID
+ NeutronSubnetID string `json:"neutron_subnet_id"`
+ // The nova network ID
+ NovaNetID string `json:"nova_net_id"`
+ // The network type. A valid value is VLAN, VXLAN, GRE or flat
+ NetworkType string `json:"network_type"`
+ // The segmentation ID
+ SegmentationID int `json:"segmentation_id"`
+ // The IP block from which to allocate the network, in CIDR notation
+ CIDR string `json:"cidr"`
+ // The IP version of the network. A valid value is 4 or 6
+ IPVersion int `json:"ip_version"`
+ // The Share Network name
+ Name string `json:"name"`
+ // The Share Network description
+ Description string `json:"description"`
+ // The date and time stamp when the Share Network was created
+ CreatedAt string `json:"created_at"`
+ // The date and time stamp when the Share Network was updated
+ UpdatedAt string `json:"updated_at"`
+}
+
+type commonResult struct {
+ gophercloud.Result
+}
+
+// Extract will get the ShareNetwork object out of the commonResult object.
+func (r commonResult) Extract() (*ShareNetwork, error) {
+ var s struct {
+ ShareNetwork *ShareNetwork `json:"share_network"`
+ }
+ err := r.ExtractInto(&s)
+ return s.ShareNetwork, err
+}
+
+// CreateResult contains the response body and error from a Create request.
+type CreateResult struct {
+ commonResult
+}