Added the SecurityGroup attribute to servers result
diff --git a/openstack/compute/v2/servers/fixtures.go b/openstack/compute/v2/servers/fixtures.go
index 0164605..6125d53 100644
--- a/openstack/compute/v2/servers/fixtures.go
+++ b/openstack/compute/v2/servers/fixtures.go
@@ -285,6 +285,11 @@
Created: "2014-09-25T13:10:02Z",
TenantID: "fcad67a6189847c4aecfa3c81a05783b",
Metadata: map[string]interface{}{},
+ SecurityGroups: []map[string]interface{}{
+ map[string]interface{}{
+ "name": "default",
+ },
+ },
}
// ServerDerp is a Server struct that should correspond to the second server in ServerListBody.
@@ -336,6 +341,11 @@
Created: "2014-09-25T13:04:41Z",
TenantID: "fcad67a6189847c4aecfa3c81a05783b",
Metadata: map[string]interface{}{},
+ SecurityGroups: []map[string]interface{}{
+ map[string]interface{}{
+ "name": "default",
+ },
+ },
}
)
diff --git a/openstack/compute/v2/servers/results.go b/openstack/compute/v2/servers/results.go
index d63d7c8..1b22f21 100644
--- a/openstack/compute/v2/servers/results.go
+++ b/openstack/compute/v2/servers/results.go
@@ -139,6 +139,9 @@
// AdminPass will generally be empty (""). However, it will contain the administrative password chosen when provisioning a new server without a set AdminPass setting in the first place.
// Note that this is the ONLY time this field will be valid.
AdminPass string `json:"adminPass" mapstructure:"adminPass"`
+
+ // SecurityGroups includes the security groups that this instance has applied to it
+ SecurityGroups []map[string]interface{} `json:"security_groups" mapstructure:"security_groups"`
}
// ServerPage abstracts the raw results of making a List() request against the API.