Skip to content

Commit

Permalink
[openstack|identity] check_token and validate_token - make tenant_id …
Browse files Browse the repository at this point in the history
…optional

Fixes fog#3493
  • Loading branch information
dhague committed Mar 20, 2015
1 parent 5256636 commit 413426c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/fog/openstack/requests/identity/check_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module Fog
module Identity
class OpenStack
class Real
def check_token(token_id, tenant_id)
def check_token(token_id, tenant_id=nil)
request(
:expects => [200, 203],
:method => 'HEAD',
:path => "tokens/#{token_id}?belongsTo=#{tenant_id}"
:path => "tokens/#{token_id}"+(tenant_id ? "?belongsTo=#{tenant_id}" : '')
)
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/fog/openstack/requests/identity/validate_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module Fog
module Identity
class OpenStack
class Real
def validate_token(token_id, tenant_id)
def validate_token(token_id, tenant_id=nil)
request(
:expects => [200, 203],
:method => 'GET',
:path => "tokens/#{token_id}?belongsTo=#{tenant_id}"
:path => "tokens/#{token_id}"+(tenant_id ? "?belongsTo=#{tenant_id}" : '')
)
end
end
Expand Down

0 comments on commit 413426c

Please sign in to comment.