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