knife-rackspace-load-balancer 0.0.2 → 0.0.3

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.
@@ -95,18 +95,23 @@ module KnifePlugins
95
95
  end
96
96
 
97
97
  target_load_balancers.each do |lb|
98
- ui.output("Opening #{lb[:name]}")
99
- balancer = lb_connection.get_load_balancer(lb[:id])
100
-
101
- lb_nodes = balancer.list_nodes
102
- lb_nodes.each do |lb_node_hash|
103
- if node_ips.include? lb_node_hash[:address].to_s
104
- lb_node = balancer.get_node(lb_node_hash[:id])
105
- ui.output("Removing node #{lb_node.address}")
106
- if lb_node.destroy!
107
- ui.output(ui.color("Success", :green))
98
+ begin
99
+ ui.output("Opening #{lb[:name]}")
100
+ balancer = lb_connection.get_load_balancer(lb[:id])
101
+
102
+ lb_nodes = balancer.list_nodes
103
+ lb_nodes.each do |lb_node_hash|
104
+ if node_ips.include? lb_node_hash[:address].to_s
105
+ lb_node = balancer.get_node(lb_node_hash[:id])
106
+ ui.output("Removing node #{lb_node.address}")
107
+ if lb_node.destroy!
108
+ ui.output(ui.color("Success", :green))
109
+ end
108
110
  end
109
111
  end
112
+
113
+ rescue CloudLB::Exception::Other => e
114
+ ui.error("Failed on #{lb[:name]}: CloudLB::Exception [#{e.class.name}] - #{e.message}")
110
115
  end
111
116
  end
112
117
 
@@ -1,7 +1,7 @@
1
1
  module Knife
2
2
  module Rackspace
3
3
  module LoadBalancer
4
- VERSION="0.0.2"
4
+ VERSION="0.0.3"
5
5
  MAJOR, MINOR, TINY = VERSION.split(".")
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-rackspace-load-balancer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: