本文整理汇总了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");
}
示例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);
}
示例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);
}
示例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);
}