lib/network.rb in forj-0.0.39 vs lib/network.rb in forj-0.0.40

- old
+ new

@@ -58,11 +58,11 @@ def create_network(oFC, name) begin Logging.debug('creating network %s' % [name]) oFC.oNetwork.networks.create(:name => name) rescue => e - Logging.fatal(1, "%s\n%s" % [e.inspect, e.message]) + Logging.fatal(1, "Unable to create '%s'network" % name, e) end end def delete_network(oFC, network_name) begin @@ -114,11 +114,11 @@ :name => name, :cidr => get_next_subnet(oFC), :ip_version => '4' ) rescue => e - Logging.fatal(1, "%s\n%s" % [e.class.name, e.message]) + Logging.fatal(1, "Unable to create '%s' subnet." % name, e) end end def delete_subnet(oFC, subnet) Logging.debug("Deleting subnet '%s'" % [subnet.name]) @@ -209,19 +209,19 @@ :name => name, :admin_state_up => true ) end rescue => e - Logging.fatal(1, "%s\n%s" % [e.inspect, e.message]) + Logging.fatal(1, "Unable to create '%s' router" % name, e) end end def delete_router(oFC, router_id) Logging.debug("Deleting router '%s'" % [router.name]) begin oFC.oNetwork.routers.get(router.id).destroy rescue => e - Logging.error("%s\n%s" % [e.message, e.backtrace.join("\n")]) + Logging.error("Unable to delete '%s' router ID" % router_id, e) end end # Router interface to connect to the network