Search in sources :

Example 1 with Up4Config

use of org.omecproject.up4.config.Up4Config in project up4 by omec-project.

the class ConfigPscEncap method doExecute.

@Override
protected void doExecute() throws Exception {
    if (enable == null) {
        return;
    }
    NetworkConfigService netCfgService = get(NetworkConfigService.class);
    CoreService coreService = get(CoreService.class);
    ApplicationId appId = coreService.getAppId(APP_NAME);
    Up4Config config = netCfgService.getConfig(appId, Up4Config.class);
    if (config == null) {
        print("No UP4 netcfg has been pushed yet");
        return;
    }
    config.setPscEncap(enable);
    netCfgService.applyConfig(appId, Up4Config.class, config.node());
}
Also used : NetworkConfigService(org.onosproject.net.config.NetworkConfigService) CoreService(org.onosproject.core.CoreService) ApplicationId(org.onosproject.core.ApplicationId) Up4Config(org.omecproject.up4.config.Up4Config)

Example 2 with Up4Config

use of org.omecproject.up4.config.Up4Config in project up4 by omec-project.

the class Up4DeviceManager method updateConfig.

private void updateConfig() {
    Up4Config up4Config = netCfgService.getConfig(appId, Up4Config.class);
    if (up4Config != null) {
        upfUpdateConfig(up4Config);
    }
    // We might end-up with requests for buffering but DBUF is not ready/configured yet.
    // Being DBUF best effort should not be a big deal if that happens at very beginning
    Up4DbufConfig dbufConfig = netCfgService.getConfig(appId, Up4DbufConfig.class);
    if (dbufConfig != null) {
        dbufUpdateConfig(dbufConfig);
    }
}
Also used : Up4DbufConfig(org.omecproject.up4.config.Up4DbufConfig) Up4Config(org.omecproject.up4.config.Up4Config)

Aggregations

Up4Config (org.omecproject.up4.config.Up4Config)2 Up4DbufConfig (org.omecproject.up4.config.Up4DbufConfig)1 ApplicationId (org.onosproject.core.ApplicationId)1 CoreService (org.onosproject.core.CoreService)1 NetworkConfigService (org.onosproject.net.config.NetworkConfigService)1