brocade_vrouter 0.4.1 → 0.4.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/lib/brocade_vrouter/config.rb +1 -1
- data/lib/brocade_vrouter/configurator.rb +3 -2
- data/lib/brocade_vrouter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e6861f1bd8f05db6af2199e90b40676928754a9
|
4
|
+
data.tar.gz: d23fda5d037718e72605d635c5e6ec49c95c05fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 188a4ed5ca1125835dc484e723cbcdb70b413a50deb73064c909a6eabdaedfd9f97c21dc3a2e7ed5559b0c0964897c3c52d3aa617a7ca3b4bf0793026a30a434
|
7
|
+
data.tar.gz: 5c59635c72d3e6fa1e7e04acff27481eb71f77d826e05722d5d20e788c86cf2f6a179c49a0ab302a5438ad27d73ba3c31933986d236ce264530992281cc3d639
|
@@ -3,6 +3,7 @@
|
|
3
3
|
module BrocadeVRouter
|
4
4
|
class Configurator
|
5
5
|
CONF_PATH = 'rest/conf'.freeze
|
6
|
+
SHOW_CONF_CMD = 'configuration'.freeze
|
6
7
|
|
7
8
|
attr_reader :connection, :last_response, :logger
|
8
9
|
attr_accessor :raise_on_fail
|
@@ -37,7 +38,7 @@ module BrocadeVRouter
|
|
37
38
|
res.size > 1 ? res : res.first
|
38
39
|
end
|
39
40
|
|
40
|
-
def get(cmd =
|
41
|
+
def get(cmd = SHOW_CONF_CMD)
|
41
42
|
path = "rest/op/show/#{cmd}"
|
42
43
|
handle_request :post, path
|
43
44
|
resp = handle_response connection.post "/#{path}"
|
@@ -48,7 +49,7 @@ module BrocadeVRouter
|
|
48
49
|
handle_request :get, path
|
49
50
|
resp = handle_response connection.get "/#{path}"
|
50
51
|
|
51
|
-
resp.success? && cmd ==
|
52
|
+
resp.success? && cmd == SHOW_CONF_CMD ? Configuration.new(resp.body).to_h : resp.body
|
52
53
|
end
|
53
54
|
|
54
55
|
def delete(paths = nil, &blk)
|