src/main/ruby/org/o3project/odenos/component/driver/of_driver/openflow_controller.rb
#
# Invalidate Flows related to specified OpenFlow switch
# @param [Integer] dpid
#
Invalidate Flows related to specified OpenFlow switch
Invalidate Flows related to specified OpenFlow switch
def invalidate_flow_using_switch(dpid)
            debug ">> #{__method__}"
            flowinfo = get_all_flowinfo_using_switch(dpid)
            affected_flowid_set = {}
            flowinfo.each do| flowinfo |
              flowid = flowinfo[0]
              flowentries = flowinfo[1]
              affected_flowid_set[flowid] = flowid
              flowentries.each do|flowentry|
                if flowentry.dpid == dpid
                  flowentry.status = Flow::NONE
                end
              end
            end
            affected_flowid_set.each_key do | flowid |
              begin
                flow = getFlow(flowid, _nw_if)
                unless @component._is_valid_flow(flow)
                  flow.status = Flow::FAILED
                  putFlow(flow, _nw_if)
                end
              rescue RequestError => e
                error "Invalidating Flow(flowid) state failed. #{e.message}"
              end
            end
          end
def invalidate_flow_using_switch ( dpid ) debug ">> #{__method__}" flowinfo = get_all_flowinfo_using_switch ( dpid ) affected_flowid_set = { } flowinfo . each do | flowinfo | flowid = flowinfo [ 0 ] flowentries = flowinfo [ 1 ] affected_flowid_set [ flowid ] = flowid flowentries . each do | flowentry | if flowentry . dpid == dpid flowentry . status = Flow :: NONE end end end affected_flowid_set . each_key do | flowid | begin flow = getFlow ( flowid , _nw_if ) unless @component . _is_valid_flow ( flow ) flow . status = Flow :: FAILED putFlow ( flow , _nw_if ) end rescue RequestError => e error "Invalidating Flow(flowid) state failed. #{e.message}" end end end
Invalidate Flows related to specified OpenFlow switch
Invalidate Flows related to specified OpenFlow switch
# lookup impacted flows # change flowentry status to none # for entries on disappeared Switch(dpid) # GET Flow # trigger FlowChanged event to start recalculation # PUT Flow
dpid
<not_specific>
<not_specific>
None