Class: CpMgmt::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/cp_mgmt/configuration.rb', line 5

def initialize
  @mgmt_server_url = "https://192.168.0.8"
  @mgmt_user = "admin"
  @mgmt_pass = "vpn123"
  @mgmt_domain = nil
  @client = Faraday.new(:url => self.mgmt_server_url, :ssl => {:verify => false}) do |faraday|     
    faraday.request  :url_encoded             # form-encode POST params
    faraday.response :logger                  # log requests to $stdout
    faraday.adapter  Faraday.default_adapter  # make requests with Net::HTTP
  end  
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



3
4
5
# File 'lib/cp_mgmt/configuration.rb', line 3

def client
  @client
end

#mgmt_domainObject

Returns the value of attribute mgmt_domain.



3
4
5
# File 'lib/cp_mgmt/configuration.rb', line 3

def mgmt_domain
  @mgmt_domain
end

#mgmt_passObject

Returns the value of attribute mgmt_pass.



3
4
5
# File 'lib/cp_mgmt/configuration.rb', line 3

def mgmt_pass
  @mgmt_pass
end

#mgmt_server_urlObject

Returns the value of attribute mgmt_server_url.



3
4
5
# File 'lib/cp_mgmt/configuration.rb', line 3

def mgmt_server_url
  @mgmt_server_url
end

#mgmt_userObject

Returns the value of attribute mgmt_user.



3
4
5
# File 'lib/cp_mgmt/configuration.rb', line 3

def mgmt_user
  @mgmt_user
end