...
Policy creation in PolicyDevelopment follows the general sequence shown in the sequence diagram below. An API_USER is any component that wants to create a policy from a policy type. PolicyDevelopment supplies a REST interface that exposes the API and also provides a command line tool and general purpose client that wraps the API.
PlantUML Macro | ||
---|---|---|
| ||
@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 activate 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 |
...
The sequence diagram below is a high level view of SDC-triggered concrete policy generation for some arbitrary entity EntityA. The parameters to create a policy are read from a TOSCA Policy specification read from a CSAR received from SDC.
PlantUML Macro | ||
---|---|---|
| ||
@startuml participant SDC participant DMaaP box "PolicyDesign" #LightBlue participant PolicyDistribution << API_User >> participant PolicyDesign end box autonumber PolicyDistribution --> DMaaP : Subscribe for SDC Notifications on 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 read Policy\nPolicy Parameters from TOSCA specification in CSAR end PolicyDistribution --> PolicyDesign : Generate Policy PolicyDesign --> PolicyDistribution : Policy Generation Result deactivate PolicyDistribution @enduml |
...