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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42dbd45b0ff243821272d6b5f8d9c3adc5381e43
4
- data.tar.gz: c4b543d72f2d25340cd02c1d346294ae5124ecdc
3
+ metadata.gz: 9e6861f1bd8f05db6af2199e90b40676928754a9
4
+ data.tar.gz: d23fda5d037718e72605d635c5e6ec49c95c05fc
5
5
  SHA512:
6
- metadata.gz: 21a25edac7ea29470fc2961dd170e5fc16d4b0da02a0ebaa3d272b425bc8d4112fa025c5ce28f48d2465ce12130fa60de183d13a9a94a223bc5ee8b57d78b15b
7
- data.tar.gz: 5abeaa2b9b492bbb0ecf84d0e39af531dc062953aeacc542643793953d6291f157835c9437e8cac1e251e8e99751124252b9a15d4dcbdbab56541dc86792e83a
6
+ metadata.gz: 188a4ed5ca1125835dc484e723cbcdb70b413a50deb73064c909a6eabdaedfd9f97c21dc3a2e7ed5559b0c0964897c3c52d3aa617a7ca3b4bf0793026a30a434
7
+ data.tar.gz: 5c59635c72d3e6fa1e7e04acff27481eb71f77d826e05722d5d20e788c86cf2f6a179c49a0ab302a5438ad27d73ba3c31933986d236ce264530992281cc3d639
@@ -53,7 +53,7 @@ module BrocadeVRouter
53
53
  end
54
54
 
55
55
  def request_options
56
- request_opts.map { |op, _| (value = send(op)) && [op, value] }
56
+ request_opts.map { |op, _| (value = send(op)) && [op, value] }.compact.to_h
57
57
  end
58
58
 
59
59
  end
@@ -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 = 'configuration')
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 == 'configuration' ? Configuration.new(resp.body).to_h : resp.body
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)
@@ -1,3 +1,3 @@
1
1
  module BrocadeVRouter
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.4.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brocade_vrouter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Kosmatov