Versions Compared

Key

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

...

The SDC GUI supports several types of policies that can be captured at design time. DCAE micro service configuration policies can be onboarded via the DCAE-DS (DCAE Design Studio).


PlantUML Macro
titlePlaceholder Policy Type Design with GUISDC DCAE-DS
@startuml
participant DCAE-_DS <<API_User >>

box "PolicyDesign" #LightBlue
  participant PolicyTypeDesign
end box

autonumber

ONAP_GUI --> PolicyTypeDesign : Get Policy Template Reference
PolicyTypeDesign --> ONAP_GUI : Return Policy Template Reference and Metadata
ONAP_GUI --> PolicyTypeDesign : Get Policy Reference
PolicyTypeDesign --> ONAP_GUI : Return Policy Reference and Metadata

DCAE-DCAE_DS --> PolicyTypeDesign : Get Policy Type Reference and Metadata
PolicyTypeDesign --> PolicyDB : Get Policy Type Metadata\nand Artifact
alt Policy Type Artifact exists
  PolicyTypeDesign --> DCAE-_DS : Return Policy Type Reference and Metadata
else Policy Artifact does not exist
  PolicyTypeDesign --> DCAE-_DS : Return New Policy Type Reference and Empty Metadata
end

DCAE-_DS --> DCAE-_DS : Create Policy Type Editing and Generation Session
activate DCAE-_DS
deactivate DCAE-_DS

DCAE-_DS --> PolicyTypeDesign : Create Policy Type and Metadata
PolicyTypeDesign --> DCAE-_DS : Policy Generation Result


@enduml

...

The GUI implementation in another ONAP component such as SDC or the DCAE-DS uses the API_User API to create and edit ONAP policies. Note that this puts an impact on those components.policy types.

2.2.1.2 Programming Policy Type Implementations

...

PlantUML Macro
titlePolicy Design over the REST API
@startuml
participant API_User

box "PolicyDesign" #LightBlue
  participant PolicyDesign
  database PolicyDB
end box

autonumber

API_User --> PolicyDesign : Get Policy Type Reference
PolicyDesign --> PolicyDB : Get Policy Type Artifact and Metadata
PolicyDesign --> API_User : Return Policy Type Reference and Metadata
API_User --> PolicyDesign : Get Policy Reference and Metadata
PolicyDesign --> PolicyDB : Get Policy Metadata
alt Policy Artifact exists
  PolicyDesign --> API_User : Return Policy Reference and Metadata
else Policy Artifact does not exist
  PolicyDesign --> API_User : Return New Policy Reference and Empty Metadata
end

API_User --> API_User : Create Policy Editing and Generation Session\nto get Policy Parameters from user
activate API_User
deactivate API_User

loop
  API_User --> PolicyDesign : Use Policy Type specification get Policy Parameters from user
end
API_User --> PolicyDesign : Create Policy
PolicyDesign --> PolicyDesign : Create Policy
activate PolicyDesign
deactivate PolicyDesign
PolicyDesign --> PolicyDB : Save Policy Artifact and Metadata
PolicyDesign --> API_User : Policy Creation Result
deactivate API_User
@enduml


A PolicyDevAPIUser first gets a reference to and the metadata for the Policy type for the policy they want to work on from PolicyDevelopmentPolicyDevelopment reads the metadata and artifact for the policy type from the database. The API_User then asks for a reference and the metadata for the policy. PolicyDevelopment looks up the policy in the database. If the policy already exists, PolicyDevelopment reads the artifact and returns the reference of the existing policy to the PolicyDevAPIUser with the metadata for the existing policy. If the policy does not exist, PolicyDevelopment creates and new reference and metadata and returns that to the API_User.

...

PlantUML Macro
titleModel Driven Policy Design
@startuml

participant SDC
participant DMaaP

box "PolicyDesign" #LightBlue
  participant PolicyDistribution << API_User >>
  participant PolicyDesign
end box

autonumber
PolicyDistribution --> DMaaP : Subscribe for SDC Notifications\non Entries of Interest
SDC --> DMaaP : New Entry of Interest: EntityA
DMaaP --> PolicyDistribution : New Entry of Interest: EntityA

PolicyDistribution --> PolicyDesign : Get Policy Reference
PolicyDesign --> PolicyDistribution : Return Policy Reference and Metadata

PolicyDistribution --> PolicyDistribution : Create Policy Editing and Generation Session
activate PolicyDistribution
loop
  PolicyDistribution --> PolicyDesign : Use Policy Type specification to\nread read\nPolicyPolicy Parameters from\nfrom TOSCA specification in CSAR
end
PolicyDistribution --> PolicyDesign : Generate Policy
PolicyDesign --> PolicyDistribution : Policy Generation Result
deactivate PolicyDistribution

@enduml

...