use of org.onosproject.net.config.basics.BasicRegionConfig in project onos by opennetworkinglab.
the class RegionAddPeerLocCommand method doExecute.
@Override
protected void doExecute() {
RegionId regionId = RegionId.regionId(id);
NetworkConfigService cfgService = get(NetworkConfigService.class);
BasicRegionConfig cfg = cfgService.getConfig(regionId, BasicRegionConfig.class);
cfg.addPeerLocMapping(peerId, locType, latOrY, longOrX).apply();
}
use of org.onosproject.net.config.basics.BasicRegionConfig in project onos by opennetworkinglab.
the class RegionAddCommand method doExecute.
@Override
protected void doExecute() {
RegionAdminService service = get(RegionAdminService.class);
RegionId regionId = RegionId.regionId(id);
NetworkConfigService cfgService = get(NetworkConfigService.class);
BasicRegionConfig cfg = cfgService.addConfig(regionId, BasicRegionConfig.class);
setConfigurationData(cfg);
List<Set<NodeId>> masters = parseMasterArgs();
service.createRegion(regionId, name, REGION_TYPE_MAP.get(type), masters);
print("Region successfully added.");
}
Aggregations