本文整理汇总了Java中net.floodlightcontroller.devicemanager.IDeviceService.DeviceField方法的典型用法代码示例。如果您正苦于以下问题:Java IDeviceService.DeviceField方法的具体用法?Java IDeviceService.DeviceField怎么用?Java IDeviceService.DeviceField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.floodlightcontroller.devicemanager.IDeviceService
的用法示例。
在下文中一共展示了IDeviceService.DeviceField方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testDeviceIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Test
public void testDeviceIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPv4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(false, indexFields);
indexFields = EnumSet.noneOf(IDeviceService.DeviceField.class);
deviceManager.addIndex(false, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
OFPort.of(anyShort()))).
andReturn(true).anyTimes();
expect(mockTopology.getOpenflowDomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
replay(mockTopology);
doTestDeviceQuery();
}
示例2: testDeviceClassIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Test
public void testDeviceClassIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPv4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(true, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
OFPort.of(anyShort()))).
andReturn(true).anyTimes();
expect(mockTopology.getOpenflowDomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
replay(mockTopology);
doTestDeviceClassQuery();
}
示例3: testDeviceIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Test
public void testDeviceIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPV4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(false, indexFields);
indexFields = EnumSet.noneOf(IDeviceService.DeviceField.class);
deviceManager.addIndex(false, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
OFPort.of(anyShort()))).
andReturn(true).anyTimes();
expect(mockTopology.getL2DomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
replay(mockTopology);
doTestDeviceQuery();
}
示例4: testDeviceClassIndex
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Test
public void testDeviceClassIndex() throws Exception {
EnumSet<IDeviceService.DeviceField> indexFields =
EnumSet.noneOf(IDeviceService.DeviceField.class);
indexFields.add(IDeviceService.DeviceField.IPV4);
indexFields.add(IDeviceService.DeviceField.VLAN);
deviceManager.addIndex(true, indexFields);
ITopologyService mockTopology = createMock(ITopologyService.class);
deviceManager.topology = mockTopology;
expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
OFPort.of(anyShort()))).
andReturn(true).anyTimes();
expect(mockTopology.getL2DomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
replay(mockTopology);
doTestDeviceClassQuery();
}
示例5: equals
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
IndexedEntity other = (IndexedEntity) obj;
if (!keyFields.equals(other.keyFields))
return false;
for (IDeviceService.DeviceField f : keyFields) {
switch (f) {
case MAC:
if (!entity.macAddress.equals(other.entity.macAddress))
return false;
break;
case IPv4:
if (entity.ipv4Address == null) {
if (other.entity.ipv4Address != null) return false;
} else if (!entity.ipv4Address.equals(other.entity.ipv4Address)) return false;
break;
case IPv6:
if (entity.ipv6Address == null) {
if (other.entity.ipv6Address != null) return false;
} else if (!entity.ipv6Address.equals(other.entity.ipv6Address)) return false;
break;
case SWITCH:
if (entity.switchDPID == null) {
if (other.entity.switchDPID != null) return false;
} else if (!entity.switchDPID.equals(other.entity.switchDPID)) return false;
break;
case PORT:
if (entity.switchPort == null) {
if (other.entity.switchPort != null) return false;
} else if (!entity.switchPort.equals(other.entity.switchPort)) return false;
break;
case VLAN:
if (entity.vlan == null) {
if (other.entity.vlan != null) return false;
} else if (!entity.vlan.equals(other.entity.vlan)) return false;
break;
}
}
return true;
}
示例6: getKeyFields
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Override
public EnumSet<IDeviceService.DeviceField> getKeyFields() {
return keyFields;
}
示例7: getKeyFields
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Override
public EnumSet<IDeviceService.DeviceField> getKeyFields() {
return EnumSet.of(MAC, VLAN, SWITCH, PORT);
}
示例8: equals
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
IndexedEntity other = (IndexedEntity) obj;
if (!keyFields.equals(other.keyFields))
return false;
for (IDeviceService.DeviceField f : keyFields) {
switch (f) {
case MAC:
if (!entity.macAddress.equals(other.entity.macAddress))
return false;
break;
case IPV4:
if (entity.ipv4Address == null) {
if (other.entity.ipv4Address != null) return false;
} else if (!entity.ipv4Address.equals(other.entity.ipv4Address)) return false;
break;
case SWITCH:
if (entity.switchDPID == null) {
if (other.entity.switchDPID != null) return false;
} else if (!entity.switchDPID.equals(other.entity.switchDPID)) return false;
break;
case PORT:
if (entity.switchPort == null) {
if (other.entity.switchPort != null) return false;
} else if (!entity.switchPort.equals(other.entity.switchPort)) return false;
break;
case VLAN:
if (entity.vlan == null) {
if (other.entity.vlan != null) return false;
} else if (!entity.vlan.equals(other.entity.vlan)) return false;
break;
}
}
return true;
}
示例9: equals
import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
IndexedEntity other = (IndexedEntity) obj;
if (!keyFields.equals(other.keyFields))
return false;
for (IDeviceService.DeviceField f : keyFields) {
switch (f) {
case MAC:
if (!entity.macAddress.equals(other.entity.macAddress))
return false;
break;
case IPv4:
if (entity.ipv4Address == null) {
if (other.entity.ipv4Address != null) return false;
} else if (!entity.ipv4Address.equals(other.entity.ipv4Address)) return false;
break;
case IPv6:
if (entity.ipv6Address == null) {
if (other.entity.ipv6Address != null) return false;
} else if (!entity.ipv6Address.equals(other.entity.ipv6Address)) return false;
break;
case SWITCH:
if (entity.switchDPID == null) {
if (other.entity.switchDPID != null) return false;
} else if (!entity.switchDPID.equals(other.entity.switchDPID)) return false;
break;
case PORT:
if (entity.switchPort == null) {
if (other.entity.switchPort != null) return false;
} else if (!entity.switchPort.equals(other.entity.switchPort)) return false;
break;
case VLAN:
if (entity.vlan == null) {
if (other.entity.vlan != null) return false;
} else if (!entity.vlan.equals(other.entity.vlan)) return false;
break;
}
}
return true;
}