func (mapper *OvsMapper) Enhance(mac string, attrs *flow.Flow_InterfaceAttributes) { if mapper.Topology != nil { container := mapper.Topology.GetPort(attrs.GetIfName()) if container != nil { attrs.BridgeName = proto.String(container.ID) return } } attrs.BridgeName = proto.String("") }
func (mapper *NeutronMapper) Enhance(mac string, attrs *flow.Flow_InterfaceAttributes) { a, f := mapper.cache.Get(mac) if f { ia := a.(Attributes) /* update attributes with attributes retrieved from neutron */ attrs.TenantID = proto.String(ia.TenantID) attrs.VNI = proto.Uint64(ia.VNI) return } mapper.cacheUpdaterChan <- mac }
func (mapper *NetLinkMapper) Enhance(mac string, attrs *flow.Flow_InterfaceAttributes) { a, f := mapper.cache.Get(strconv.Itoa(int(attrs.GetIfIndex()))) if f { la := a.(*netlink.LinkAttrs) attrs.IfName = proto.String(la.Name) attrs.MTU = proto.Uint32(uint32(la.MTU)) return } mapper.cacheUpdaterChan <- attrs.GetIfIndex() }
func (d *FakeIfNameDriver) Enhance(mac string, attrs *flow.Flow_InterfaceAttributes) { attrs.IfName = proto.String(d.FakeIfName) }
func (d *FakeInterfaceDriver) Enhance(mac string, attrs *flow.Flow_InterfaceAttributes) { attrs.TenantID = proto.String(d.FakeTenantID) attrs.VNI = proto.Uint64(d.FakeVNI) }