当前位置: 首页>>代码示例>>Java>>正文


Java IDeviceService.DeviceField方法代码示例

本文整理汇总了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();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:21,代码来源:DeviceManagerImplTest.java

示例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();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:19,代码来源:DeviceManagerImplTest.java

示例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();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:21,代码来源:DeviceManagerImplTest.java

示例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();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:19,代码来源:DeviceManagerImplTest.java

示例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;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:46,代码来源:IndexedEntity.java

示例6: getKeyFields

import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Override
public EnumSet<IDeviceService.DeviceField> getKeyFields() {
    return keyFields;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:5,代码来源:DefaultEntityClassifier.java

示例7: getKeyFields

import net.floodlightcontroller.devicemanager.IDeviceService; //导入方法依赖的package包/类
@Override
public EnumSet<IDeviceService.DeviceField> getKeyFields() {
    return EnumSet.of(MAC, VLAN, SWITCH, PORT);
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:5,代码来源:MockEntityClassifier.java

示例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;
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:42,代码来源:IndexedEntity.java

示例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;
}
 
开发者ID:zhenshengcai,项目名称:floodlight-hardware,代码行数:46,代码来源:IndexedEntity.java


注:本文中的net.floodlightcontroller.devicemanager.IDeviceService.DeviceField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。