Adding initial file structure and list def rules
diff --git a/openstack/compute/v2/extensions/defsecrules/results.go b/openstack/compute/v2/extensions/defsecrules/results.go
new file mode 100644
index 0000000..ae46b59
--- /dev/null
+++ b/openstack/compute/v2/extensions/defsecrules/results.go
@@ -0,0 +1,37 @@
+package defsecrules
+
+import (
+ "github.com/mitchellh/mapstructure"
+
+ "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/secgroups"
+ "github.com/rackspace/gophercloud/pagination"
+)
+
+type DefaultRule secgroups.Rule
+
+// DefaultRulePage is a single page of a DefaultRule collection.
+type DefaultRulePage struct {
+ pagination.SinglePageBase
+}
+
+// IsEmpty determines whether or not a page of default rules contains any results.
+func (page DefaultRulePage) IsEmpty() (bool, error) {
+ users, err := ExtractDefaultRules(page)
+ if err != nil {
+ return false, err
+ }
+ return len(users) == 0, nil
+}
+
+// ExtractDefaultRules returns a slice of DefaultRules contained in a single
+// page of results.
+func ExtractDefaultRules(page pagination.Page) ([]DefaultRule, error) {
+ casted := page.(DefaultRulePage).Body
+ var response struct {
+ Rules []DefaultRule `mapstructure:"security_group_default_rules"`
+ }
+
+ err := mapstructure.Decode(casted, &response)
+
+ return response.Rules, err
+}