Impl. Proposal CM Subscriptions : Creating/Merging( Positive Scenarios )

Impl. Proposal CM Subscriptions : Creating/Merging( Positive Scenarios )

References

https://lf-onap.atlassian.net/browse/CPS-1870

https://lf-onap.atlassian.net/browse/CPS-1812

 

Assumptions

#

Issue

Notes

Decisions

#

Issue

Notes

Decisions

1

 

 

 

 

Issues & Decisions

#

Issue

Notes

Decisions

#

Issue

Notes

Decisions

1

Whether we need to persist the raw request for auditing purpose?

 

 

2

Keep track of the correlation id

Request to and from DMI Plugin has to be tracked hence we need to have a correlation id for this. ( to match the request and response )

 

Overview

This page only contains the details used for starting the development on the Merging of Subscriptions use case. Just the straight forward scenarios will be covered and the overall solution will be build on top of it.

 

Schema Definitions

 

  1. DME to NCMP Subscription Request

    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    1

    id

    header

    String



    Y



    2

    version

    header

    String 

    1.0

    Y



    3

    source

    header

    String

    DME

    Y



    4

    type

    header

    String

    subscriptionCreateRequest

    Y



    5

    dataschema

    header

    URI

    org.onap.ncmp.cm.subscription:1.0.0

    Y



    6

    data



    Object



    Y



    7

    subscriptionId

    data

    String



    Y



    8

    predicates

    data

    Array



    N



    9

    targetFilter

    predicates

    Array of String



    Y



    10

    scopeFilter

    predicates

    Object



    N



    11

    datastore

    scopeFilter

    String



    Y



    12

    xpathFilter

    scopeFilter

    Array of String



    Y




    Example

    DME to NCMP Subscription Request

    id : random-UUID version : "1.0" source : "DME" type : "subscriptionCreateRequest", dataschema : org.onap.ncmp.cm.subscription:1.0.0  { "data": { "subscriptionId": "unique subscription id", // mandatory "predicates": [ { “targetFilter” : list of cmhandles, // mandatory "scopeFilter" : { "datastore": “ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running", // optional. default is passthrough-operational "xpath-filter": list of valid xpaths // mandatory } } ] }



  2. NCMP to DMI-Plugin Subscription Request

    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    1

    id

    header

    String



    Y



    2

    version

    header

    String 

    1.0

    Y



    3

    source

    header

    String

    DME

    Y



    4

    type

    header

    String

    subscriptionCreateRequest

    Y



    5

    dataschema

    header

    URI

    org.onap.ncmp.dmi.cm.subscription:1.0.0

    Y



    6

    correlationid

    header

    String

    subscriptionId#dmiPluginName

    Y

    Concatenation of subscriptionId and dmi plugin name

    7

    data



    Object



    Y



    8

    cmHandles

    data

    Array



    Y



    9

    cmhandleId

    cmHandles

    String



    Y



    10

    privateProperties

    cmHandles

    Map



    N



    11

    predicates

    data

    Array



    N



    12

    targetFilter

    predicates

    Array of String



    Y

    list of cm handle ids

    13

    scopeFilter

    predicates

    Object



    N



    14

    datastore

    scopeFilter

    String



    Y

    ncmp-datastore:passthrough-operational OR ncmp-datastore:passthrough-running 

    15

    xpathFilter

    scopeFilter

    Array of String



    Y



    Example

    NCMP to DMI-Plugin Subscription Request

    id : random UUID version : 1.0 source : "NCMP" type : "subscriptionCreateRequest" dataschema : org.onap.ncmp.dmi.cm.subscription:1.0.0 correlationId ( concatenation of subscriptionId and dmi-plugin-name with a separator) { "data": { "cmhandles" : [ // mandatory { "cmHandleId": "cmhandle1", "privateProperties": {...} }, { "cmHandleId": "cmhandle2", "privateProperties": {...} }, { "cmHandleId": "cmhandle3", "privateProperties": {...} } ] "predicates": [ { “targetFilter” : [“cmHandle1”, “cmHandle2”, "cmhandle3"], // mandatory "scopeFilter" : { "datastore": “ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running", // optional. default is passthrough-operational "xpathFilter": list of valid xpaths // mandatory } },   { “targetFilter” : [“cmHandle1”, “cmHandle2”, "cmhandle3"], "scopeFilter" : { "datastore": “ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running", // optional. default is passthrough-operational "xpathFilter": list of valid xpaths * } }  ] }



  3. DMI-Plugin to NCMP Subscription Response

    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    1

    id

    header

    String



    Y



    2

    version

    header

    String 

    1.0

    Y



    3

    source

    header

    String

    DME

    Y



    4

    type

    header

    String

    subscriptionCreateResponse

    Y



    5

    dataschema

    header

    URI

    org.onap.ncmp.dmi.cm.subscription:1.0.0

    Y



    6

    correlationid

    header

    String

    subscriptionId#dmiPluginName

    Y

    Concatenation of subscriptionId and dmi plugin name

    7

    data



    Object



    Y



    8

    statusCode

    data

    String



    Y

    1 - Accept the subscription request
    104 - Reject the subscription request

    9

    statusMessage

    data

    String



    Y

    ACCEPTED

    REJECTED


    Example

    DMI-Plugin to NCMP Subscription Response

    id : random UUID version : "1.0" source : <dmi-plugin-name> type : "subcriptionCreateResponse" dataschema : org.onap.ncmp.dmi.cm.subscription:1.0.0 correlationid : ( concatenation of subscriptionId and dmi-plugin-name with a separator) { "data" : { "statusCode": "1/104", // mandatory "statusMessage" : "ACCEPTED/REJECTED" // mandatory } }



  4. NCMP to DME Subscription Response

    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    Name

    Parent

    Type

    Example

    Mandatory ?

    Notes

    1

    id

    header

    String



    Y



    2

    version

    header

    String 

    1.0

    Y



    3

    source

    header

    String

    DME

    Y



    4

    type

    header

    String

    subscriptionDeleteResponse

    Y



    5

    dataschema

    header

    URI

    org.onap.ncmp.cm.subscription:1.0.0

    Y



    6

    correlationid

    header

    String

    subscriptionId

    Y



    7

    data



    Object



    Y



    8

    subscriptionId

    data

    String



    Y



    9

    acceptedTargets

    data

    Array of String



    N



    10

    rejectedTargets

    data

    Array of String



    N



    11

    pendingTargets

    data

    Array of String



    N




    Example

    NCMP to DME Subscription Response

    id : random UUID version : "1.0" source : "NCMP" type : "subcriptionCreateResponse", dataschema : org.onap.ncmp.cm.subscription:1.0.0, correlationId : <subscriptionId> { "data": { "subscriptionId": "sample-subscription-id", // mandatory   "accepted-targets" : ["ch-1", ...], // optional "rejected-targets" : ["ch-1", ...], // optional "pending-targets" : ["ch-1", ...], // optional } }

Comments