cp_mgmt 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 527712cc6da5b1de3b867ab77542f0009ce17657e40c1a20ea91fff53301450c
4
- data.tar.gz: 16025407eb4a10fedaa505f645635590ac65bd389269282395137d02c2c5b868
3
+ metadata.gz: c70d00c303fe964135cbc5205da09740a9163c27c773831e16bf8ba154d6dfc1
4
+ data.tar.gz: b15ef6a07ad33554a03e956ac64bd8fefa8bad7456810ff2e4894a56fc8598a6
5
5
  SHA512:
6
- metadata.gz: 1942c25adc49b77f32ac5987abaf4a9351d1acf68f7a9ede638641d9c60f4cfa95ddd74e118b048c94cdae5682454987258788f3fcf23d8789e60d574409f059
7
- data.tar.gz: b15a5cc9542cba13fe337b55bba7a7f6f8c2b35c0bffca962c46609f2b4049f22ee1ffbb06c12dcbcb687e49946659eaa0ad243fde5ce17854bc3b624d61e584
6
+ metadata.gz: aaaab1ce717612d502718921adb10578a2137c6da21ac47ff1f562fcdec436e4fa6c9a504b0c0e16fbe5c962a50ef22245363497c51becbccb0194c464c141e4
7
+ data.tar.gz: f793273ea422537fd2122f8662e6ddad4e1ddd413199b22f6967544c68bb8493986d66186a5632805ae9bce2828ce0c20f70604dacb480a3bfd7cb14cd12682b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cp_mgmt (1.0.3)
4
+ cp_mgmt (1.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -25,13 +25,14 @@ Or install it yourself as:
25
25
 
26
26
  ## Setup
27
27
 
28
- Add the following to an initializer. You can create a new one or add it to an exsisting.
28
+ Add the following to an initializer. You can create a new one or add it to an exsisting. If you are not using with an MDS set `config.mgmt_domain` to nil.
29
29
 
30
30
  ```
31
31
  CpMgmt.configure do |config|
32
32
  config.mgmt_server_url = 'https://server.ip'
33
33
  config.mgmt_user = 'admin'
34
34
  config.mgmt_pass = 'some_password'
35
+ config.mgmt_domain = 'mds_domain_name'
35
36
  end
36
37
  ```
37
38
 
@@ -45,7 +45,7 @@ module CpMgmt
45
45
  # Uses the above client to login to the API and set the sid in the env.
46
46
  def self.login
47
47
  client = self.configuration.client
48
- body = {user: self.configuration.mgmt_user, password: self.configuration.mgmt_pass}
48
+ body = {user: self.configuration.mgmt_user, password: self.configuration.mgmt_pass, domain: self.configuration.mgmt_domain}
49
49
  response = client.post do |req|
50
50
  req.url '/web_api/login'
51
51
  req.headers['Content-Type'] = 'application/json'
@@ -1,11 +1,12 @@
1
1
  module CpMgmt
2
2
  class Configuration
3
- attr_accessor :mgmt_server_url, :mgmt_user, :mgmt_pass, :client
3
+ attr_accessor :mgmt_server_url, :mgmt_user, :mgmt_pass, :mgmt_domain, :client
4
4
 
5
5
  def initialize
6
6
  @mgmt_server_url = "https://192.168.0.8"
7
7
  @mgmt_user = "admin"
8
8
  @mgmt_pass = "vpn123"
9
+ @mgmt_domain = nil
9
10
  @client = Faraday.new(:url => self.mgmt_server_url, :ssl => {:verify => false}) do |faraday|
10
11
  faraday.request :url_encoded # form-encode POST params
11
12
  faraday.response :logger # log requests to $stdout
@@ -1,3 +1,3 @@
1
1
  module CpMgmt
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cp_mgmt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Forester
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-04 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler