weak decode NetworkExtAttrs
diff --git a/openstack/networking/v2/extensions/external/results.go b/openstack/networking/v2/extensions/external/results.go
index 1c173c0..54dbf4b 100644
--- a/openstack/networking/v2/extensions/external/results.go
+++ b/openstack/networking/v2/extensions/external/results.go
@@ -68,7 +68,7 @@
}
// ExtractList accepts a Page struct, specifically a NetworkPage struct, and
-// extracts the elements into a slice of NetworkExtAttrs structs. In other
+// extracts the elements into a slice of NetworkExternal structs. In other
// words, a generic collection is mapped into a relevant slice.
func ExtractList(page pagination.Page) ([]NetworkExternal, error) {
var resp struct {
diff --git a/openstack/networking/v2/extensions/provider/results.go b/openstack/networking/v2/extensions/provider/results.go
index 3453584..f07d628 100755
--- a/openstack/networking/v2/extensions/provider/results.go
+++ b/openstack/networking/v2/extensions/provider/results.go
@@ -73,7 +73,7 @@
Network *NetworkExtAttrs `json:"network"`
}
- err := mapstructure.Decode(r.Body, &res)
+ err := mapstructure.WeakDecode(r.Body, &res)
return res.Network, err
}
@@ -89,7 +89,7 @@
Network *NetworkExtAttrs `json:"network"`
}
- err := mapstructure.Decode(r.Body, &res)
+ err := mapstructure.WeakDecode(r.Body, &res)
return res.Network, err
}
@@ -105,7 +105,7 @@
Network *NetworkExtAttrs `json:"network"`
}
- err := mapstructure.Decode(r.Body, &res)
+ err := mapstructure.WeakDecode(r.Body, &res)
return res.Network, err
}
@@ -118,7 +118,7 @@
Networks []NetworkExtAttrs `mapstructure:"networks" json:"networks"`
}
- err := mapstructure.Decode(page.(networks.NetworkPage).Body, &resp)
+ err := mapstructure.WeakDecode(page.(networks.NetworkPage).Body, &resp)
return resp.Networks, err
}
diff --git a/openstack/networking/v2/extensions/provider/results_test.go b/openstack/networking/v2/extensions/provider/results_test.go
index 9801b2e..8081692 100644
--- a/openstack/networking/v2/extensions/provider/results_test.go
+++ b/openstack/networking/v2/extensions/provider/results_test.go
@@ -49,7 +49,7 @@
"tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
"shared": true,
"id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
- "provider:segmentation_id": null,
+ "provider:segmentation_id": 1234567890,
"provider:physical_network": null,
"provider:network_type": "local"
}
@@ -91,7 +91,7 @@
ID: "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
NetworkType: "local",
PhysicalNetwork: "",
- SegmentationID: "",
+ SegmentationID: "1234567890",
},
}