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

Compare with Current View Page History

« Previous Version 2 Next »

Study the existing SPI used in ENM to migrate from Versant to ENM implementation. 

(TBA link to new GitHub repo with shared)

Learning from this SPI can be used to propose an SPI for the CPS SPI that also allows to 'plug-in' different DBs

  1. Interface with Tony Finnerty for direction
  2. ONAP Wiki Page describing
    1. High level structure of ENM SPI
    2. Already implemented SPI methods (from PoC)
    3. Suggestions for future structure & functionality
  3. Discuss with Team and agree proposal

Jira Ticket:

CCSDK-2871 - DP: Agree and document proposed long-term Java API(s) IN PROGRESS

Jira Backlog:

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


Open Issues/Decisions


CPS Persistence SPI

https://github.com/Ericsson/cps-persistence-spi/tree/spi-docs/docs/dps-core-spi


High level structure of ENM SPI

Query

Query SPI 

Path - cps-persistence-spi-spi-docs\docs\dps-core-spi\com\ericsson\oss\itpf\datalayer\dps\query\spi

Interface 

Interface Definition

 Interface Capabilities

Consumed Models

QueryService

Interface

Service responsible for dealing with query related features of Data Persistence Service.


Executes queries 



QueryPathService

Service responsible for dealing with path query related features of Data Persistence Service.

  • Executes the query ands gets the result as an iterable of 'full' objects queried.
  • Project the results from points in the query path. Projections allow the user project single data elements from the objects which were found along a query path - these elements can be modelled (i.e. persistence object attributes) or non-modelled (i.e. object fields).


Query Criterion

cps-persistence-spi-spi-docs\docs\dps-core-spi\com\ericsson\oss\itpf\datalayer\dps\query\criterion\spi

Interface 

Interface Definition

 Interface Capabilities

Consumed Models

SortingOrder

Interface

Defines a sorting order which can be applied to a query to order its result set.


Retrieves the sorting element used in this sorting order.

Retrieves the sorting direction used in this sorting order.

Retrieves the sorting type used in this sorting order.




DpsTypeQuery

Specifies common functionality used by type queries.


Get the namespace of the type of object the type query is to target.

Get the type of object that the type query is to target.



DpsQuery

Specifies methods that are used internally by DPS but are not to be exposed externally to clients.


Gets the sorting orders used in this query criteria.

Gets the category of query that this query criteria represents.

Gets the restriction used in these query criteria, including any DPS internal restrictions added in addition to those set by the user.

Indicates if conversion is needed for the returned results.

Are the query results to be ordered in a depth first manner?



DpsContainmentQuery

Contains common functionality used by containment queries.


Retrieve the FDN of the base MO of this query. The base MO is the managed object under which we will look for MOs matching the other criteria of this query.



DpsTypeContainmentQuery

Aggregates common functionality to type queries and containment queries.





Query Restriction

cps-persistence-spi-spi-docs\docs\dps-core-spi\com\ericsson\oss\itpf\datalayer\dps\query\restriction\spi

Definition

Interface Definition

 Interface Capabilities

Class AttributeInModelRestriction

Restriction to filter instances of specific versions (model version) only, where the given attribute name is defined.

  • negate

Method that is inverting the given restriction

Returns - newly created restriction that is a negation of the base restriction

  • getRestrictionType

Indicates the type of restriction type that this restriction represents.

  • getAttributeName

Is the restriction negated?



Class AttributePathRestriction

A restriction to compare modeled attributes against path values.

  • negate
  • getRestrictionType
  • getAttribute
  • toString

Class AttributeRestriction

Simple restriction involving attribute values.

  • getRestrictionType

Class BetweenRestriction

Class to resolve between and not between restrictions.

  • negate
  • getRestrictionType
  • getAttributeName
  • getLowerAttributeValue
  • getHigherAttributeValue
  • isNegated
  • toString

Class ContainmentRestriction

Creates a containment restriction applicable for change logs (e.g. get change logs for all managed objects under supplied FDN of MIB root)

  • negate
  • getRestrictionType
  • getStringToMatch

