本文整理汇总了Java中org.onosproject.vtnrsc.PhysicalNetwork.physicalNetwork方法的典型用法代码示例。如果您正苦于以下问题:Java PhysicalNetwork.physicalNetwork方法的具体用法?Java PhysicalNetwork.physicalNetwork怎么用?Java PhysicalNetwork.physicalNetwork使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.onosproject.vtnrsc.PhysicalNetwork
的用法示例。
在下文中一共展示了PhysicalNetwork.physicalNetwork方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.onosproject.vtnrsc.PhysicalNetwork; //导入方法依赖的package包/类
@Override
protected void execute() {
TenantNetworkService service = get(TenantNetworkService.class);
TenantNetwork network = new DefaultTenantNetwork(TenantNetworkId.networkId(id), name,
adminStateUp,
TenantNetwork.State.valueOf(state),
shared, TenantId.tenantId(tenantID),
routerExternal,
TenantNetwork.Type.valueOf(type),
PhysicalNetwork.physicalNetwork(physicalNetwork),
SegmentationId.segmentationId(segmentationID));
Set<TenantNetwork> networksSet = Sets.newHashSet();
networksSet.add(network);
service.updateNetworks(networksSet);
}
示例2: createDummyGluonNetwork
import org.onosproject.vtnrsc.PhysicalNetwork; //导入方法依赖的package包/类
/**
* Creates dummy gluon network to the VTN.
*
* @param state the base port state
* @param adminStateUp the base port admin status
* @param tenantID the base port tenant ID
*/
private void createDummyGluonNetwork(boolean adminStateUp, String state,
TenantId tenantID) {
String id = "11111111-1111-1111-1111-111111111111";
String name = "GluonNetwork";
String segmentationID = "50";
String physicalNetwork = "None";
TenantNetwork network = new DefaultTenantNetwork(TenantNetworkId.networkId(id), name,
adminStateUp,
TenantNetwork.State.valueOf(state),
false, tenantID,
false,
TenantNetwork.Type.LOCAL,
PhysicalNetwork.physicalNetwork(physicalNetwork),
SegmentationId.segmentationId(segmentationID));
Set<TenantNetwork> networksSet = Sets.newHashSet(network);
tenantNetworkService.createNetworks(networksSet);
}
示例3: execute
import org.onosproject.vtnrsc.PhysicalNetwork; //导入方法依赖的package包/类
@Override
protected void execute() {
TenantNetworkService service = get(TenantNetworkService.class);
TenantNetwork network = new DefaultTenantNetwork(TenantNetworkId.networkId(id), name,
adminStateUp,
TenantNetwork.State.valueOf(state),
shared, TenantId.tenantId(tenantID),
routerExternal,
TenantNetwork.Type.valueOf(type),
PhysicalNetwork.physicalNetwork(physicalNetwork),
SegmentationId.segmentationId(segmentationID));
Set<TenantNetwork> networksSet = Sets.newHashSet(network);
service.createNetworks(networksSet);
}