Class: Kakin::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/kakin/configuration.rb

Class Method Summary collapse

Class Method Details

.management_urlObject



4
5
6
# File 'lib/kakin/configuration.rb', line 4

def self.management_url
  @@_management_url
end

.setupObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/kakin/configuration.rb', line 12

def self.setup
  yaml = YAML.load_file(File.expand_path('~/.kakin'))

  @@_management_url = yaml['management_url']
  @@_tenant = yaml['tenant']

  Yao.configure do
    auth_url yaml['auth_url']
    tenant_name yaml['tenant']
    username yaml['username']
    password yaml['password']
    timeout yaml['timeout'] if yaml['timeout']
    client_cert yaml['client_cert'] if yaml['client_cert']
    client_key yaml['client_key'] if yaml['client_key']
  end
end

.tenantObject



8
9
10
# File 'lib/kakin/configuration.rb', line 8

def self.tenant
  @@_tenant
end