You are viewing an old version of this content. View the current version.
Compare with Current
View Version History
« Previous
Version 15
Next »
Jira Ticket:
CPS-37
-
Getting issue details...
STATUS
Decisions/Open Issues
| Description | Details | Decisions |
---|
1 | Assume flat attributes (no complex data types) but data could be stored as json object in SPI impl. for convenience/PoC |
|
|
2 | SPI Implementation NOT using Model (service) current ENM SPI does! |
|
|
3 | Are we going to have XPath/query builder? | - We should decide based on what the users want to use/is easy to use
- We don't want a query builder that eventually mimics XPaths functionality, use what is defined already XPATH sa a based but maybe supplement with a xpath-builder
|
|
4 | When do we get attributes? | How do control how many attributes we get back? | We will have an (optional) output specification with the following options - Default is no attributes
- All Attributes
- Specify attributes - output specification (filter)
|
5 | Should we use the name node or fragment? |
| We decided on the name DataNode |
6 | Do we want to split the interface? | Maybe we could just have a 3 Alternatives - all in one interface
- Limited number of interfaces e.g Data Objects/ Data Persistence/Query
- Very fine grained (see below)
| - DataStore SPI - methods to add data.
e.g dataStore.addChild(parentDataObject, childDataObject) - CpsAdmin Interface will handle the dataspaces and anchors
- Module SPI - responsible for handling modules and module sets
The above will be in separate maven modules. Any data object they need will be in the same module. We will not have a querybuilder in SPI but the SPI will have to understand the cpsPath. The java API will use a builder pattern to create a cpsPath |
ENM SPI Study
Details about the ENM SPI can be found here: Spike
Proposed Future Implementation of CPS SPI
DataStore SPI
| Name
| Capabilities |
---|
1 | DataStoreService | - DataNode getDataNode(cpsPath)
- Collection<DataNode> queryDataNodes(cpsPathQuery)
- getDataNode(cpsPath,outputSpecification)
- count(cpsPath)
- addDataNode(anchorName,dataNode)
- addChild(cpsPathParent,dataNode)
- addChildren(cpsPathParent,dataNode...)
- updateDataNode(anchorName,dataNode)
- setAttribute(cpsPath,attributeName,value)
- deleteDataNode(cpsPath)
|
2 | DataNode Object | - createDataNode()
- getCpsPath()
- getAttributes()
- getAttribute(name)
- setAttributes()
- setAttribute(name)
- getModule()
|
CpsAdmin SPI
| Name
| Capabilities |
---|
1 | DataspacePersistenceService
| - createDataspace(dataspaceName)
- getDataspace(dataspaceName)
- getDataspaces()
- exists(dataspaceName)
|
2 | AnchorPersistenceService | - createAnchor(dataspaceName, anchorName)
- getAnchors()
- getAnchor(anchorName)
- deleteAnchor(anchorName)
- associateAnchor(anchorName, moduleSetName)
- associateAnchor(anchorName, moduleRef)
- addDataNode(anchorName, dataNode)
|
3 | Dataspace (object) | createDataspace(dataspaceName)getName()
|
4 | Anchor Object | createAnchor(anchorName)getName()
|
Module SPI
| Name
| Capabilities |
---|
1 | ModulePersistenceService
| - createModuleSet(file)
- addModule(moduleRef, content)
- adModule(moduleSetName, moduleRef, content)
- deleteModule(moduleRef)
- YangModule getModule(moduleRef)
- Collection<YangModule> getModules(moduleSetName)
|
2 | YangModule | - ModuleRef getModuleRef()
- String getModuleContent()
|
3 | ModuleRef | - getNamespace()
- getRevision()
|