fixes after adding rackspace/gophercloud commits
diff --git a/openstack/compute/v2/extensions/defsecrules/fixtures.go b/openstack/compute/v2/extensions/defsecrules/fixtures.go
index 4fee896..bf708f8 100644
--- a/openstack/compute/v2/extensions/defsecrules/fixtures.go
+++ b/openstack/compute/v2/extensions/defsecrules/fixtures.go
@@ -83,8 +83,8 @@
{
"security_group_default_rule": {
"ip_protocol": "ICMP",
- "from_port": 0,
- "to_port": 0,
+ "from_port": 80,
+ "to_port": 80,
"cidr": "10.10.12.0/24"
}
}
@@ -96,13 +96,13 @@
fmt.Fprintf(w, `
{
"security_group_default_rule": {
- "from_port": 0,
+ "from_port": 80,
"id": "{ruleID}",
"ip_protocol": "ICMP",
"ip_range": {
"cidr": "10.10.12.0/24"
},
- "to_port": 0
+ "to_port": 80
}
}
`)
diff --git a/openstack/compute/v2/extensions/defsecrules/requests.go b/openstack/compute/v2/extensions/defsecrules/requests.go
index 6f24bb3..5d74256 100644
--- a/openstack/compute/v2/extensions/defsecrules/requests.go
+++ b/openstack/compute/v2/extensions/defsecrules/requests.go
@@ -14,7 +14,7 @@
// CreateOpts represents the configuration for adding a new default rule.
type CreateOpts struct {
- // The lower bound of the port range that will be opened.
+ // The lower bound of the port range that will be opened.s
FromPort int `json:"from_port" required:"true"`
// The upper bound of the port range that will be opened.
ToPort int `json:"to_port" required:"true"`
diff --git a/openstack/compute/v2/extensions/defsecrules/requests_test.go b/openstack/compute/v2/extensions/defsecrules/requests_test.go
index df568fe..3cbc990 100644
--- a/openstack/compute/v2/extensions/defsecrules/requests_test.go
+++ b/openstack/compute/v2/extensions/defsecrules/requests_test.go
@@ -77,8 +77,8 @@
opts := CreateOpts{
IPProtocol: "ICMP",
- FromPort: 0,
- ToPort: 0,
+ FromPort: 80,
+ ToPort: 80,
CIDR: "10.10.12.0/24",
}
@@ -87,8 +87,8 @@
expected := &DefaultRule{
ID: ruleID,
- FromPort: 0,
- ToPort: 0,
+ FromPort: 80,
+ ToPort: 80,
IPProtocol: "ICMP",
IPRange: secgroups.IPRange{CIDR: "10.10.12.0/24"},
}