enfcli 3.9.2.pre.alpha → 3.9.3.pre.beta

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
  SHA256:
3
- metadata.gz: 3e33b30f23aa6e35646e29495d0de25b8fd7982ff96627fafa8e656eadca30d6
4
- data.tar.gz: ce55885a00376eaac113e3e6e552a81b19de8df5f691acdbbfd8aa1e59f1580d
3
+ metadata.gz: d578ce31cd95a7460282e93051ef48645d363eb994214ecccd8c58bb198b67c4
4
+ data.tar.gz: 20b5e2acfab5e0aac45098a7a6c0354863f5b59a4e803b819b4c3eeab4c336dd
5
5
  SHA512:
6
- metadata.gz: 8439c0f1422f4af9966cd7b773aeb8d8e9da9da2afd863929dde665c0903b0d9f1dc55c409b58a36e2dcbf5ab204af9c2798f70a2f7cf501fd23eb33ac0a0878
7
- data.tar.gz: c4b9bc36805008505d8e1e13f11bbbaf9a64985612a5214b26346beaba852ba5b30c5c569a14b37c4cef79e3cce62a0ec6aee42939d2e9ba0148320854b7096b
6
+ metadata.gz: 9e23cb9e1ae38e3bae16067a6387846e9a8180b537a8e7180b9878e9c4496c799221096f9e100ff50d6fe229ac16a024829241993f0bca1acf8b00672197d4c1
7
+ data.tar.gz: ec95b8128ead69c104d2c1a12458c0e9c0975cb6f4cbc4bb93add6ee0ec5dc353f27c01d4b5bfd11485cd93cd367903d2b9fc736ced1629831df5fa44a4f0883
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- enfcli (3.9.2.pre.alpha)
4
+ enfcli (3.9.3.pre.beta)
5
5
  rest-client (~> 2.0)
6
6
  terminal-table
7
7
  thor (~> 0.20.0)
@@ -62,7 +62,7 @@ module EnfCli
62
62
  end
63
63
 
64
64
  def display_limits limits
65
- # Extract default limits
65
+ # Extract default limits
66
66
  default_limits = limits[:default]
67
67
  current_limits = limits[:current]
68
68
  max_limits = limits[:max]
@@ -76,17 +76,20 @@ module EnfCli
76
76
  limits_array.push default_limits if default_limits
77
77
  limits_array.push current_limits if current_limits
78
78
  limits_array.push max_limits if max_limits
79
-
80
- headings = ['Limit', 'Pkts/Sec', 'Pkts Burst Size', 'Bytes/Sec', 'Bytes Burst Size', 'Inherited']
79
+
80
+ headings = ['Limit', 'Pkts/Sec', 'Pkts Burst Size', 'Bytes/Sec', 'Bytes Burst Size']
81
+ headings << 'Inherited' if limits_array.reduce(false){ |acc, hash| acc or hash.member?(:inherit)}
82
+
81
83
  rows = limits_array.map{ |hash|
82
- [ hash[:limit], hash[:packets_per_second], hash[:packets_burst_size], hash[:bytes_per_second], hash[:bytes_burst_size],
83
- hash[:inherit] ? hash[:inherit] : "N/A"
84
- ]
84
+ row = [ hash[:limit], hash[:packets_per_second], hash[:packets_burst_size], hash[:bytes_per_second], hash[:bytes_burst_size] ]
85
+ row << hash[:inherit] ? "Y" : "N" if hash.member?(:inherit)
86
+ row
85
87
  }
88
+
86
89
  render_table(headings, rows)
87
90
  end
88
91
  }
89
-
92
+
90
93
  desc "list-networks", "List all virtual networks in domain"
91
94
  def list_networks
92
95
  try_with_rescue_in_session do
@@ -284,7 +287,7 @@ module EnfCli
284
287
  :packets_per_second => options['packets-per-second'],
285
288
  :packets_burst_size => options['packets-burst-size'],
286
289
  :bytes_per_second => options['bytes-per-second'],
287
- :bytes_burst_size => options['bytes-burst-size']
290
+ :bytes_burst_size => options['bytes-burst-size']
288
291
  }
289
292
  data = EnfApi::API.instance.update_domain_rate_limits options[:network], options[:limit], hash
290
293
  limits = data[:data][0]
@@ -331,7 +334,7 @@ module EnfCli
331
334
  try_with_rescue_in_session do
332
335
  # Call api
333
336
  hash = {
334
- :inherit => 'Y'
337
+ :inherit => true
335
338
  }
336
339
  data = EnfApi::API.instance.update_network_rate_limits options[:network], options[:limit], hash
337
340
  limits = data[:data][0]
@@ -378,7 +381,7 @@ module EnfCli
378
381
  try_with_rescue_in_session do
379
382
  # Call api
380
383
  hash = {
381
- :inherit => 'Y'
384
+ :inherit => true
382
385
  }
383
386
  data = EnfApi::API.instance.update_ep_rate_limits options[:ipv6], options[:limit], hash
384
387
  limits = data[:data][0]
@@ -14,5 +14,5 @@
14
14
  # limitations under the License.
15
15
  #
16
16
  module EnfCli
17
- VERSION = '3.9.2-alpha'
17
+ VERSION = '3.9.3-beta'
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enfcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.2.pre.alpha
4
+ version: 3.9.3.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Venkatakumar Srinivasan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-17 00:00:00.000000000 Z
11
+ date: 2019-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor