X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fvim-emu.git;a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Fopenstack%2Fresources%2Fport_chain.py;h=7dcd834239061821d9ca9eb5aaec01d7a016e34d;hp=f712312fc64b06d9b0ecbe9b477e0a1d45e594f2;hb=ce776393dccaf31ad47f21b06dcf0a2ba56b4874;hpb=1e645a4217078c96f5ee09a437be63f7356157a7 diff --git a/src/emuvim/api/openstack/resources/port_chain.py b/src/emuvim/api/openstack/resources/port_chain.py index f712312..7dcd834 100644 --- a/src/emuvim/api/openstack/resources/port_chain.py +++ b/src/emuvim/api/openstack/resources/port_chain.py @@ -73,18 +73,15 @@ class PortChain(object): for server in compute.computeUnits.values(): if port_pair.ingress.name in server.port_names or port_pair.ingress.id in server.port_names: server_ingress = server - elif port_pair.egress.name in server.port_names or port_pair.egress.id in server.port_names: + if port_pair.egress.name in server.port_names or port_pair.egress.id in server.port_names: server_egress = server - # TODO: Not sure, if this should throw an error if not server_ingress: - logging.warn("Neutron SFC: ingress port %s not connected." % str( - port_pair.ingress.name)) - continue + raise RuntimeError("Neutron SFC: ingress port %s not connected to any server." % + port_pair.ingress.name) if not server_egress: - logging.warn("Neutron SFC: egress port %s not connected." % str( - port_pair.egress.name)) - continue + raise RuntimeError("Neutron SFC: egress port %s not connected to any server." % + port_pair.egress.name) compute.dc.net.setChain( server_ingress.name, server_egress.name,