Class NetconfConfigUtils
- java.lang.Object
-
- io.lighty.modules.southbound.netconf.impl.util.NetconfConfigUtils
-
public class NetconfConfigUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static Set<org.opendaylight.yangtools.yang.binding.YangModuleInfo>NETCONF_CALLHOME_MODELSstatic StringNETCONF_CONFIG_ROOT_ELEMENT_NAMEstatic Set<org.opendaylight.yangtools.yang.binding.YangModuleInfo>NETCONF_TOPOLOGY_MODELS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.opendaylight.aaa.encrypt.AAAEncryptionServicecreateAAAEncryptionService(org.opendaylight.yang.gen.v1.config.aaa.authn.encrypt.service.config.rev160915.AaaEncryptServiceConfig encrySrvConfig)Create an instance ofAAAEncryptionServicefrom provided configuration.static NetconfConfigurationcreateDefaultNetconfConfiguration()Create default Netconf Southbound configuration, Lighty services are not populated.static NetconfConfigurationcreateNetconfConfiguration(InputStream jsonConfigInputStream)Load netconf southbound configuration from InputStream containing JSON data.static org.opendaylight.yang.gen.v1.config.aaa.authn.encrypt.service.config.rev160915.AaaEncryptServiceConfiggetDefaultAaaEncryptServiceConfig()Create default configuration forAAAEncryptionServicestatic NetconfConfigurationinjectServicesToConfig(NetconfConfiguration configuration)Inject services from LightyServices to Netconf southbound configuration.static NetconfConfigurationinjectServicesToTopologyConfig(NetconfConfiguration configuration, LightyServices lightyServices)Inject services from LightyServices and netconf client dispatcher to Netconf southbound topology configuration.
-
-
-
Field Detail
-
NETCONF_CONFIG_ROOT_ELEMENT_NAME
public static final String NETCONF_CONFIG_ROOT_ELEMENT_NAME
- See Also:
- Constant Field Values
-
NETCONF_TOPOLOGY_MODELS
public static final Set<org.opendaylight.yangtools.yang.binding.YangModuleInfo> NETCONF_TOPOLOGY_MODELS
-
NETCONF_CALLHOME_MODELS
public static final Set<org.opendaylight.yangtools.yang.binding.YangModuleInfo> NETCONF_CALLHOME_MODELS
-
-
Method Detail
-
createNetconfConfiguration
public static NetconfConfiguration createNetconfConfiguration(InputStream jsonConfigInputStream) throws ConfigurationException
Load netconf southbound configuration from InputStream containing JSON data. Lighty services are not populated in this configuration.- Parameters:
jsonConfigInputStream- InputStream containing Netconf config. data in JSON format.- Returns:
- Object representation of configuration data.
- Throws:
ConfigurationException- In case JSON configuration cannot be deserializable to JSON tree nodes or cannot bind JSON tree node to type.
-
createDefaultNetconfConfiguration
public static NetconfConfiguration createDefaultNetconfConfiguration()
Create default Netconf Southbound configuration, Lighty services are not populated.- Returns:
- Object representation of configuration data.
-
injectServicesToConfig
public static NetconfConfiguration injectServicesToConfig(NetconfConfiguration configuration) throws ConfigurationException
Inject services from LightyServices to Netconf southbound configuration.- Parameters:
configuration- Netconf southbound configuration where should be services injected.- Returns:
- Netconf southbound configuration with injected services from Lighty core.
- Throws:
ConfigurationException
-
injectServicesToTopologyConfig
public static NetconfConfiguration injectServicesToTopologyConfig(NetconfConfiguration configuration, LightyServices lightyServices) throws ConfigurationException
Inject services from LightyServices and netconf client dispatcher to Netconf southbound topology configuration.- Parameters:
configuration- Netconf southbound topology configuration where should be services injected.lightyServices- LightyServices from running Lighty core.- Returns:
- Netconf southbound topology configuration with injected services from Lighty core.
- Throws:
ConfigurationException
-
getDefaultAaaEncryptServiceConfig
public static org.opendaylight.yang.gen.v1.config.aaa.authn.encrypt.service.config.rev160915.AaaEncryptServiceConfig getDefaultAaaEncryptServiceConfig()
Create default configuration forAAAEncryptionService- Returns:
- default configuration.
-
createAAAEncryptionService
public static org.opendaylight.aaa.encrypt.AAAEncryptionService createAAAEncryptionService(org.opendaylight.yang.gen.v1.config.aaa.authn.encrypt.service.config.rev160915.AaaEncryptServiceConfig encrySrvConfig) throws ConfigurationExceptionCreate an instance ofAAAEncryptionServicefrom provided configuration.- Parameters:
encrySrvConfig- service configuration holder.- Returns:
- configured instance of
AAAEncryptionService - Throws:
ConfigurationException- in case provided configuration is not valid.
-
-