Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Use correct endpoint.
Browse files Browse the repository at this point in the history
Openstack API docs are wrong.
  • Loading branch information
Samuel A. Falvo II committed Mar 4, 2014
1 parent dcad519 commit c61289e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func (gsp *genericServersProvider) DeleteSecurityGroupById(id int) error {
func (gsp *genericServersProvider) ListDefaultSGRules() ([]SGRule, error) {
var sgrs []SGRule
err := gsp.context.WithReauth(gsp.access, func() error {
ep := fmt.Sprintf("%s/os-security-group-rules", gsp.endpoint)
ep := fmt.Sprintf("%s/os-security-group-default-rules", gsp.endpoint)
return perigee.Get(ep, perigee.Options{
MoreHeaders: map[string]string{
"X-Auth-Token": gsp.access.AuthToken(),
Expand All @@ -505,7 +505,7 @@ func (gsp *genericServersProvider) ListDefaultSGRules() ([]SGRule, error) {
func (gsp *genericServersProvider) CreateDefaultSGRule(r SGRule) (*SGRule, error) {
var sgr *SGRule
err := gsp.context.WithReauth(gsp.access, func() error {
ep := fmt.Sprintf("%s/os-security-group-rules", gsp.endpoint)
ep := fmt.Sprintf("%s/os-security-group-default-rules", gsp.endpoint)
return perigee.Post(ep, perigee.Options{
MoreHeaders: map[string]string{
"X-Auth-Token": gsp.access.AuthToken(),
Expand All @@ -521,7 +521,7 @@ func (gsp *genericServersProvider) CreateDefaultSGRule(r SGRule) (*SGRule, error
func (gsp *genericServersProvider) GetSGRule(id string) (*SGRule, error) {
var sgr *SGRule
err := gsp.context.WithReauth(gsp.access, func() error {
ep := fmt.Sprintf("%s/os-security-group-rules/%s", gsp.endpoint, id)
ep := fmt.Sprintf("%s/os-security-group-default-rules/%s", gsp.endpoint, id)
return perigee.Get(ep, perigee.Options{
MoreHeaders: map[string]string{
"X-Auth-Token": gsp.access.AuthToken(),
Expand Down

0 comments on commit c61289e

Please sign in to comment.