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


Java SegmentationId.segmentationId方法代码示例

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

示例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);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:27,代码来源:VpnPortManager.java

示例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;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:14,代码来源:VtnRscManager.java

示例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);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:TenantNetworkCreateCommand.java


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