示例#1
0
文件: graph.go 项目: mestery/skydive
func (gfe *GraphFlowEnhancer) Enhance(f *flow.Flow) {
	if f.IfSrcGraphPath == "" {
		f.IfSrcGraphPath = gfe.getPath(f.GetStatistics().Endpoints[flow.FlowEndpointType_ETHERNET.Value()].AB.Value)
	}
	if f.IfDstGraphPath == "" {
		f.IfDstGraphPath = gfe.getPath(f.GetStatistics().Endpoints[flow.FlowEndpointType_ETHERNET.Value()].BA.Value)
	}
}
示例#2
0
文件: ovs.go 项目: lebauce/skydive
func (gfe *OvsFlowEnhancer) Enhance(f *flow.Flow) {
	var eth *flow.FlowEndpointsStatistics
	if f.IfSrcGraphPath == "" || f.IfDstGraphPath == "" {
		eth = f.GetStatistics().GetEndpointsType(flow.FlowEndpointType_ETHERNET)
		if eth == nil {
			return
		}
	}
	if f.IfSrcGraphPath == "" {
		f.IfSrcGraphPath = gfe.getPath(eth.AB.Value)
	}
	if f.IfDstGraphPath == "" {
		f.IfDstGraphPath = gfe.getPath(eth.BA.Value)
	}
}