@Service public class YmsManager extends Object implements YmsService
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.core.CoreService |
coreService |
| Constructor and Description |
|---|
YmsManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
deactivate() |
YdtResponse |
executeOperation(YdtBuilder operationRequest)
Once the NBI protocol translates the request information into an abstract
YANG data tree, it uses YANG management system as a broker to get the
operation executed in ONOS.
|
YangSchemaRegistry |
getSchemaRegistry()
Returns schema registry.
|
YangCodecHandler |
getYangCodecHandler()
Returns YANG codec handler utility.
|
String |
getYangFile(YangModuleIdentifier moduleIdentifier)
Protocols like RESTCONF, use the definitions within the YANG modules
advertised by the server are used to construct an RPC operation or
data resource identifier.
|
YangModuleLibrary |
getYangModuleLibrary()
Protocols like RESTCONF, share the list of YANG modules it support.
|
YangNotificationService |
getYangNotificationService()
Returns YANG notification service.
|
YdtBuilder |
getYdtBuilder(String logicalRootName,
String rootNamespace,
YmsOperationType opType)
Returns YANG data tree builder.
|
YdtBuilder |
getYdtBuilder(String logicalRootName,
String rootNamespace,
YmsOperationType opType,
Object schemaRegistryForYdt)
Returns YANG data tree builder attached with a given schema registry.
|
YdtWalker |
getYdtWalker()
Returns YANG data tree walker.
|
void |
registerDefaultCodec(YangDataTreeCodec defaultCodec,
YangProtocolEncodingFormat dataFormat)
Register protocol specific default CODEC.
|
void |
registerService(Object manager,
Class<?> service,
List<String> features)
Registers service with YANG management system.
|
void |
unRegisterService(Object appManager,
Class<?> yangService)
Unregisters service which is registered in YANG management system.
|
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.CoreService coreService
@Activate public void activate()
@Deactivate public void deactivate()
public YdtBuilder getYdtBuilder(String logicalRootName, String rootNamespace, YmsOperationType opType)
YmsServicegetYdtBuilder in interface YmsServicelogicalRootName - name of a protocol specific logical container
node to group data across multiple applications.
This is only a logical container to group more
than one application's root node. It is not
validated against any YANG definitionrootNamespace - namespace of logical root container, if any,
otherwise it can be sent as nullopType - maps the request type to a corresponding
operation request type to YANG management systempublic YdtBuilder getYdtBuilder(String logicalRootName, String rootNamespace, YmsOperationType opType, Object schemaRegistryForYdt)
YmsServicegetYdtBuilder in interface YmsServicelogicalRootName - name of a protocol specific logical container
node to group data across multiple
applications.
This is only a logical container to group
more
than one application's root node. It is not
validated against any YANG definitionrootNamespace - namespace of logical root container, if any,
otherwise it can be sent as nullopType - maps the request type to a corresponding
operation request type to YANG management
systemschemaRegistryForYdt - schema registry for Ydt, protocol CODECS get
this value from YMS in
"decodeProtocolDataToYdt" and
"decodeCompositeProtocolDataToYdt" and
provide it while obtaining YdtBuilderpublic YdtWalker getYdtWalker()
YmsServicegetYdtWalker in interface YmsServicepublic YdtResponse executeOperation(YdtBuilder operationRequest)
YmsServiceexecuteOperation in interface YmsServiceoperationRequest - operation request that was constructed
by NBI protocol using YANG data tree
builder. This operation request contains
operation request that needs to be
executed on the applicable application(s)public YangNotificationService getYangNotificationService()
YmsServicegetYangNotificationService in interface YmsServicepublic YangModuleLibrary getYangModuleLibrary()
YmsServicegetYangModuleLibrary in interface YmsServicepublic String getYangFile(YangModuleIdentifier moduleIdentifier)
YmsServicegetYangFile in interface YmsServicemoduleIdentifier - module's identifierpublic void registerDefaultCodec(YangDataTreeCodec defaultCodec, YangProtocolEncodingFormat dataFormat)
YmsServiceregisterDefaultCodec in interface YmsServicedefaultCodec - default codec to be used for a particular protocol
data formatdataFormat - data format to which encoding to be done.
Currently XML and
JSON formats are supported.public void registerService(Object manager, Class<?> service, List<String> features)
YmsServiceregisterService in interface YmsServicemanager - application manager instance which is
implementing the service defined in YANG.service - service interface generated by ONOS YANG
tools corresponding to the interface modeled
in YANG.features - mentions the list of YANG features supported
by the application implementation.
If it is null, then the application
implementation supports all the features
defined in the registered YANG module.public void unRegisterService(Object appManager, Class<?> yangService)
YmsServiceunRegisterService in interface YmsServiceappManager - application manager instance which is implementing
the service defined in YANG.yangService - service interface generated by ONOS YANG tools
corresponding to the interface modeled in YANG.public YangCodecHandler getYangCodecHandler()
YmsServicegetYangCodecHandler in interface YmsServicepublic YangSchemaRegistry getSchemaRegistry()