Merge lp://staging/~jameinel/goose/security-group-rule-group-id-1226996 into lp://staging/goose
Status: | Merged |
---|---|
Approved by: | John A Meinel |
Approved revision: | 119 |
Merged at revision: | 118 |
Proposed branch: | lp://staging/~jameinel/goose/security-group-rule-group-id-1226996 |
Merge into: | lp://staging/goose |
Diff against target: |
62 lines (+12/-5) 2 files modified
testservices/novaservice/service.go (+7/-0) testservices/novaservice/service_test.go (+5/-5) |
To merge this branch: | bzr merge lp://staging/~jameinel/goose/security-group-rule-group-id-1226996 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+186500@code.staging.launchpad.net |
Commit message
panic if we get bad requests
It turns out that if you don't supply CIDR or GroupId Openstack just
sets CIDR to 0.0.0.0/0. We don't want to rely on that behavior, so
this just changes the goose test double to panic if it got that
situation.
This can't land until we land my updated Juju branch (or the test
suite will appropriately fail with panic().)
Description of the change
panic if we get bad requests
It turns out that if you don't supply CIDR or GroupId Openstack just
sets CIDR to 0.0.0.0/0. We don't want to rely on that behavior, so
this just changes the goose test double to panic if it got that
situation.
This can't land until we land my updated Juju branch (or the test
suite will appropriately fail with panic().)
Reviewers: mp+186500_ code.launchpad. net,
Message:
Please take a look.
Description:
panic if we get bad requests
It turns out that if you don't supply CIDR or GroupId Openstack just
sets CIDR to 0.0.0.0/0. We don't want to rely on that behavior, so
this just changes the goose test double to panic if it got that
situation.
This can't land until we land my updated Juju branch (or the test
suite will appropriately fail with panic().)
https:/ /code.launchpad .net/~jameinel/ goose/security- group-rule- group-id- 1226996/ +merge/ 186500
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/13781043/
Affected files (+9, -0 lines): novaservice/ service. go
A [revision details]
M testservices/
Index: [revision details] 20130910084634- qu05mqby3hkd6jp 1
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: testservices/ novaservice/ service. go novaservice/ service. go' novaservice/ service. go 2013-09-04 09:50:54 +0000 novaservice/ service. go 2013-09-18 11:05:12 +0000 TenantId, pad.lv/ 1226996 Sprintf( "Neither Cidr nor GroupId are set for this FromPort = &rule.FromPort
=== modified file 'testservices/
--- testservices/
+++ testservices/
@@ -459,6 +459,13 @@
TenantId: sourceGroup.
Name: sourceGroup.Name,
}
+ } else if rule.Cidr == "" {
+ // http://
+ // It seems that if you don't supply Cidr or GroupId then
+ // Openstack treats the Cidr as 0.0.0.0/0
+ // However, since that is not clearly specified we just panic()
+ // because we don't want to rely on that behavior
+ panic(fmt.
SecurityGroup Rule: %v", rule))
}
if rule.FromPort != 0 {
newrule.