...
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 templatetype. 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 ConcretePolicyDesign participant NexusPolicyDesign database PolicyDB end box autonumber API_User --> ConcretePolicyDesignPolicyDesign : Get Policy TemplateType Reference ConcretePolicyDesignPolicyDesign --> PolicyDB : Get Policy Template Metadata ConcretePolicyDesign --> Nexus : Get Policy Template Artifact for Policy ConcretePolicyDesignType Artifact and Metadata PolicyDesign --> API_User : Return Policy TemplateType Reference and Metadata API_User --> ConcretePolicyDesignPolicyDesign : Get Policy Reference and Metadata ConcretePolicyDesignPolicyDesign --> PolicyDB : Get Policy Metadata alt Policy Artifact exists ConcretePolicyDesign --> Nexus : Get Policy Artifact for Policy ConcretePolicyDesign PolicyDesign --> API_User : Return Policy Reference and Metadata else Policy Artifact does not exist ConcretePolicyDesignPolicyDesign --> 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 --> ConcretePolicyDesignPolicyDesign : Use SetPolicy Models,Type Rules,specification Tasksget andPolicy FlowParmaeters forfrom Policyuser end API_User --> ConcretePolicyDesignPolicyDesign : GenerateCreate Policy ConcretePolicyDesignPolicyDesign --> ConcretePolicyDesignPolicyDesign : Generate ConcreteCreate Policy for EntityA activate ConcretePolicyDesignPolicyDesign deactivate ConcretePolicyDesignPolicyDesign ConcretePolicyDesignPolicyDesign --> NexusPolicyDB : StoreSave Generated Concrete Policy for EntityA ConcretePolicyDesign --> PolicyDB : Save PolicyArtifact and Metadata ConcretePolicyDesignPolicyDesign --> API_User : Policy GenerationCreation Result deactivate API_User @enduml |
A PolicyDevAPIUser first gets a reference to and the metadata for the Policy Template type for the policy they want to work on from PolicyDevelopment. PolicyDevelopment reads the metadata and artifact for the template policy type from the database and reads the policy template artifact from Nexus. 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 from Nexus 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.
The PolicyDevAPIUser may now proceed with a policy specification session, where the models, rules, tasks, and flow parameters are set for the policy are specified on the policy template. Many actual API calls may occur during the session to specify information on the policy.using the policy type specification. Once the PolicyDevAPIUser is happy that the policy is completely and correctly specified, it requests PolicyDevelopment to create the policy. PolicyDevelopment creates the policy, stores the created policy artifact in Nexus and stores its metadata of the policy in the database.
2.2.2.2 Model Driven VF (Virtual Function) Policy Design via VNF SDK Packaging
...