Class DescendantsRestriction

Class to resolve descendants and not descendants restrictions.

  • negate
  • getRestrictionType
  • getDistance
  • getDescendantsScope
  • isNegated

Interface DpsRestriction

DPS Internal contract for RestrictionAll restrictions implementation of DPS should implement DpsRestriction instead of Restriction.

  • negate
  • getRestrictionType
  • isCdtRestriction
  • canUseWithOrRestrictions

Class HasMemberRestriction

Creates a HasMember restriction applicable for group entities (e.g. get groups that have a persistence object as member)

  • HasMemberRestriction
  • negate
  • getRestrictionType
  • getAttributeName
  • getMemberValue

Class InRestriction

Class that creates an IN restriction type, restricting an attribute to a list of values.

  • negate
  • getRestrictionType
  • getAttributeName
  • getAllowedValues
  • isNegated
  • toString
  • getString

Class InternalRestriction

Creates an internal restriction applicable for group entities.

  • getRestrictionType

Class ListMemberRestriction

A restriction which verifies if a list attribute has members matching specific restrictions.

  • matchAllMembers
  • negate
  • getRestrictionType
  • toString

Class ListRestriction

Common functionality of a List restriction.

  • getListAttributeName
  • getRestrictionToApply
  • isNegated

Class LogicalRestriction

Implement logical restriction (AND/OR) and the negation of this logical restriction.

  • negate
  • getRestrictionType
  • getRestrictionList
  • getLogicalOperator
  • isNegated
  • toString

Class NullValueRestriction

Implementation of the null value restriction and not null value restriction.

  • negate
  • getRestrictionType
  • getAttributeName
  • isNegated
  • toString

Class ObjectFieldBetweenRestriction

Class to resolve between and not between restrictions for ObjectFields.

  • getRestrictionType
  • getObjectField

Gets the object field that the restriction applies to.

  • toString

Class ObjectFieldInRestriction

Class that creates an IN Restriction type, restricting a Object Field to a list of values.


  • getRestrictionType
  • getObjectField
  • toString

Class ObjectFieldPartialMatchRestriction

Implementation of the partial match restriction and not match restriction.


  • getRestrictionType
  • getObjectField
  • toString

Class ObjectFieldPathRestriction

A restriction to compare object fields against path values.


  • negate

  • getRestrictionType
  • getObjectField
  • toString

Interface ObjectFieldRestriction

A restriction that applies to an object field as opposed to a modelled field.

  • getObjectField

Class ObjectFieldRetriever

Some object field restrictions serialized as part of a saved query by earlier versions of the relevant restriction class may be missing the object field when deserialized. This utility class allows the missing object field to be determined from the 'attributeName' that will have been stored instead.

TODO This workaround can be removed once we have given teams time to recreate any object field saved queries they may have.

  • retrieve
Retrieves the object field associated with the supplied field name.This method performs the reverse of the now deprecated ObjectField.getFieldName() method.

Class ObjectFieldSimpleRestriction

Creates a simple restriction (e.g. compare one field to one value) for object fields.


  • getRestrictionType
  • getObjectField
  • toString


Class PartialMatchRestriction


Implementation of the partial match restriction and not match restriction.


  • negate

  • getRestrictionType

  • getMatchConditionType

  • getAttributeName

  • isNegated

  • getStringToMatch

  • toString

Class PathRestriction

Base class for path restrictions.


  • getValueToMatch
  • getOperator
  • getString


Class RedundantRestriction

Abstract class to add property to check for redundant restriction in query.


  • isRedundant

Gets the flag value of a query, which is using only one, AND-ed redundant restriction or not.

  • setRedundant

Sets a flag of a query, which is using only one, AND-ed redundant restriction or not.

Class SimpleRestriction

Creates a simple restriction (e.g. compare one field to one value).


  • negate

  • getAttributeName

  • getAttributeValue

  • getSimpleExpressionOperator

  • toString



  • No labels