Device Emulation (contd.): Renamed Device List and Device Neighbor List fields so that the names are better reflective of what they contain
This commit is contained in:
parent
ce7aee54e5
commit
fbb56720ba
@ -594,9 +594,9 @@ void PortGroup::processDeviceList(int portIndex, PbRpcController *controller)
|
||||
}
|
||||
|
||||
mPorts[portIndex]->clearDeviceList();
|
||||
for(int i = 0; i < deviceList->ExtensionSize(OstEmul::port_device); i++) {
|
||||
for(int i = 0; i < deviceList->ExtensionSize(OstEmul::device); i++) {
|
||||
mPorts[portIndex]->insertDevice(
|
||||
deviceList->GetExtension(OstEmul::port_device, i));
|
||||
deviceList->GetExtension(OstEmul::device, i));
|
||||
}
|
||||
|
||||
_exit:
|
||||
@ -628,9 +628,9 @@ void PortGroup::processDeviceNeighbors(
|
||||
}
|
||||
|
||||
mPorts[portIndex]->clearDeviceNeighbors();
|
||||
for(int i = 0; i < neighList->ExtensionSize(OstEmul::devices); i++) {
|
||||
for(int i=0; i < neighList->ExtensionSize(OstEmul::device_neighbor); i++) {
|
||||
mPorts[portIndex]->insertDeviceNeighbors(
|
||||
neighList->GetExtension(OstEmul::devices, i)); // FIXME: change extn id
|
||||
neighList->GetExtension(OstEmul::device_neighbor, i));
|
||||
}
|
||||
|
||||
mPorts[portIndex]->deviceInfoRefreshed();
|
||||
|
@ -95,7 +95,7 @@ message Device {
|
||||
}
|
||||
|
||||
extend OstProto.PortDeviceList {
|
||||
repeated Device port_device = 100;
|
||||
repeated Device device = 100;
|
||||
}
|
||||
|
||||
message ArpEntry {
|
||||
@ -115,6 +115,5 @@ message DeviceNeighborList {
|
||||
}
|
||||
|
||||
extend OstProto.PortNeighborList {
|
||||
// FIXME: rename to device (singular) to be consistent with naming convention for other repeated fields
|
||||
repeated DeviceNeighborList devices = 100;
|
||||
repeated DeviceNeighborList device_neighbor = 100;
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ void DeviceManager::getDeviceList(
|
||||
{
|
||||
foreach(Device *device, sortedDeviceList_) {
|
||||
OstEmul::Device *dev =
|
||||
deviceList->AddExtension(OstEmul::port_device);
|
||||
deviceList->AddExtension(OstEmul::device);
|
||||
device->getConfig(dev);
|
||||
}
|
||||
}
|
||||
@ -271,7 +271,7 @@ void DeviceManager::getDeviceNeighbors(
|
||||
|
||||
foreach(Device *device, sortedDeviceList_) {
|
||||
OstEmul::DeviceNeighborList *neighList =
|
||||
neighborList->AddExtension(OstEmul::devices);
|
||||
neighborList->AddExtension(OstEmul::device_neighbor);
|
||||
neighList->set_device_index(count++);
|
||||
device->getNeighbors(neighList);
|
||||
}
|
||||
|
@ -563,9 +563,9 @@ def test_multiEmulDevNoVlan(drone, ports, dut, dut_ports, dut_ip,
|
||||
|
||||
log.info('retrieving ARP/NDP entries on tx port to verify clear')
|
||||
device_list = drone.getDeviceList(emul_ports.port_id[0])
|
||||
device_config = device_list.Extensions[emul.port_device]
|
||||
device_config = device_list.Extensions[emul.device]
|
||||
neigh_list = drone.getDeviceNeighbors(emul_ports.port_id[0])
|
||||
devices = neigh_list.Extensions[emul.devices]
|
||||
devices = neigh_list.Extensions[emul.device_neighbor]
|
||||
log.info('ARP/NDP Table on tx port')
|
||||
for devcfg, device in zip(device_config, devices):
|
||||
if has_ip4:
|
||||
@ -583,9 +583,9 @@ def test_multiEmulDevNoVlan(drone, ports, dut, dut_ports, dut_ip,
|
||||
|
||||
log.info('retrieving ARP/NDP entries on rx port to verify clear')
|
||||
device_list = drone.getDeviceList(emul_ports.port_id[1])
|
||||
device_config = device_list.Extensions[emul.port_device]
|
||||
device_config = device_list.Extensions[emul.device]
|
||||
neigh_list = drone.getDeviceNeighbors(emul_ports.port_id[1])
|
||||
devices = neigh_list.Extensions[emul.devices]
|
||||
devices = neigh_list.Extensions[emul.device_neighbor]
|
||||
log.info('ARP/NDP Table on rx port')
|
||||
for devcfg, device in zip(device_config, devices):
|
||||
if has_ip4:
|
||||
@ -669,9 +669,9 @@ def test_multiEmulDevNoVlan(drone, ports, dut, dut_ports, dut_ip,
|
||||
# retrieve and verify ARP/NDP Table on tx/rx ports
|
||||
log.info('retrieving ARP/NDP entries on tx port')
|
||||
device_list = drone.getDeviceList(emul_ports.port_id[0])
|
||||
device_config = device_list.Extensions[emul.port_device]
|
||||
device_config = device_list.Extensions[emul.device]
|
||||
neigh_list = drone.getDeviceNeighbors(emul_ports.port_id[0])
|
||||
devices = neigh_list.Extensions[emul.devices]
|
||||
devices = neigh_list.Extensions[emul.device_neighbor]
|
||||
log.info('ARP/NDP Table on tx port')
|
||||
for devcfg, device in zip(device_config, devices):
|
||||
if has_ip4:
|
||||
@ -695,9 +695,9 @@ def test_multiEmulDevNoVlan(drone, ports, dut, dut_ports, dut_ip,
|
||||
|
||||
log.info('retrieving ARP/NDP entries on rx port')
|
||||
device_list = drone.getDeviceList(emul_ports.port_id[1])
|
||||
device_config = device_list.Extensions[emul.port_device]
|
||||
device_config = device_list.Extensions[emul.device]
|
||||
neigh_list = drone.getDeviceNeighbors(emul_ports.port_id[1])
|
||||
devices = neigh_list.Extensions[emul.devices]
|
||||
devices = neigh_list.Extensions[emul.device_neighbor]
|
||||
log.info('ARP/NDP Table on rx port')
|
||||
for devcfg, device in zip(device_config, devices):
|
||||
if has_ip4:
|
||||
@ -1008,9 +1008,9 @@ def test_multiEmulDevPerVlan(request, drone, ports, dut, dut_ports,
|
||||
|
||||
log.info('retrieving ARP/NDP entries on tx port to verify clear')
|
||||
device_list = drone.getDeviceList(emul_ports.port_id[0])
|
||||
device_config = device_list.Extensions[emul.port_device]
|
||||
device_config = device_list.Extensions[emul.device]
|
||||
neigh_list = drone.getDeviceNeighbors(emul_ports.port_id[0])
|
||||
devices = neigh_list.Extensions[emul.devices]
|
||||
devices = neigh_list.Extensions[emul.device_neighbor]
|
||||
log.info('ARP/NDP Table on tx port')
|
||||
for devcfg, device in zip(device_config, devices):
|
||||
if has_ip4:
|
||||
@ -1028,9 +1028,9 @@ def test_multiEmulDevPerVlan(request, drone, ports, dut, dut_ports,
|
||||
|
||||
log.info('retrieving ARP/NDP entries on rx port to verify clear')
|
||||
device_list = drone.getDeviceList(emul_ports.port_id[1])
|
||||
device_config = device_list.Extensions[emul.port_device]
|
||||
device_config = device_list.Extensions[emul.device]
|
||||
neigh_list = drone.getDeviceNeighbors(emul_ports.port_id[1])
|
||||
devices = neigh_list.Extensions[emul.devices]
|
||||
devices = neigh_list.Extensions[emul.device_neighbor]
|
||||
log.info('ARP/NDP Table on rx port')
|
||||
for devcfg, device in zip(device_config, devices):
|
||||
if has_ip4:
|
||||
@ -1124,9 +1124,9 @@ def test_multiEmulDevPerVlan(request, drone, ports, dut, dut_ports,
|
||||
# retrieve and verify ARP/NDP Table on tx/rx ports
|
||||
log.info('retrieving ARP/NDP entries on tx port')
|
||||
device_list = drone.getDeviceList(emul_ports.port_id[0])
|
||||
device_config = device_list.Extensions[emul.port_device]
|
||||
device_config = device_list.Extensions[emul.device]
|
||||
neigh_list = drone.getDeviceNeighbors(emul_ports.port_id[0])
|
||||
devices = neigh_list.Extensions[emul.devices]
|
||||
devices = neigh_list.Extensions[emul.device_neighbor]
|
||||
log.info('ARP/NDP Table on tx port')
|
||||
for devcfg, device in zip(device_config, devices):
|
||||
vlans = ''
|
||||
@ -1153,9 +1153,9 @@ def test_multiEmulDevPerVlan(request, drone, ports, dut, dut_ports,
|
||||
|
||||
log.info('retrieving ARP entries on rx port')
|
||||
device_list = drone.getDeviceList(emul_ports.port_id[1])
|
||||
device_config = device_list.Extensions[emul.port_device]
|
||||
device_config = device_list.Extensions[emul.device]
|
||||
neigh_list = drone.getDeviceNeighbors(emul_ports.port_id[1])
|
||||
devices = neigh_list.Extensions[emul.devices]
|
||||
devices = neigh_list.Extensions[emul.device_neighbor]
|
||||
log.info('ARP/NDP Table on rx port')
|
||||
for devcfg, device in zip(device_config, devices):
|
||||
vlans = ''
|
||||
@ -1257,6 +1257,8 @@ def test_multiEmulDevPerVlan(request, drone, ports, dut, dut_ports,
|
||||
# * Verify that device_index in OstEmul.DeviceNeighborList matches the
|
||||
# correct device in OstEmul.PortDeviceList
|
||||
# * Verify ARP/NDP resolution in a bridging topology
|
||||
# * Verify non-default IP prefix-length
|
||||
# * Verify bi-directional streams
|
||||
#
|
||||
import pytest
|
||||
pytest.main(__file__)
|
||||
|
Loading…
Reference in New Issue
Block a user