Adding get secgroup
diff --git a/openstack/compute/v2/extensions/secgroups/results.go b/openstack/compute/v2/extensions/secgroups/results.go
index 8f5477e..6418970 100644
--- a/openstack/compute/v2/extensions/secgroups/results.go
+++ b/openstack/compute/v2/extensions/secgroups/results.go
@@ -16,17 +16,24 @@
}
type Rule struct {
- ID string
- FromPort int `mapstructure:"from_port"`
- ToPort int `mapstructure:"to_port"`
- IPProtocol string `mapstructure:"ip_protocol"`
- IPRange IPRange `mapstructure:"ip_range"`
+ ID string
+ FromPort int `mapstructure:"from_port"`
+ ToPort int `mapstructure:"to_port"`
+ IPProtocol string `mapstructure:"ip_protocol"`
+ IPRange IPRange `mapstructure:"ip_range"`
+ ParentGroupID string `mapstructure:"parent_group_id"`
+ Group Group
}
type IPRange struct {
CIDR string
}
+type Group struct {
+ TenantID string `mapstructure:"tenant_id"`
+ Name string
+}
+
// RolePage is a single page of a user Role collection.
type SecurityGroupPage struct {
pagination.SinglePageBase
@@ -60,6 +67,10 @@
commonResult
}
+type GetResult struct {
+ commonResult
+}
+
func (r commonResult) Extract() (*SecurityGroup, error) {
if r.Err != nil {
return nil, r.Err