cp_mgmt 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cp_mgmt/access_layer.rb +3 -2
- data/lib/cp_mgmt/host.rb +3 -2
- data/lib/cp_mgmt/network.rb +3 -2
- 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: 8418b1b92ff9efe6d59b624c56b7da3a0cde37e6a354b85a1f8867d362df9b75
|
|
4
|
+
data.tar.gz: 74c86e53286bfab4e0b7ea33e73787477a93e09abe4cfdfa1d4febf0f98142e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 578ac872f78ef62c168e2d7cc552924d8e846ef5bb4673f92ed9b40f440716ba6da18ec52d527b1d5f465e75303a9983d6d1e7589624c58c5ec16b3f00cb6010
|
|
7
|
+
data.tar.gz: e49d2b1b3c0f47e9f682a0db0ff4a936bcb4eb7d49fb303dad139523ad7028894646496c3dad5fe2e6ed2583b623e413ade3c17ed95830756012bebac5b0e58a
|
data/Gemfile.lock
CHANGED
data/lib/cp_mgmt/access_layer.rb
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
module CpMgmt
|
|
2
2
|
class AccessLayer
|
|
3
3
|
# Adds a access-layer
|
|
4
|
-
def add(name)
|
|
4
|
+
def add(name, options={})
|
|
5
5
|
client = CpMgmt.configuration.client
|
|
6
6
|
CpMgmt.logged_in?
|
|
7
|
+
params = {name: name}
|
|
8
|
+
body = params.merge(options).to_json
|
|
7
9
|
|
|
8
|
-
body = {name: name}.to_json
|
|
9
10
|
response = client.post do |req|
|
|
10
11
|
req.url '/web_api/add-access-layer'
|
|
11
12
|
req.headers['Content-Type'] = 'application/json'
|
data/lib/cp_mgmt/host.rb
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
module CpMgmt
|
|
2
2
|
class Host
|
|
3
3
|
# Adds a host
|
|
4
|
-
def add(name, ip_address)
|
|
4
|
+
def add(name, ip_address, options={})
|
|
5
5
|
client = CpMgmt.configuration.client
|
|
6
6
|
CpMgmt.logged_in?
|
|
7
|
+
params = {name: name, "ip-address": ip_address}
|
|
8
|
+
body = params.merge(options).to_json
|
|
7
9
|
|
|
8
|
-
body = {name: name, "ip-address": ip_address}.to_json
|
|
9
10
|
response = client.post do |req|
|
|
10
11
|
req.url '/web_api/add-host'
|
|
11
12
|
req.headers['Content-Type'] = 'application/json'
|
data/lib/cp_mgmt/network.rb
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
module CpMgmt
|
|
2
2
|
class Network
|
|
3
3
|
# Adds a network
|
|
4
|
-
def add(name, subnet, subnet_mask)
|
|
4
|
+
def add(name, subnet, subnet_mask, options={})
|
|
5
5
|
client = CpMgmt.configuration.client
|
|
6
6
|
CpMgmt.logged_in?
|
|
7
|
+
params = {name: name, subnet: subnet, "subnet-mask": subnet_mask}
|
|
8
|
+
body = params.merge(options).to_json
|
|
7
9
|
|
|
8
|
-
body = {name: name, subnet: subnet, "subnet-mask": subnet_mask}.to_json
|
|
9
10
|
response = client.post do |req|
|
|
10
11
|
req.url '/web_api/add-network'
|
|
11
12
|
req.headers['Content-Type'] = 'application/json'
|
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.2
|
|
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-11-
|
|
11
|
+
date: 2018-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|