Exemple #1
0
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
}
Exemple #2
0
func (d *FakeInterfaceDriver) Enhance(mac string, attrs *flow.Flow_InterfaceAttributes) {
	attrs.TenantID = proto.String(d.FakeTenantID)
	attrs.VNI = proto.Uint64(d.FakeVNI)
}