Class: Conjur::Host

Inherits:
RestClient::Resource
  • Object
show all
Includes:
ActsAsResource, ActsAsUser, Exists, HasAttributes, HasId, HasIdentifier
Defined in:
lib/conjur/host.rb

Instance Method Summary collapse

Methods included from ActsAsResource

#delete, #resource, #resource_id, #resource_kind

Methods included from ActsAsUser

included

Methods included from HasAttributes

#attributes, #attributes=, #refresh, #save, #to_json

Methods included from HasIdentifier

#identifier, included

Methods included from HasId

#id, #to_json

Methods included from Exists

#exists?

Instance Method Details

#api_keyObject



14
15
16
# File 'lib/conjur/host.rb', line 14

def api_key
  self.attributes['api_key']
end

#enrollment_urlObject



18
19
20
21
22
23
# File 'lib/conjur/host.rb', line 18

def enrollment_url
  log do |logger|
    logger << "Fetching enrollment_url for #{id}"
  end
  self['enrollment_url'].head{|response, request, result| response }.headers[:location]
end

#loginObject



10
11
12
# File 'lib/conjur/host.rb', line 10

def 
  [ 'host', id ].join('/')
end