本文整理汇总了Java中org.onosproject.vtnrsc.SegmentationId.segmentationId方法的典型用法代码示例。如果您正苦于以下问题:Java SegmentationId.segmentationId方法的具体用法?Java SegmentationId.segmentationId怎么用?Java SegmentationId.segmentationId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.onosproject.vtnrsc.SegmentationId
的用法示例。
在下文中一共展示了SegmentationId.segmentationId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.onosproject.vtnrsc.SegmentationId; //导入方法依赖的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.SegmentationId; //导入方法依赖的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: getL3vni
import org.onosproject.vtnrsc.SegmentationId; //导入方法依赖的package包/类
@Override
public SegmentationId getL3vni(TenantId tenantId) {
checkNotNull(tenantId, "tenantId cannot be null");
SegmentationId l3vni = l3vniTenantMap.get(tenantId);
if (l3vni == null) {
long segmentationId = coreService.getIdGenerator(RUNNELOPTOPOIC)
.getNewId();
l3vni = SegmentationId.segmentationId(String
.valueOf(segmentationId));
l3vniTenantMap.put(tenantId, l3vni);
}
return l3vni;
}
示例4: execute
import org.onosproject.vtnrsc.SegmentationId; //导入方法依赖的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);
}