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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/cp_mgmt.rb +1 -1
- data/lib/cp_mgmt/configuration.rb +2 -1
- data/lib/cp_mgmt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c70d00c303fe964135cbc5205da09740a9163c27c773831e16bf8ba154d6dfc1
|
4
|
+
data.tar.gz: b15ef6a07ad33554a03e956ac64bd8fefa8bad7456810ff2e4894a56fc8598a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaaab1ce717612d502718921adb10578a2137c6da21ac47ff1f562fcdec436e4fa6c9a504b0c0e16fbe5c962a50ef22245363497c51becbccb0194c464c141e4
|
7
|
+
data.tar.gz: f793273ea422537fd2122f8662e6ddad4e1ddd413199b22f6967544c68bb8493986d66186a5632805ae9bce2828ce0c20f70604dacb480a3bfd7cb14cd12682b
|
data/Gemfile.lock
CHANGED
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
|
|
data/lib/cp_mgmt.rb
CHANGED
@@ -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
|
data/lib/cp_mgmt/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|