bim 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58edf06fd00d02407176300f51c8a1b4106bb60b
4
- data.tar.gz: 7d0e9084f6d50f8be333f53799cb34af28fbccc5
3
+ metadata.gz: d9b6eb68a2daa7c9ffa120de5a389c1e9480e6aa
4
+ data.tar.gz: 22454703346d548e13a79edf42879e9e88717cd7
5
5
  SHA512:
6
- metadata.gz: 8ec3adf9c230316a7061561d7384f0f58728b3be03a49030418e825e52133218d95b25d8d6db5d35caccbe6fdcd8c0620c5e4757a19d9148033d9b79785ee980
7
- data.tar.gz: d12d48c429d1b85b160e7a79d1d97ff51c0963ac630e4610261f746766bdf77b18246b93a6a3b92c190b1aed881cbd33536bef7f58573b1cc3456f3b440e0d05
6
+ metadata.gz: 216f1883eb5acca0cb09b4eaee5dfc151c7639269a31c377dfa53a0103640fddd9265601b5e0fa3930e6d44799a4dcae3a234a54ee636b323e21521d3e322514
7
+ data.tar.gz: 40e1db06639a8033585b2205ddc0ca5bb32272ccbd3bc946af0bad814915e88db2bdf1b716ef403853ba3ab90b3e1550d7083dff3d6bda33525b804b8e375a9f
@@ -9,11 +9,11 @@ module Bim
9
9
  FAILOVER_STATE_PATH = '/mgmt/tm/cm/failoverStatus'.freeze
10
10
 
11
11
  class << self
12
- def sync!(dest)
12
+ def sync!(dest, overwrite: false)
13
13
  msg = "you want to sync #{BIGIP_HOST} configuration to #{dest}? [y|n]"
14
14
  return { 'message' => "cancel sync #{BIGIP_HOST} to #{dest}" } unless yes_or_no?(msg)
15
15
  uri = URI.join(Bim::BASE_URL, Bim::Action::Sync::SYNC_PATH)
16
- j = { "command": 'run', "utilCmdArgs": "config-sync to-group #{dest}" }
16
+ j = { "command": 'run', "utilCmdArgs": "config-sync #{'force-full-load-push ' if overwrite}to-group #{dest}" }
17
17
  req = request(uri, Bim::AUTH, 'application/json', 'POST', j.to_json)
18
18
  http(uri).request(req).body
19
19
  end
@@ -5,11 +5,12 @@ module Bim
5
5
  default_command :to_group
6
6
 
7
7
  desc(
8
- '[GROUP_NAME]',
9
- 'sync device configuration to group.'
8
+ '[GROUP_NAME] [--overwrite]',
9
+ 'sync device configuration to group. if set overwrite option, sync force-full-load-push mode.'
10
10
  )
11
+ option :overwrite, :type => :boolean
11
12
  def to_group(group)
12
- puts Bim::Action::Sync.sync!(group)
13
+ puts Bim::Action::Sync.sync!(group, overwrite: options.key?(:overwrite))
13
14
  end
14
15
 
15
16
  desc(
data/lib/bim/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Bim
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - littlekbt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-19 00:00:00.000000000 Z
11
+ date: 2017-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor