From: Benjamin Diaz Date: Wed, 9 Oct 2019 17:29:59 +0000 (-0300) Subject: Adds arch docs to POL X-Git-Tag: v7.0.0rc1~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Ffeature5837;p=osm%2FPOL.git Adds arch docs to POL Change-Id: If8ad88148e50b76c7df29d7a16ddaa58fce9f84b Signed-off-by: Benjamin Diaz --- diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 0000000..49cf6be --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,60 @@ + +# Policy Management module (POL) + +## Summary + +POL accomplishes the following tasks: + +* Configure auto scaling groups for VNFs. +* Configure VNF alarms for VNFs. +* Listen for MON alarms status and evaluating corresponding policies (scaling and vnf alarms). +* Sending scaling messages to LCM when scaling policy conditions are met. +* Calling webhooks when VNF alarm policies are met. + +## Overview + +![](assets/POL_Overview_Diagram.jpg) + +POL has the following components: + +* POL Agent: + * Listens to message bus for NS LCM actions (instantiation, scaling, deletion) and configures resources accordingly. + * Listens to message bus for alarm notifications, evaluates policies and executes corresponding actions. + +## POL Agent + +POL subscribes to the message bus and waits for the following messages: + +* topic: ns - key: instantiated +* topic: ns - key: scaled +* topic: ns - key: terminated +* topic: alarm_response - key: notify_alarm + +When a NS is created, it checks the corresponding VNFDs for scaling group descriptors or vnf alarms. It creates the corresponding +resources in MON. +When a NS is scaled, it does the same as above for new VDUs if scaled out. It removes orphaned resources if scaled in. +When a NS is terminated, it deletes associated resources. + +When an alarm is raised, if it corresponds to a scaling policy, it stores its last status and then validates the policy, +as policies can have N alarms related to them and can specify a boolean operator (AND/OR) to evaluate the conditions. +If it corresponds to a VNF alarm, the associated webhook is called. + +Data is stored in POL database in the OSM MySQL engine. diff --git a/docs/assets/POL_Overview_Diagram.jpg b/docs/assets/POL_Overview_Diagram.jpg new file mode 100644 index 0000000..e5dd43c Binary files /dev/null and b/docs/assets/POL_Overview_Diagram.jpg differ