lib/process/cloud/process/router.rb in lorj_cloud-0.1.11 vs lib/process/cloud/process/router.rb in lorj_cloud-0.1.12
- old
+ new
@@ -63,21 +63,21 @@
)
obj_needs :CloudObject, :network_connection
obj_needs :CloudObject, :network, :for => [:create_e]
obj_needs :CloudObject, :subnetwork, :for => [:create_e]
obj_needs_optional
- obj_needs :data, :router_name, :for => [:create_e]
+ obj_needs :data, :router_name, :for => [:create_e]
def_attribute :gateway_network_id
end
# Port Object
# Identify port attached to network
class Lorj::BaseDefinition
- define_obj :port, :nohandler => true
+ define_obj :port, :nohandler => true
- obj_needs :CloudObject, :network_connection
+ obj_needs :CloudObject, :network_connection
def_attribute :device_id
def_attribute :network_id
def_attribute :device_owner
end
@@ -86,11 +86,11 @@
# Identify interface attached to a router
# This object will probably be moved to controller task
# To keep the network model more generic.
class Lorj::BaseDefinition
# No process handler defined. Just Controller object
- define_obj :router_interface, :nohandler => true
+ define_obj :router_interface, :nohandler => true
obj_needs :CloudObject, :network_connection
obj_needs :CloudObject, :router, :for => [:create_e]
obj_needs :CloudObject, :subnetwork, :for => [:create_e]
@@ -130,25 +130,25 @@
"Network '%s'.", router_name, ext_net)
else
PrcLib.info("Router '%s' created without external Network.",
router_name)
end
- rescue => e
- PrcLib.error "Unable to create '%s' router\n%s\n%s", router_name,
- e.message, e.backtrace.join("\n")
+ rescue => e
+ PrcLib.error "Unable to create '%s' router\n%s\n%s", router_name,
+ e.message, e.backtrace.join("\n")
end
router
end
def delete_router(net_conn_obj, router_obj)
PrcLib.state("Deleting router '%s'", router.name)
begin
#################
provider_delete_router(net_conn_obj, router_obj)
- # net_conn_obj.routers.get(router.id).destroy
- rescue => e
- PrcLib.error("Unable to delete '%s' router ID", router_id, e)
+ # net_conn_obj.routers.get(router.id).destroy
+ rescue => e
+ PrcLib.error("Unable to delete '%s' router ID", router_id, e)
end
end
def query_router_from_port(router_port, _hParams)
query = { :id => router_port[:device_id] }
@@ -231,11 +231,11 @@
PrcLib.state("Getting gateway '%s'", name)
networks = net_conn_obj
begin
netty = networks.get(name)
- rescue => e
- PrcLib.error("%s\n%s", e.message, e.backtrace.join("\n"))
+ rescue => e
+ PrcLib.error("%s\n%s", e.message, e.backtrace.join("\n"))
end
PrcLib.state("Found gateway '%s'", name) if netty
PrcLib.state("Unable to find gateway '%s'", name) unless netty
netty
end