knife-cisco_asa 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.1.2
2
+
3
+ * Fixed handling of removing host with --nat
4
+
1
5
  ## v0.1.1
2
6
 
3
7
  * Fixed typo in common options
@@ -21,7 +21,7 @@ module CiscoAsaKnifePlugin
21
21
  option :nat,
22
22
  :long => "--nat IP",
23
23
  :description => "NAT IP"
24
-
24
+
25
25
  def run
26
26
 
27
27
  hostname = name_args.first.upcase
@@ -43,10 +43,12 @@ module CiscoAsaKnifePlugin
43
43
  ui.info "Removing host from Cisco ASA:"
44
44
  ui.info "#{ui.color "ASA:", :cyan} #{get_config(:cisco_asa_host)}"
45
45
  ui.info "#{ui.color "Host:", :cyan} #{hostname}"
46
- ui.info "#{ui.color "NAT IP:", :cyan} #{natip}"
47
46
 
48
- commands << "object network #{hostname}"
49
- commands << " no nat (inside,outside) static #{natip} dns"
47
+ if get_config(:nat)
48
+ ui.info "#{ui.color "NAT IP:", :cyan} #{get_config(:nat)}"
49
+ commands << "object network #{hostname}"
50
+ commands << " no nat (inside,outside) static #{get_config(:nat)} dns"
51
+ end
50
52
 
51
53
  if get_config(:groups)
52
54
  get_config(:groups).split(",").each do |group|
@@ -1,5 +1,5 @@
1
1
  module Knife
2
2
  module CiscoAsa
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-cisco_asa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: