You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Although the PoC will only implement a few of the possible Java API methods it is important to have a good detailed view of the structure and naming of this interface going forward and document it.

Acceptance Criteria for Proposed Java Interface:

  1. Should follow ONAP or wider best practice
  2. Documented on ONAP Wiki
  3. Discussed and agreed within CPS Team
  4. Discussed and agreed with wider community


Currently we are considering 3 'separated' Java APIs or 'groups' of methods:

  1. Models (add, list)
  2. Data (CRUD)
  3. Queries

Jira Ticket:

CCSDK-2871 - Getting issue details... STATUS

Jira Backlog:

https://jira.onap.org/secure/RapidBoard.jspa?rapidView=223&view=planning.nodetail&selectedIssue=CCSDK-2912&issueLimit=100


Open Issues/Decisions

#

Description

Details

Decisions

1Should the java interface take in objects(like REST interface) or a few individual fields in a signature?




Description of Operations for Modelling Storage

POST /dataspaces/{dataspace-name}/modules

Description

Create (and validate) a module set (upload a model file) for the given dataspace. Payload is a file containing 1 or more yang modules. This operation will also create a dataspace.

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired
filea yang model fileformyangoptional

Responses:

200 OK

GET /dataspaces/{dataspace-name}/modules?namespace="namespace-name"&revision="revision"

Description

Read all modules in the store.

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired
namespace-nameThe name of the namepsacequerystringoptional
revisionModule revision querystringoptional

200 OK

DELETE /dataspaces/{dataspace-name}/

Description

Delete a dataspace.

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired

200 OK

Description of Operations for Anchor Persistence

POST /dataspaces/{dataspace-name}/anchors

Description

Create a new anchor in the given dataspace (payload includes anchor name, module namespace and revision)

Request Body

application/json

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired

200 OK

GET /dataspaces/{dataspace-name}/anchors/{anchor-name}

Description

Read an anchor and the associated attributes given a anchor and a dataspace.

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired
anchor-nameThe name of the anchorpathstringrequired

200 OK


DELETE /dataspaces/{dataspace-name}/anchors/{anchor-name}

Description

Delete an anchor given a anchor and a dataspace. This will delete the whole tree.

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired
anchor-nameThe name of the anchorpathstringrequired

200 OK


GET /dataspaces/{dataspace-name}/anchors

Description

Read all anchors in the given a dataspace.

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired

200 OK


Description of Operations for Node Persistence


POST /dataspaces/{dataspace-name}/nodes

Description

Create a (root) node for a given anchor for the given dataspace, the node can have children. Their children will also be persisted as separate nodes in the system.

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired
fileModel fileformyangrequired

200 OK



GET /dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes

Description

Get a node given an anchor for the given dataspace (return just one level with just xpath references to its children)

Request Body

{ xpath: { xpath specification }}

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired
anchor-nameThe name of the anchorpathstringrequired

200 OK


GET /dataspaces/{dataspace-id}/nodes

Description

Get a node (under any anchor) given a Xpath expression for the given dataspace

Get all the relevant nodes given a schema node identifier for the given dataspace

Request Body

{ xpath: { xpath specification }}

Request Parameters:

NameDescriptionTypeData type
dataspace-nameThe name of the dataspacepathstringrequired

200 OK



Schema definitions

dataspace : object

Description:

A dataspace is an object that contains yang modules.

anchor : object

Description:

An anchor is an object used the describe the base of the tree. A anchor must exist before creating a model instance


Namespace : object

Description:

A namespace is declared by the yang module.

  • No labels