本文整理汇总了Java中org.opendaylight.controller.networkconfig.neutron.NeutronPort.setMacAddress方法的典型用法代码示例。如果您正苦于以下问题:Java NeutronPort.setMacAddress方法的具体用法?Java NeutronPort.setMacAddress怎么用?Java NeutronPort.setMacAddress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.controller.networkconfig.neutron.NeutronPort
的用法示例。
在下文中一共展示了NeutronPort.setMacAddress方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: defaultNeutronPortObject
import org.opendaylight.controller.networkconfig.neutron.NeutronPort; //导入方法依赖的package包/类
public NeutronPort defaultNeutronPortObject() {
NeutronPort neutronPort = new NeutronPort();
neutronPort.setPortUUID("64a271fe-0216-46bc-a3e6-1ff582fbd324");
neutronPort.setNetworkUUID("54a271fe-0216-46bc-a3e6-1ff582fbd324");
neutronPort.setMacAddress("02:70:72:93:4d:d6");
neutronPort.setName("port12");
neutronPort.setDeviceID("100071fe-0216-46bc-a3e6-1ff582fbd324");
neutronPort.setTenantID("100071fe-0216-46bc-a3e6-1ff582fbd324");
List<Neutron_IPs> ips = new ArrayList<Neutron_IPs>();
ips.add(mockNeutron_IPs);
neutronPort.setFixedIPs(ips);
return neutronPort;
}
示例2: testcanUpdatePortMacAddress
import org.opendaylight.controller.networkconfig.neutron.NeutronPort; //导入方法依赖的package包/类
@Test
public void testcanUpdatePortMacAddress() throws IOException {
Activator.apiConnector = mockedApiConnector;
NeutronPort neutronPort = defaultNeutronPortObject();
NeutronPort dummyNeutronPort = detaNeutronPort();
dummyNeutronPort.setMacAddress("00:70:72:93:4d:d6");
assertEquals(HttpURLConnection.HTTP_BAD_REQUEST, porthandler.canUpdatePort(dummyNeutronPort, neutronPort));
}
示例3: defaultNeutronPortObject
import org.opendaylight.controller.networkconfig.neutron.NeutronPort; //导入方法依赖的package包/类
public NeutronPort defaultNeutronPortObject() {
NeutronPort neutronPort = new NeutronPort();
neutronPort.setPortUUID("64a271fe-0216-46bc-a3e6-1ff582fbd324");
neutronPort.setNetworkUUID("54a271fe-0216-46bc-a3e6-1ff582fbd324");
neutronPort.setMacAddress("02:70:72:93:4d:d6");
neutronPort.setName("port12");
neutronPort.setDeviceID("100071fe-0216-46bc-a3e6-1ff582fbd324");
neutronPort.setTenantID("001570f2-17b1-4fc3-99ec-1b7f7778a29a");
List<Neutron_IPs> ips = new ArrayList<Neutron_IPs>();
ips.add(mockNeutron_IPs);
neutronPort.setFixedIPs(ips);
return neutronPort;
}
示例4: defaultNeutronPortObject
import org.opendaylight.controller.networkconfig.neutron.NeutronPort; //导入方法依赖的package包/类
public NeutronPort defaultNeutronPortObject() {
NeutronPort neutronPort = new NeutronPort();
neutronPort.setPortUUID("64a271fe-0216-46bc-a3e6-1ff582fbd324");
neutronPort.setNetworkUUID("54a271fe-0216-46bc-a3e6-1ff582fbd324");
neutronPort.setMacAddress("02:70:72:93:4d:d6");
neutronPort.setName("port12");
neutronPort.setDeviceID("100071fe-0216-46bc-a3e6-1ff582fbd324");
List<Neutron_IPs> ips = new ArrayList<Neutron_IPs>();
ips.add(mockNeutron_IPs);
neutronPort.setFixedIPs(ips);
return neutronPort;
}