Class: CpMgmt::Configuration
- Inherits:
-
Object
- Object
- CpMgmt::Configuration
- Defined in:
- lib/cp_mgmt/configuration.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#mgmt_domain ⇒ Object
Returns the value of attribute mgmt_domain.
-
#mgmt_pass ⇒ Object
Returns the value of attribute mgmt_pass.
-
#mgmt_server_url ⇒ Object
Returns the value of attribute mgmt_server_url.
-
#mgmt_user ⇒ Object
Returns the value of attribute mgmt_user.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/cp_mgmt/configuration.rb', line 3 def client @client end |
#mgmt_domain ⇒ Object
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_pass ⇒ Object
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_url ⇒ Object
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_user ⇒ Object
Returns the value of attribute mgmt_user.
3 4 5 |
# File 'lib/cp_mgmt/configuration.rb', line 3 def mgmt_user @mgmt_user end |