Adding remaining weak decode
diff --git a/openstack/compute/v2/extensions/defsecrules/results.go b/openstack/compute/v2/extensions/defsecrules/results.go
index 8404b82..e588d3e 100644
--- a/openstack/compute/v2/extensions/defsecrules/results.go
+++ b/openstack/compute/v2/extensions/defsecrules/results.go
@@ -34,7 +34,7 @@
Rules []DefaultRule `mapstructure:"security_group_default_rules"`
}
- err := mapstructure.Decode(casted, &response)
+ err := mapstructure.WeakDecode(casted, &response)
return response.Rules, err
}
@@ -63,7 +63,7 @@
Rule DefaultRule `mapstructure:"security_group_default_rule"`
}
- err := mapstructure.Decode(r.Body, &response)
+ err := mapstructure.WeakDecode(r.Body, &response)
return &response.Rule, err
}
diff --git a/openstack/compute/v2/extensions/secgroups/results.go b/openstack/compute/v2/extensions/secgroups/results.go
index a360782..478c5dc 100644
--- a/openstack/compute/v2/extensions/secgroups/results.go
+++ b/openstack/compute/v2/extensions/secgroups/results.go
@@ -87,7 +87,8 @@
SecurityGroups []SecurityGroup `mapstructure:"security_groups"`
}
- err := mapstructure.Decode(casted, &response)
+ err := mapstructure.WeakDecode(casted, &response)
+
return response.SecurityGroups, err
}
@@ -140,7 +141,7 @@
Rule Rule `mapstructure:"security_group_rule"`
}
- err := mapstructure.Decode(r.Body, &response)
+ err := mapstructure.WeakDecode(r.Body, &response)
return &response.Rule, err
}