Class: LogStash::Outputs::Keystone::KeystoneClient
- Inherits:
-
Object
- Object
- LogStash::Outputs::Keystone::KeystoneClient
- Defined in:
- lib/logstash/outputs/keystone/keystone_client.rb
Instance Method Summary collapse
- #authenticate(domain_id, username, password, project_name) ⇒ Object
-
#initialize(host) ⇒ KeystoneClient
constructor
A new instance of KeystoneClient.
Constructor Details
#initialize(host) ⇒ KeystoneClient
Returns a new instance of KeystoneClient.
31 32 33 34 |
# File 'lib/logstash/outputs/keystone/keystone_client.rb', line 31 def initialize(host) @logger = Cabin::Channel.get(LogStash) @client = get_client(host, '/v3/auth/tokens') end |
Instance Method Details
#authenticate(domain_id, username, password, project_name) ⇒ Object
36 37 38 39 40 |
# File 'lib/logstash/outputs/keystone/keystone_client.rb', line 36 def authenticate(domain_id, username, password, project_name) auth_hash = generate_hash(domain_id, username, password, project_name) response = request(auth_hash) handle_response(response) end |