summaryrefslogtreecommitdiffstats
path: root/docs/architecture/plantuml
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-05-28 13:27:04 +0000
committerliamfallon <liam.fallon@est.tech>2019-05-28 13:27:04 +0000
commitc9e2790646530c9546ecbf0038248cfdf663521c (patch)
tree3ca387794e2fcb370bd685d87f52b0523e34904f /docs/architecture/plantuml
parente62f711b12a3d2340172e8b6d608989197bf4dc9 (diff)
Complete Architecture Document
Issue-ID: POLICY-1676 Change-Id: Ic0a631dbc27c69455cfc4b0cc12ed7bd1131cce8 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'docs/architecture/plantuml')
-rw-r--r--docs/architecture/plantuml/DownloadPoliciesToPDP.puml45
-rw-r--r--docs/architecture/plantuml/ModelDrivenPolicyDesign.puml36
-rw-r--r--docs/architecture/plantuml/PAPStartStop.puml24
-rw-r--r--docs/architecture/plantuml/PDPStartStop.puml22
-rw-r--r--docs/architecture/plantuml/PolicyDatabase.puml54
-rw-r--r--docs/architecture/plantuml/PolicyDesign.puml39
-rw-r--r--docs/architecture/plantuml/PolicyExecution.puml24
-rw-r--r--docs/architecture/plantuml/PolicyRollout.puml43
-rw-r--r--docs/architecture/plantuml/PolicyTypeDesign.puml28
-rw-r--r--docs/architecture/plantuml/RuntimeRelationships.puml17
-rw-r--r--docs/architecture/plantuml/ScriptedPolicyDesign.puml29
11 files changed, 361 insertions, 0 deletions
diff --git a/docs/architecture/plantuml/DownloadPoliciesToPDP.puml b/docs/architecture/plantuml/DownloadPoliciesToPDP.puml
new file mode 100644
index 00000000..ceab8ab5
--- /dev/null
+++ b/docs/architecture/plantuml/DownloadPoliciesToPDP.puml
@@ -0,0 +1,45 @@
+@startuml
+
+title Download Policies to PDP
+
+actor User
+database PolicyDB
+participant PAP
+participant DMaaP
+participant PDP
+
+autonumber
+
+alt PDP Startup
+ PDP --> PAP: Send Status (initial status) to PAP
+else Update Request from User
+ User --> PAP : Update Policies on PDP
+end
+
+PAP --> PolicyDB: Read PDP metadata and Policy Set
+PAP -> PAP: Prepare for PDP update
+activate PAP
+deactivate PAP
+
+PAP --> PDP: Set PDP mode as PASSIVE
+
+PAP --> PDP: Transfer Policy Set Policies to PDP
+
+activate PDP
+PDP --> PDP: Load Policies
+deactivate PDP
+
+alt PDP Mode should be ACTIVE
+ PAP --> PDP : Set PDP mode as ACTIVE
+ ref over PDP: Execute Policies in\nACTIVE Mode
+else PDP Mode should be SAFE
+ PAP --> PDP : Set PDP mode as SAFE
+ ref over PDP: Execute Policies in\nSAFE Mode
+else PDP Mode should be TEST
+ PAP --> PDP : Set PDP mode as TEST
+ ref over PDP: Execute Policies in\nTEST Mode
+end
+
+PAP --> PolicyDB: Update PDP metadata
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/ModelDrivenPolicyDesign.puml b/docs/architecture/plantuml/ModelDrivenPolicyDesign.puml
new file mode 100644
index 00000000..31142b0b
--- /dev/null
+++ b/docs/architecture/plantuml/ModelDrivenPolicyDesign.puml
@@ -0,0 +1,36 @@
+@startuml
+
+title Model Driven Policy Design
+
+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 --> SDC : Download CSAR for EntityA that holds TOSCA Policy Specification
+
+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 Policy Parameters\nfrom TOSCA specification in CSAR
+end
+
+PolicyDistribution --> PolicyDesign : Create Policy
+PolicyDesign --> PolicyDistribution : Policy Creation Result
+deactivate PolicyDistribution
+
+PolicyDistribution --> SDC : Notify SDC of operation result
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/PAPStartStop.puml b/docs/architecture/plantuml/PAPStartStop.puml
new file mode 100644
index 00000000..cffed84e
--- /dev/null
+++ b/docs/architecture/plantuml/PAPStartStop.puml
@@ -0,0 +1,24 @@
+@startuml
+
+title PAP Startup and Shutdown
+
+participant K8S
+participant PAP
+database PolicyDB
+
+autonumber
+
+K8S --> PAP : Start PAP
+
+PAP --> PolicyDB : Read Initial Data
+PAP --> PAP : Initialize Policy Administration
+
+activate PAP
+deactivate PAP
+
+loop forever
+ ref over PAP: Wait for and\nHandle PDP\nStatus Updates
+ ref over PAP: Wait for and\nHandle\nAdmin Requests
+end
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/PDPStartStop.puml b/docs/architecture/plantuml/PDPStartStop.puml
new file mode 100644
index 00000000..d55f6d1d
--- /dev/null
+++ b/docs/architecture/plantuml/PDPStartStop.puml
@@ -0,0 +1,22 @@
+@startuml
+
+title PDP Startup and Shutdown
+
+participant K8S
+participant PDP
+participant DMaaP
+participant PAP
+
+autonumber
+
+K8S --> PDP : Start PDP
+
+PDP --> PAP: Send Status (initial status) to PAP
+
+PAP --> PDP: Download Policy Set to PDP
+
+loop forever
+ PDP --> PAP: Send Status to PAP
+end
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/PolicyDatabase.puml b/docs/architecture/plantuml/PolicyDatabase.puml
new file mode 100644
index 00000000..3597324e
--- /dev/null
+++ b/docs/architecture/plantuml/PolicyDatabase.puml
@@ -0,0 +1,54 @@
+@startuml
+
+title Indicative Database Layout
+
+!define table(x) class x << (T,#FFAAAA) >>
+!define primary_key(x) <u>x</u>
+hide methods
+hide stereotypes
+
+table(PDP_SUBGROUP) {
+ primary_key(PDP_SUBGROUP_ID)
+ PDP_SUBGROUP_NAME
+ PDP_SUBGROUP_VERSION
+ PDP_TYPE
+ PDP_SERVICE_ENDPOINT
+ POLICY_SET_ID
+ PDP_SUBGROUP_STATE
+}
+
+table(PDP) {
+ primary_key(PDP_ID)
+ PDP_NAME
+ PDP_VERSION
+ PDP_TYPE
+ PDP_ENDPOINT
+ PDP_SUBGROUP_ID
+ POLICY_SET_ID PDP_STATE
+}
+
+table(POLICY_SET) {
+ primary_key(POLICY_SET_ID)
+ POLICY_SET_NAME
+ POLICY_SET_VERSION
+}
+
+table(POLICY_TYPE_IMPL) {
+ primary_key(POLICY_TYPE_IMPL_ID)
+ POLICY_NAME
+ POLICY_VERSION
+ PDP_TYPE POLICY_ARTIFACT
+}
+
+table(POLICY_SET_TO_POLICY_TYPE_IMPL) {
+ POLICY_SET_ID
+ POLICY_TYPE_IMPL_ID
+}
+
+PDP_SUBGROUP::POLICY_SET_ID --> POLICY_SET::POLICY_SET_ID
+PDP::PDP_SUBGROUP_ID --> PDP_SUBGROUP::PDP_SUBGROUP_ID
+PDP::POLICY_SET_ID --> POLICY_SET::POLICY_SET_ID
+POLICY_SET_TO_POLICY_TYPE_IMPL::POLICY_SET_ID --> POLICY_SET::POLICY_SET_ID
+POLICY_SET_TO_POLICY_TYPE_IMPL::POLICY_TYPE_IMPL_ID --> POLICY_TYPE_IMPL::POLICY_TYPE_IMPL_ID
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/PolicyDesign.puml b/docs/architecture/plantuml/PolicyDesign.puml
new file mode 100644
index 00000000..f844809e
--- /dev/null
+++ b/docs/architecture/plantuml/PolicyDesign.puml
@@ -0,0 +1,39 @@
+@startuml
+
+title Policy Design
+
+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 : 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
+ 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
+end
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/PolicyExecution.puml b/docs/architecture/plantuml/PolicyExecution.puml
new file mode 100644
index 00000000..a06fdf5f
--- /dev/null
+++ b/docs/architecture/plantuml/PolicyExecution.puml
@@ -0,0 +1,24 @@
+@startuml
+
+title Policy Execution
+
+participant REQUESTOR
+participant RESPONDEE
+participant PDP
+
+autonumber
+
+alt Synchronous Invocation
+ REQUESTOR --> PDP: Execute Policy
+ activate PDP
+ hnote over REQUESTOR : wait
+ PDP --> REQUESTOR: Policy Execution Result
+ deactivate PDP
+else Asynchronous Invocation
+ REQUESTOR --> PDP: Execute Policy
+ activate PDP
+ PDP --> RESPONDEE: Policy Execution Result
+ deactivate PDP
+end
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/PolicyRollout.puml b/docs/architecture/plantuml/PolicyRollout.puml
new file mode 100644
index 00000000..40c0960f
--- /dev/null
+++ b/docs/architecture/plantuml/PolicyRollout.puml
@@ -0,0 +1,43 @@
+@startuml
+
+title Policy Rollout
+
+actor User
+participant PAP
+participant PDP
+
+autonumber
+User --> PAP: Create Policy Set for PDP Group
+
+loop over PDP Group
+ ref over PAP, PDP: PAP downloads Policy Set to PDP
+end
+
+User --> PAP: Set PDP Group in Test Mode
+
+loop over PDP Group
+ PAP --> PDP: Set PDP in TEST mode
+end
+
+PDP --> PAP: Report test results
+PAP --> User: Report consolidated test results
+
+User --> PAP: Set PDP Group in Safe Mode
+loop over PDP Group
+ PAP --> PDP: Set PDP in SAFE mode
+end
+
+PDP --> PAP: Report safe mode operation results
+PAP --> User: Report consolidated safe mode operation results
+
+User --> PAP: Set PDP Group in Active Mode
+loop over PDP Group
+ PAP --> PDP: Set PDP in Active mode
+end
+
+loop forever
+ PDP --> PAP: Report active mode operation results
+ PAP --> User: Report consolidated active mode operation results
+end
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/PolicyTypeDesign.puml b/docs/architecture/plantuml/PolicyTypeDesign.puml
new file mode 100644
index 00000000..92d3c0ca
--- /dev/null
+++ b/docs/architecture/plantuml/PolicyTypeDesign.puml
@@ -0,0 +1,28 @@
+@startuml
+
+title Policy Type Design
+
+participant DCAE_DS <<API_User >>
+box "PolicyDesign" #LightBlue
+ participant PolicyTypeDesign
+end box
+autonumber
+
+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 : 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 \ No newline at end of file
diff --git a/docs/architecture/plantuml/RuntimeRelationships.puml b/docs/architecture/plantuml/RuntimeRelationships.puml
new file mode 100644
index 00000000..f206b885
--- /dev/null
+++ b/docs/architecture/plantuml/RuntimeRelationships.puml
@@ -0,0 +1,17 @@
+@startuml
+
+title Runtime Relationships between Concepts
+
+object PDPSubGroup
+object PDPService
+object PolicySet
+object PDP
+object PolicyImpl
+
+PDPSubGroup "1" -- "1" PDPService : > Lifecycle\nManaged\nBy
+PDPService "1" -- "*" PDP : > Manages\nLifecycle\nOf
+PDPService "1" -- "1" PolicySet : > Executes
+PolicySet "1" -- "*" PDP : > Executes\nOn
+PolicySet "1" -- "*" PolicyImpl : > Contains
+
+@enduml \ No newline at end of file
diff --git a/docs/architecture/plantuml/ScriptedPolicyDesign.puml b/docs/architecture/plantuml/ScriptedPolicyDesign.puml
new file mode 100644
index 00000000..e9702174
--- /dev/null
+++ b/docs/architecture/plantuml/ScriptedPolicyDesign.puml
@@ -0,0 +1,29 @@
+@startuml
+
+title Scripted Policy Design
+
+participant Script <<API_User >>
+collections DirectiveFile
+
+box "PolicyDesign" #LightBlue
+ participant PolicyTypeDesign
+ participant PolicyDesign
+end box
+
+autonumber
+
+activate Script
+
+loop
+ Script --> DirectiveFile : Read next directive from script file
+ Script --> PolicyTypeDesign : Read Policy Type for directive
+ Script --> Script : Prepare TOSCA Policy for coreation
+ Script --> Script : Read parameters from script file directive
+ Script --> Script : Set Parameters in TOSCA Policy being prepared
+ Script --> PolicyDesign : Create Policy
+ PolicyDesign --> Script : Policy creation result
+end
+
+deactivate Script
+
+@enduml \ No newline at end of file