Class: OpenStack::Identity::Connection
- Defined in:
- lib/openstack/identity/connection.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
Instance Method Summary collapse
- #delete_user(id) ⇒ Object
-
#initialize(connection) ⇒ Connection
constructor
A new instance of Connection.
- #list_users ⇒ Object (also: #users)
Constructor Details
#initialize(connection) ⇒ Connection
Returns a new instance of Connection.
9 10 11 12 13 |
# File 'lib/openstack/identity/connection.rb', line 9 def initialize(connection) @connection = connection OpenStack::Authentication.init(@connection) extend @connection.auth_path.match(/v3/) ? OpenStack::Identity::ConnectionV3 : OpenStack::Identity::ConnectionV2 end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
7 8 9 |
# File 'lib/openstack/identity/connection.rb', line 7 def connection @connection end |
Instance Method Details
#delete_user(id) ⇒ Object
22 23 24 25 |
# File 'lib/openstack/identity/connection.rb', line 22 def delete_user(id) @connection.req('DELETE', "/users/#{id}") true end |