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


Java DefaultTenantNetwork类代码示例

本文整理汇总了Java中org.onosproject.vtnrsc.DefaultTenantNetwork的典型用法代码示例。如果您正苦于以下问题:Java DefaultTenantNetwork类的具体用法?Java DefaultTenantNetwork怎么用?Java DefaultTenantNetwork使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DefaultTenantNetwork类属于org.onosproject.vtnrsc包,在下文中一共展示了DefaultTenantNetwork类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: activate

import org.onosproject.vtnrsc.DefaultTenantNetwork; //导入依赖的package包/类
@Activate
public void activate() {

    appId = coreService.registerApplication(VTNRSC_APP);

    networkIdAsKeyStore = storageService.<TenantNetworkId, TenantNetwork>consistentMapBuilder()
            .withName(TENANTNETWORK)
            .withApplicationId(appId)
            .withPurgeOnUninstall()
            .withSerializer(Serializer.using(Arrays.asList(KryoNamespaces.API),
                                             TenantNetworkId.class,
                                             DefaultTenantNetwork.class,
                                             TenantNetwork.State.class,
                                             TenantId.class,
                                             TenantNetwork.Type.class,
                                             PhysicalNetwork.class,
                                             SegmentationId.class))
            .build().asJavaMap();

    log.info("Started");
}
 
开发者ID:shlee89,项目名称:athena,代码行数:22,代码来源:TenantNetworkManager.java

示例2: execute

import org.onosproject.vtnrsc.DefaultTenantNetwork; //导入依赖的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

示例3: createDummyGluonNetwork

import org.onosproject.vtnrsc.DefaultTenantNetwork; //导入依赖的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

示例4: execute

import org.onosproject.vtnrsc.DefaultTenantNetwork; //导入依赖的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.DefaultTenantNetwork类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。