Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Assumptions


IssueNotes Sign-off
1alternateId not used when processing 'deletedCmHandles' or 'upgradedCmHandles'Any alternateId stored in the cache earlier will be used

kieran mccarthy   

2In case of updating, when users try to change an alternateId we should ignore it.Ignore it a silent way (e.g: logging message), no exception should be thrown!

Kolawole Adebisi-AdeolokunYes, ignore as long as it is documented this is not supported (yaml) 

3a unique CM Handle ID (populated with hashes)  will remain in placeto support duplicated alternated IDs, she see also decision #5


Issues & Decisions

ENMS ne thus ENMS explained. Agreed actions:
  • cm handle ID remains populated with unique hash values (see assumption #3)
    (client side might need to update current algorithm to include ENM Name in the hash calculation)
  • When an interface uses a non-unique alternative id the operation wil be rejected. A detailed impact analysis for each existing and proposed interface is needed. kieran mccarthy will work with Levente Csanyi to describe these impacts, agree how to handle and agree on possible (changes in) characteristics requirements of the impacted interface methods

    IssueNotes Decision
    1Is FDN optional?Is it possible to register a cmHandle without an FDN?

    Toine Siebelink Yes it is optional as not everyone will use it

    2In Hazelcast what is the key?Is it the FDN or the cmHandleId?

    Toine Siebelink create 2 maps:

    1. alternate id → cm-handle-id
    2. cm-handle-id → alternate id
    3Check alternateId in 'updatedCmHandles'Assuming updatedCHandle should NOT be used to correct/change the AlternateId for a CmHandleId

    Alternate IDs are immutable once they are set.
    However if a previously created CM Handle's alternate ID is not defined then an update should be possible.
    The only way to change this value is to delete the current CM Handle and then re-register it.

    4Should we persist the alternateId?Should we modify the registry model?

    Toine Siebelink Yes, the Inventory Model should update with the AlternatId as detailed below

    5Alternative ID is NOT unique!multiple NMs might be using same subnetwork names i the FDNs and as NCMP manage multiples NM's NCMP can encounter duplicates.

    FDNs will be Unique 

    6Add a cm Handle with a alternate ID that is already in use (for another CM Handle)

    Error report solution will be easier if we do NOT add it and treat it like a 'normal' duplicate cm handle

    kieran mccarthy do not add! Rephrase error to
    'CM Handle Id or Alternate ID already in use'

    Alternate identifiers during registration

    ...

    RestInputCmHandle

    Field nameType
    cmHandle

    String

    cmHandleProperties

    Object

    publicCmHandleProperties

    Object

    moduleSetTag

    String

    trustLevel

    String

    alternateId

    String

    Save the cmHandleId and the alternateId to caches

    During registration the new identifier must be saved to a cache. Because it could be reused later for queries.

    ...

    The first map should be structured in a way where the original CM Handle ID is the key and the alternate ID is the value.

    The second map should be the other way around.

    Like this we will be able to map entities back and forth during queries quickly based on what value we have in the queries.


    Inventory Use cases

    create (initial inventory)

    ...

    In case of a DELETE operation only the cmHandleId provided in an array of strings.However during removal we should check if any of the two caches containing the cmHandleId and that is the case we should remove those entries.

    upgrade

    Assuming that it's ignored.

    ...

    Code Block
    languagexml
    titleDMI Registry Model 2023-11-27
    linenumberstrue
    collapsetrue
    module dmi-registry {
    
      yang-version 1.1;
    
      namespace "org:onap:cps:ncmp";
    
      prefix dmi-reg;
    
      contact "toine.siebelink@est.tech";
    
      revision "2023-11-27" {
        description
        "Added alternateId";
      }
    
      revision "2023-08-23" {
        description
        "Added ModuleSetTag";
      }
    
      revision "2022-05-10" {
        description
        "Added DataSyncEnabled, SyncState with State, LastSyncTime, DataStoreSyncState with Operational and Running syncstate";
      }
    
      revision "2022-02-10" {
        description
        "Added State, LockReason, LockReasonDetails to aid with cmHandle sync and timestamp to aid with retry/timeout scenarios";
      }
    
      revision "2021-12-13" {
        description
        "Added new list of public additional properties for a Cm-Handle which are exposed to clients of the NCMP interface";
      }
    
      revision "2021-10-20" {
        description
        "Added dmi-data-service-name & dmi-model-service-name to allow separate DMI instances for each responsibility";
      }
    
      revision "2021-05-20" {
        description
        "Initial Version";
      }
    
      grouping LockReason {
        leaf reason {
          type string;
        }
        leaf details {
          type string;
        }
      }
    
      grouping SyncState {
       leaf sync-state {
         type string;
       }
       leaf last-sync-time {
         type string;
       }
      }
    
      grouping Datastores {
        container operational {
          uses SyncState;
        }
        container running {
          uses SyncState;
        }
      }
    
      container dmi-registry {
        list cm-handles {
          key "id";
          leaf id {
            type string;
          }
          leaf dmi-service-name {
            type string;
          }
          leaf dmi-data-service-name {
            type string;
          }
          leaf dmi-model-service-name {
            type string;
          }
          leaf module-set-tag {
            type string;
          }
          leaf alternate-id {
            type string;
          }
    
          list additional-properties {
            key "name";
            leaf name {
              type string;
            }
            leaf value {
              type string;
            }
          }
    
          list public-properties {
            key "name";
            leaf name {
              type string;
            }
            leaf value {
              type string;
            }
          }
    
          container state {
            leaf cm-handle-state {
              type string;
            }
    
            container lock-reason {
              uses LockReason;
            }
    
            leaf last-update-time {
              type string;
            }
    
            leaf data-sync-enabled {
              type boolean;
              default "false";
            }
    
            container datastores {
              uses Datastores;
            }
          }
        }
      }
    }
    
    
    

    Error Reporting

    Error Scenarios


    Use-caseCM Handle IdAlternate IdReportAdd Cm HandleStore Alternate IDNotes
    1New registrationDuplicatedN/A109, cm-handle already existsNoNo
    2New RegistrationUniqueused for other cm handle111, alternate id already associatedNoNoNew NCMP error
    3Update RegistrationNewN/A100, cm handle id(s) not foundN/ANo
    4Update RegistrationExistalready set111, alternate id already associatedN/ANoNew NCMP error
    5Update RegistrationExistUse by other cm handle111, alternate id already associatedN/ANoNew NCMP error

    Current Implementation of Duplicate Cm Handle Registration (during batch)

    TODO: Expand on how below works

    1. Origin of exception (org.onap.cps.spi.impl.CpsDataPersistenceServiceImpl#retrySavingEachChildIndividually)
    2. How is retry performed from on remain cm handles in same batch
    3. how is the error information amalgamated (for multiple failures in oen batch in and in multiple batches)

    Proposed JIRAs


    Component 

    Description

    JIRA

    1NCMPModify cmHandle registration for alternateId

    Jira
    serverONAP Jira
    columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-1985
    - Modify cmHandle registration for alternateId

    2NCMPAllow updating of cmHandles with an alternateId

    Jira
    serverONAP Jira
    columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-1986
    - Allow updating of cmHandles with an alternateId

    3NCMPUpdate Model to allow Persisting of alternateId

    Jira
    serverONAP Jira
    columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-1989
    - Update Model to allow Persisting of alternateId

    4NCMPIntroduce Hazelcast for alternateId-cmHandle relation

    Jira
    serverONAP Jira
    columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-1988
    - Introduce Hazelcast for alternateId-cmHandle relation

    5NCMPNone uniqueness of alternateid

    Jira
    serverONAP Jira
    columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId425b2b0a-557c-3c0c-b515-579789cceedb
    keyCPS-2003


    Notes

    A proposal was made to make alternateIds non-unique, since different EMS might register NEs with the same alternateId. But this would affect queries and back-and-forth mapping between cmHandleId-alternateId.

    ...