aboutsummaryrefslogtreecommitdiffstats
path: root/docs/platform
diff options
context:
space:
mode:
authorSaryu Shah <ss3917@att.com>2017-11-10 17:02:32 +0000
committerSaryu Shah <ss3917@att.com>2017-11-10 18:39:47 +0000
commit355b5793d028807145115d8a67cf3efc33cdc89d (patch)
tree46183dcaff3c8c20bcab1b5d72c8d5db8268ba2d /docs/platform
parentf8732acc618b1772040704fc881da360979953db (diff)
Documentation for vCPE and State Mgmt
Documentation for vCPE and State Mgmt. Removed release notes from index ------------------------------------------------------------- Issue-Id: POLICY-335 Change-Id: If8c39261ad1e6cee41fa065943e06f5325aefba2 Signed-off-by: Saryu Shah <ss3917@att.com>
Diffstat (limited to 'docs/platform')
-rwxr-xr-xdocs/platform/Tut_vCPE_appc_request.JPGbin0 -> 69604 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_final_memory.JPGbin0 -> 28991 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_get_facts.JPGbin0 -> 28560 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_get_facts_2.JPGbin0 -> 60914 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_guard_not_queried.JPGbin0 -> 113365 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_guard_result.JPGbin0 -> 110156 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_inject_appc_response.JPGbin0 -> 66934 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_insert_abatement.JPGbin0 -> 168790 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_insert_onset.JPGbin0 -> 100976 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_policy_active.JPGbin0 -> 110641 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_policy_final_success.JPGbin0 -> 132311 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_policy_operation.JPGbin0 -> 117919 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_policy_operation_success.JPGbin0 -> 148265 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_policy_start.JPGbin0 -> 17020 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_simulated_abatement.JPGbin0 -> 71497 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_simulated_appc_response.JPGbin0 -> 43215 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_simulated_onset.JPGbin0 -> 68895 bytes
-rwxr-xr-xdocs/platform/Tut_vCPE_simulators_enabled.JPGbin0 -> 35218 bytes
-rw-r--r--docs/platform/feature_statemgmt.rst303
-rw-r--r--docs/platform/index.rst9
-rw-r--r--docs/platform/tutorial_vCPE.rst119
-rw-r--r--docs/platform/tutorial_vFW.rst9
22 files changed, 431 insertions, 9 deletions
diff --git a/docs/platform/Tut_vCPE_appc_request.JPG b/docs/platform/Tut_vCPE_appc_request.JPG
new file mode 100755
index 000000000..528a24393
--- /dev/null
+++ b/docs/platform/Tut_vCPE_appc_request.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_final_memory.JPG b/docs/platform/Tut_vCPE_final_memory.JPG
new file mode 100755
index 000000000..ea4c72a6a
--- /dev/null
+++ b/docs/platform/Tut_vCPE_final_memory.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_get_facts.JPG b/docs/platform/Tut_vCPE_get_facts.JPG
new file mode 100755
index 000000000..bf24eb3c1
--- /dev/null
+++ b/docs/platform/Tut_vCPE_get_facts.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_get_facts_2.JPG b/docs/platform/Tut_vCPE_get_facts_2.JPG
new file mode 100755
index 000000000..1b38a894a
--- /dev/null
+++ b/docs/platform/Tut_vCPE_get_facts_2.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_guard_not_queried.JPG b/docs/platform/Tut_vCPE_guard_not_queried.JPG
new file mode 100755
index 000000000..91d9174c6
--- /dev/null
+++ b/docs/platform/Tut_vCPE_guard_not_queried.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_guard_result.JPG b/docs/platform/Tut_vCPE_guard_result.JPG
new file mode 100755
index 000000000..f415651cc
--- /dev/null
+++ b/docs/platform/Tut_vCPE_guard_result.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_inject_appc_response.JPG b/docs/platform/Tut_vCPE_inject_appc_response.JPG
new file mode 100755
index 000000000..1536b44db
--- /dev/null
+++ b/docs/platform/Tut_vCPE_inject_appc_response.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_insert_abatement.JPG b/docs/platform/Tut_vCPE_insert_abatement.JPG
new file mode 100755
index 000000000..43af56d51
--- /dev/null
+++ b/docs/platform/Tut_vCPE_insert_abatement.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_insert_onset.JPG b/docs/platform/Tut_vCPE_insert_onset.JPG
new file mode 100755
index 000000000..a0552fc0b
--- /dev/null
+++ b/docs/platform/Tut_vCPE_insert_onset.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_policy_active.JPG b/docs/platform/Tut_vCPE_policy_active.JPG
new file mode 100755
index 000000000..9cebb3852
--- /dev/null
+++ b/docs/platform/Tut_vCPE_policy_active.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_policy_final_success.JPG b/docs/platform/Tut_vCPE_policy_final_success.JPG
new file mode 100755
index 000000000..80dccb04c
--- /dev/null
+++ b/docs/platform/Tut_vCPE_policy_final_success.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_policy_operation.JPG b/docs/platform/Tut_vCPE_policy_operation.JPG
new file mode 100755
index 000000000..7a75f767d
--- /dev/null
+++ b/docs/platform/Tut_vCPE_policy_operation.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_policy_operation_success.JPG b/docs/platform/Tut_vCPE_policy_operation_success.JPG
new file mode 100755
index 000000000..71c596f91
--- /dev/null
+++ b/docs/platform/Tut_vCPE_policy_operation_success.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_policy_start.JPG b/docs/platform/Tut_vCPE_policy_start.JPG
new file mode 100755
index 000000000..6f457d5cc
--- /dev/null
+++ b/docs/platform/Tut_vCPE_policy_start.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_simulated_abatement.JPG b/docs/platform/Tut_vCPE_simulated_abatement.JPG
new file mode 100755
index 000000000..38db1535b
--- /dev/null
+++ b/docs/platform/Tut_vCPE_simulated_abatement.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_simulated_appc_response.JPG b/docs/platform/Tut_vCPE_simulated_appc_response.JPG
new file mode 100755
index 000000000..e6c041a58
--- /dev/null
+++ b/docs/platform/Tut_vCPE_simulated_appc_response.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_simulated_onset.JPG b/docs/platform/Tut_vCPE_simulated_onset.JPG
new file mode 100755
index 000000000..846481f1e
--- /dev/null
+++ b/docs/platform/Tut_vCPE_simulated_onset.JPG
Binary files differ
diff --git a/docs/platform/Tut_vCPE_simulators_enabled.JPG b/docs/platform/Tut_vCPE_simulators_enabled.JPG
new file mode 100755
index 000000000..1234bc90c
--- /dev/null
+++ b/docs/platform/Tut_vCPE_simulators_enabled.JPG
Binary files differ
diff --git a/docs/platform/feature_statemgmt.rst b/docs/platform/feature_statemgmt.rst
new file mode 100644
index 000000000..70b0f186c
--- /dev/null
+++ b/docs/platform/feature_statemgmt.rst
@@ -0,0 +1,303 @@
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+*************************
+Feature: State Management
+*************************
+
+.. contents::
+ :depth: 3
+
+Summary
+^^^^^^^
+The State Management Feature provides:
+
+ - Node-level health monitoring
+ - Monitoring the health of dependency nodes - nodes on which a particular node is dependent
+ - Ability to lock/unlock a node and suspend or resume all application processing
+ - Ability to suspend application processing on a node that is disabled or in a standby state
+ - Interworking/Coordination of state values
+ - Support for ITU X.731 states and state transitions for:
+ - Administrative State
+ - Operational State
+ - Availability Status
+ - Standby Status
+
+Usage
+^^^^^
+
+Enabling and Disabling Feature State Management
+-----------------------------------------------
+
+The State Management Feature is enabled from the command line when logged in as policy after configuring the feature properties file (see Description Details section). From the command line:
+
+- > features status - Lists the status of features
+- > features enable state-management - Enables the State Management Feature
+- > features disable state-management - Disables the State Management Feature
+
+The Drools PDP must be stopped prior to enabling/disabling features and then restarted after the features have been enabled/disabled.
+
+ .. code-block:: bash
+ :caption: Enabling State Management Feature
+
+ policy@hyperion-4:/opt/app/policy$ policy stop
+ [drools-pdp-controllers]
+ L []: Stopping Policy Management... Policy Management (pid=354) is stopping... Policy Management has stopped.
+ policy@hyperion-4:/opt/app/policy$ features enable state-management
+ name version status
+ ---- ------- ------
+ controlloop-utils 1.1.0-SNAPSHOT disabled
+ healthcheck 1.1.0-SNAPSHOT disabled
+ test-transaction 1.1.0-SNAPSHOT disabled
+ eelf 1.1.0-SNAPSHOT disabled
+ state-management 1.1.0-SNAPSHOT enabled
+ active-standby-management 1.1.0-SNAPSHOT disabled
+ session-persistence 1.1.0-SNAPSHOT disabled
+
+Description Details
+^^^^^^^^^^^^^^^^^^^
+
+State Model
+-----------
+
+The state model follows the ITU X.731 standard for state management. The supported state values are:
+ **Administrative State:**
+ - Locked - All application transaction processing is prohibited
+ - Unlocked - Application transaction processing is allowed
+
+ **Administrative State Transitions:**
+ - The transition from Unlocked to Locked state is triggered with a Lock operation
+ - The transition from the Locked to Unlocked state is triggered with an Unlock operation
+
+ **Operational State:**
+ - Enabled - The node is healthy and able to process application transactions
+ - Disabled - The node is not healthy and not able to process application transactions
+
+ **Operational State Transitions:**
+ - The transition from Enabled to Disabled is triggered with a disableFailed or disableDependency operation
+ - The transition from Disabled to Enabled is triggered with an enableNotFailed and enableNoDependency operation
+
+ **Availability Status:**
+ - Null - The Operational State is Enabled
+ - Failed - The Operational State is Disabled because the node is no longer healthy
+ - Dependency - The Operational State is Disabled because all members of a dependency group are disabled
+ - Dependency.Failed - The Operational State is Disabled because the node is no longer healthy and all members of a dependency group are disabled
+
+ **Availability Status Transitions:**
+ - The transition from Null to Failed is triggered with a disableFailed operation
+ - The transtion from Null to Dependency is triggered with a disableDependency operation
+ - The transition from Failed to Dependency.Failed is triggered with a disableDependency operation
+ - The transition from Dependency to Dependency.Failed is triggered with a disableFailed operation
+ - The transition from Dependency.Failed to Failed is triggered with an enableNoDependency operation
+ - The transition from Dependency.Failed to Dependency is triggered with an enableNotFailed operation
+ - The transition from Failed to Null is triggered with an enableNotFailed operation
+ - The transition from Dependency to Null is triggered with an enableNoDependency operation
+
+ **Standby Status:**
+ - Null - The node does not support active-standby behavior
+ - ProvidingService - The node is actively providing application transaction service
+ - HotStandby - The node is capable of providing application transaction service, but is currently waiting to be promoted
+ - ColdStandby - The node is not capable of providing application service because of a failure
+
+ **Standby Status Transitions:**
+ - The transition from Null to HotStandby is triggered by a demote operation when the Operational State is Enabled
+ - The transition for Null to ColdStandby is triggered is a demote operation when the Operational State is Disabled
+ - The transition from ColdStandby to HotStandby is triggered by a transition of the Operational State from Disabled to Enabled
+ - The transition from HotStandby to ColdStandby is triggered by a transition of the Operational State from Enabled to Disabled
+ - The transition from ProvidingService to ColdStandby is triggered by a transition of the Operational State from Enabled to Disabled
+ - The transition from HotStandby to ProvidingService is triggered by a Promote operation
+ - The transition from ProvidingService to HotStandby is triggered by a Demote operation
+
+Database
+--------
+
+The State Management feature creates a StateManagement database having three tables:
+
+ **StateManagementEntity** - This table has the following columns:
+ - **id** - Automatically created unique identifier
+ - **resourceName** - The unique identifier for a node
+ - **adminState** - The Administrative State
+ - **opState** - The Operational State
+ - **availStatus** - The Availability Status
+ - **standbyStatus** - The Standby Status
+ - **created_Date** - The timestamp the resource entry was created
+ - **modifiedDate** - The timestamp the resource entry was last modified
+
+ **ForwardProgressEntity** - This table has the following columns:
+ - **forwardProgressId** - Automatically created unique identifier
+ - **resourceName** - The unique identifier for a node
+ - **fpc_count** - A forward progress counter which is periodically incremented if the node is healthy
+ - **created_date** - The timestamp the resource entry was created
+ - **last_updated** - The timestamp the resource entry was last updated
+
+ **ResourceRegistrationEntity** - This table has the following columns:
+ - **ResourceRegistrationId** - Automatically created unique identifier
+ - **resourceName** - The unique identifier for a node
+ - **resourceUrl** - The JMX URL used to check the health of a node
+ - **site** - The name of the site in which the resource resides
+ - **nodeType** - The type of the node (i.e, pdp_xacml, pdp_drools, pap, pap_admin, logparser, brms_gateway, astra_gateway, elk_server, pypdp)
+ - **created_date** - The timestamp the resource entry was created
+ - **last_updated** - The timestamp the resource entry was last updated
+
+Node Health Monitoring
+----------------------
+
+**Application Monitoring**
+
+ Application monitoring can be implemented using the *startTransaction()* and *endTransaction()* methods. Whenever a transaction is started, the *startTransaction()* method is called. If the node is locked, disabled or in a hot/cold standby state, the method will throw an exception. Otherwise, it resets the timer which triggers the default *testTransaction()* method.
+
+ When a transaction completes, calling *endTransaction()* increments the forward process counter in the *ForwardProgressEntity* DB table. As long as this counter is updating, the integrity monitor will assume the node is healthy/sane.
+
+ If the *startTransaction()* method is not called within a provisioned period of time, a timer will expire which calls the *testTransaction()* method. The default implementation of this method simply increments the forward progress counter. The *testTransaction()* method may be overwritten to perform a more meaningful test of system sanity, if desired.
+
+ If the forward progress counter stops incrementing, the integrity monitoring routine will assume the node application has lost sanity and it will trigger a *statechange* (disableFailed) to cause the operational state to become disabled and the availability status attribute to become failed. Once the forward progress counter again begins incrementing, the operational state will return to enabled.
+
+**Dependency Monitoring**
+
+ When a Drools PDP (or other node using the *IntegrityMonitor* policy/common module) is dependent upon other nodes to perform its function, those other nodes can be defined as dependencies in the properties file. In order for the dependency algorithm to function, the other nodes must also be running the *IntegrityMonitor*. Periodically the Drools PDP will check the state of dependencies. If all of a node type have failed, the Drools PDP will declare that it can no longer function and change the operational state to disabled and the availability status to dependency.
+
+ In addition to other policy node types, there is a *subsystemTest()* method that is periodically called by the *IntegrityMonitor*. In Drools PDP, *subsystemTest* has been overwritten to execute an audit of the Database and of the Maven Repository. If the audit is unable to verify the function of either the DB or the Maven Repository, he Drools PDP will declare that it can no longer function and change the operational state to disabled and the availability status to dependency.
+
+ When a failed dependency returns to normal operation, the *IntegrityMontor* will change the operational state to enabled and availability status to null.
+
+**External Health Monitoring Interface**
+
+ The Drools PDP has a http test interface which, when called, will return 200 if all seems well and 500 otherwise. The test interface URL is defined in the properties file.
+
+
+Site Manager
+------------
+
+The Site Manager is not deployed with the Drools PDP, but it is available in the policy/common repository in the site-manager directory.
+The Site Manager provides a lock/unlock interface for nodes and a way to display node information and status.
+
+The following is from the README file included with the Site Manager.
+
+ .. code-block:: bash
+ :caption: Site Manager README extract
+
+ Before using 'siteManager', the file 'siteManager.properties' needs to be
+ edited to configure the parameters used to access the database:
+
+ javax.persistence.jdbc.driver - typically 'org.mariadb.jdbc.Driver'
+
+ javax.persistence.jdbc.url - URL referring to the database,
+ which typically has the form: 'jdbc:mariadb://<host>:<port>/<db>'
+ ('<db>' is probably 'xacml' in this case)
+
+ javax.persistence.jdbc.user - the user id for accessing the database
+
+ javax.persistence.jdbc.password - password for accessing the database
+
+ Once the properties file has been updated, the 'siteManager' script can be
+ invoked as follows:
+
+ siteManager show [ -s <site> | -r <resourceName> ] :
+ display node information (Site, NodeType, ResourceName, AdminState,
+ OpState, AvailStatus, StandbyStatus)
+
+ siteManager setAdminState { -s <site> | -r <resourceName> } <new-state> :
+ update admin state on selected nodes
+
+ siteManager lock { -s <site> | -r <resourceName> } :
+ lock selected nodes
+
+ siteManager unlock { -s <site> | -r <resourceName> } :
+ unlock selected nodes
+
+Note that the 'siteManager' script assumes that the script,
+'site-manager-${project.version}.jar' file and 'siteManager.properties' file
+are all in the same directory. If the files are separated, the 'siteManager'
+script will need to be modified so it can locate the jar and properties files.
+
+
+Properties
+----------
+
+The feature-state-mangement.properties file controls the function of the State Management Feature. In general, the properties have adequate descriptions in the file. Parameters which must be replaced prior to usage are indicated thus: ${{parameter to be replaced}}.
+
+ .. code-block:: bash
+ :caption: feature-state-mangement.properties
+
+ # DB properties
+ javax.persistence.jdbc.driver=org.mariadb.jdbc.Driver
+ javax.persistence.jdbc.url=jdbc:mariadb://${{SQL_HOST}}:3306/statemanagement
+ javax.persistence.jdbc.user=${{SQL_USER}}
+ javax.persistence.jdbc.password=${{SQL_PASSWORD}}
+
+ # DroolsPDPIntegrityMonitor Properties
+ # Test interface host and port defaults may be overwritten here
+ http.server.services.TEST.host=0.0.0.0
+ http.server.services.TEST.port=9981
+ #These properties will default to the following if no other values are provided:
+ # http.server.services.TEST.restClasses=org.onap.policy.drools.statemanagement.IntegrityMonitorRestManager
+ # http.server.services.TEST.managed=false
+ # http.server.services.TEST.swagger=true
+
+ #IntegrityMonitor Properties
+
+ # Must be unique across the system
+ resource.name=pdp1
+ # Name of the site in which this node is hosted
+ site_name=site1
+ # Forward Progress Monitor update interval seconds
+ fp_monitor_interval=30
+ # Failed counter threshold before failover
+ failed_counter_threshold=3
+ # Interval between test transactions when no traffic seconds
+ test_trans_interval=10
+ # Interval between writes of the FPC to the DB seconds
+ write_fpc_interval=5
+ # Node type Note: Make sure you don't leave any trailing spaces, or you'll get an 'invalid node type' error!
+ node_type=pdp_drools
+ # Dependency groups are groups of resources upon which a node operational state is dependent upon.
+ # Each group is a comma-separated list of resource names and groups are separated by a semicolon. For example:
+ # dependency_groups=site_1.astra_1,site_1.astra_2;site_1.brms_1,site_1.brms_2;site_1.logparser_1;site_1.pypdp_1
+ dependency_groups=
+ # When set to true, dependent health checks are performed by using JMX to invoke test() on the dependent.
+ # The default false is to use state checks for health.
+ test_via_jmx=true
+ # This is the max number of seconds beyond which a non incrementing FPC is considered a failure
+ max_fpc_update_interval=120
+ # Run the state audit every 60 seconds (60000 ms). The state audit finds stale DB entries in the
+ # forwardprogressentity table and marks the node as disabled/failed in the statemanagemententity
+ # table. NOTE! It will only run on nodes that have a standbystatus = providingservice.
+ # A value of <= 0 will turn off the state audit.
+ state_audit_interval_ms=60000
+ # The refresh state audit is run every (default) 10 minutes (600000 ms) to clean up any state corruption in the
+ # DB statemanagemententity table. It only refreshes the DB state entry for the local node. That is, it does not
+ # refresh the state of any other nodes. A value <= 0 will turn the audit off. Any other value will override
+ # the default of 600000 ms.
+ refresh_state_audit_interval_ms=600000
+
+
+ # Repository audit properties
+ # Assume it's the releaseRepository that needs to be audited,
+ # because that's the one BRMGW will publish to.
+ repository.audit.id=${{releaseRepositoryID}}
+ repository.audit.url=${{releaseRepositoryUrl}}
+ repository.audit.username=${{repositoryUsername}}
+ repository.audit.password=${{repositoryPassword}}
+ repository2.audit.id=${{releaseRepository2ID}}
+ repository2.audit.url=${{releaseRepository2Url}}
+ repository2.audit.username=${{repositoryUsername2}}
+ repository2.audit.password=${{repositoryPassword2}}
+
+ # Repository Audit Properties
+ # Flag to control the execution of the subsystemTest for the Nexus Maven repository
+ repository.audit.is.active=false
+ repository.audit.ignore.errors=true
+ repository.audit.interval_sec=86400
+ repository.audit.failure.threshold=3
+
+ # DB Audit Properties
+ # Flag to control the execution of the subsystemTest for the Database
+ db.audit.is.active=false
+
+
+End of Document
+
+.. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/Feature+State+Management
+
+
diff --git a/docs/platform/index.rst b/docs/platform/index.rst
index fdaf5c656..787bc8fba 100644
--- a/docs/platform/index.rst
+++ b/docs/platform/index.rst
@@ -13,11 +13,14 @@ Policy Engine Platform
guardpolicy.rst
deployPDPPAP.rst
guardpdp.rst
- tutorial_vDNS.rst
- tutorial_VOLTE.rst
- tutorial_vFW.rst
feature_testtransaction.rst
feature_healthcheck.rst
feature_eelf.rst
+ feature_statemgmt.rst
+ feature_activestdbymgmt.rst
+ tutorial_vDNS.rst
+ tutorial_VOLTE.rst
+ tutorial_vFW.rst
+ tutorial_vCPE.rst
diff --git a/docs/platform/tutorial_vCPE.rst b/docs/platform/tutorial_vCPE.rst
new file mode 100644
index 000000000..7c6c9fb05
--- /dev/null
+++ b/docs/platform/tutorial_vCPE.rst
@@ -0,0 +1,119 @@
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+*********************************************************
+Tutorial: Testing the vCPE use case in a standalone PDP-D
+*********************************************************
+
+.. contents::
+ :depth: 3
+
+
+High Level Architecture
+^^^^^^^^^^^^^^^^^^^^^^^
+The vCPE flow begins with an onset message that is sent from DCAE notifying the PDP-D that an action needs to be taken on a VM/VNF. Once the PDP-D has inserted the onset into drools memory, rules begin to fire to start processing the onset for the vCPE policy that exists in drools memory. If the onset is not enriched with A&AI data, Policy will query A&AI for the VM/VNF data otherwise the PDP-D will get the A&AI data needed directly from the onset. A Guard query is then executed to determine if the action to be taken is allowed. If Guard returns a permit, the PDP-D will then send an APPC Restart recipe request to restart the VM/VNF specified in the request. If APPC is successful then the PDP-D will send a operation success notification on the POLICY-CL-MGT topic. The PDP-D waits for an abatement message to come from DCAE before ending the transaction. Once the abatement is received the PDP-D sends a final success notification and gracefully ends processing the event.
+
+Initial Setup
+^^^^^^^^^^^^^
+
+For this tutorial, a feature for simulating components involved in the flow outside of Policy will be turned on. Run "*features enable controlloop-utils*".
+
+ .. image:: Tut_vCPE_simulators_enabled.JPG
+
+Now start the PDP-D using the command "policy start"
+
+ .. image:: Tut_vCPE_policy_start.JPG
+
+Running the Flow
+^^^^^^^^^^^^^^^^
+
+The telemetry API is used to see what is in memory. There should only be 1 fact, the Params object which is created at initialization time and contains the vCPE policy that was created.
+
+ .. code-block:: bash
+
+ curl --silent --user @1b3rt:31nst31n -X GET http://localhost:9696/policy/pdp/engine/controllers/amsterdam/drools/facts/amsterdam | python -m json.tool
+
+
+ .. image:: Tut_vCPE_get_facts.JPG
+
+Using the telemetry API, a simulated onset can be injected by the user. For demo purposes, this is the simulated onset that will be used:
+
+ .. image:: Tut_vCPE_simulated_onset.JPG
+
+**NOTE:** The onset that gets injected has to have a closedLoopControlName that matches the pushed policy's closedLoopControlName.
+
+Inject the onset using the Telemetry API.
+
+ .. code-block:: bash
+
+ curl --silent --user @1b3rt:31nst31n --header "Content-Type: text/plain" --data @dcae.vcpe.onset.json -X PUT http://localhost:9696/policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_EVENT_OUTPUT/events | python -m json.tool
+
+ .. image:: Tut_vCPE_insert_onset.JPG
+
+**NOTE:** The simulated onset is enriched with A&AI data. The PDP-D will not make an A&AI query since the data needed can be extracted from the onset.
+
+Now check the facts in memory, there should be 7 objects present. Two timers exist to put a time limit on the operation and on the overall control loop (in the case of retries or policy chaining). The event and it's associated manager and operation manager are also present in memory. A lock on the target entity is inserted to ensure no other events try to take action on the VM/VNF that is currently processing.
+
+
+ .. image:: Tut_vCPE_get_facts_2.JPG
+
+The network log will be used to monitor the activity coming in and out of the PDP-D. This log is located at *$POLICY_HOME/logs/network.log*. This will show the notifications that the PDP-D sends out at different stages of processing. The order of successful processing begins with an ACTIVE notification to show that the onset was acknowledged and the operation is beginning transit.
+
+ .. image:: Tut_vCPE_policy_active.JPG
+
+Once the event is in the ACTIVE state, the PDP-D consults Guard to determine if this operation should be allowed, a series of operation notifications are sent for starting the Guard query, obtaining a PERMIT or DENY, and beginning the operation.
+
+ .. image:: Tut_vCPE_guard_not_queried.JPG
+
+ .. image:: Tut_vCPE_guard_result.JPG
+
+ .. image:: Tut_vCPE_policy_operation.JPG
+
+Once the operation starts an APPC request is sent out.
+
+ .. image:: Tut_vCPE_appc_request.JPG
+
+A simulated APPC response will be injected to the APPC-LCM-WRITE topic, this is the example response used:
+
+ .. image:: Tut_vCPE_simulated_appc_response.JPG
+
+Inject the response using the Telemetry API.
+
+ .. code-block:: bash
+
+ curl --silent --user @1b3rt:31nst31n --header "Content-Type: text/plain" --data @appc.lcm.success.json -X PUT http://localhost:9696/policy/pdp/engine/topics/sources/ueb/APPC-LCM-WRITE/events | python -m json.tool
+
+ .. image:: Tut_vCPE_inject_appc_response.JPG
+
+The network log will show the PDP-D sent an operation success notification.
+
+ .. image:: Tut_vCPE_policy_operation_success.JPG
+
+For the vCPE use case, once an operation is successful, the PDP-D waits for DCAE to send an abatement message to end processing. The following abatement message will be used:
+
+ .. image:: Tut_vCPE_simulated_abatement.JPG
+
+Inject the abatement message using the Telemetry API.
+
+ .. code-block:: bash
+
+ curl --silent --user @1b3rt:31nst31n --header "Content-Type: text/plain" --data @dcae.vcpe.abatement.json -X PUT http://localhost:9696/policy/pdp/engine/topics/sources/ueb/unauthenticated.DCAE_EVENT_OUTPUT/events | python -m json.tool
+
+ .. image:: Tut_vCPE_insert_abatement.JPG
+
+Once the abatement is received, a final success notification is sent from the PDP-D.
+
+ .. image:: Tut_vCPE_policy_final_success.JPG
+
+After processing there should only be 1 fact left in memory.
+
+ .. image:: Tut_vCPE_final_memory.JPG
+
+
+End of Document
+
+
+.. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/Tutorial%3A+Testing+the+vCPE+use+case+in+a+standalone+PDP-D
+
+
diff --git a/docs/platform/tutorial_vFW.rst b/docs/platform/tutorial_vFW.rst
index 639b632ca..4b402d017 100644
--- a/docs/platform/tutorial_vFW.rst
+++ b/docs/platform/tutorial_vFW.rst
@@ -17,10 +17,7 @@ The vFW flow begins with an onset message that is sent from DCAE notifying the P
Initial Setup
^^^^^^^^^^^^^
-For this tutorial, a feature for simulating components involved in the flow outside of Policy will be turned on. Run "features enable controlloop-utils".
-
-
-The first step is to access the docker container of name *drools*.
+For this tutorial, a feature for simulating components involved in the flow outside of Policy will be turned on. Run "*features enable controlloop-utils*".
.. image:: Tut_vFW_simulators_enabled.JPG
@@ -53,11 +50,11 @@ Inject the onset using the Telemetry API.
.. image:: Tut_vFW_onset_injected.JPG
-Now check the facts in memory, there should be 7 objects present. Two timers exist to put a time limit on the operation and on the overall control loop (in the case of retries or policy chaining). The event and it's assciated manager and operation manager are also present in memory. A lock on the target entity is inserted to ensure no other events try to take action on the VNF that is currently processing.
+Now check the facts in memory, there should be 7 objects present. Two timers exist to put a time limit on the operation and on the overall control loop (in the case of retries or policy chaining). The event and it's associated manager and operation manager are also present in memory. A lock on the target entity is inserted to ensure no other events try to take action on the VNF that is currently processing.
.. image:: Tut_vFW_get_facts_2.JPG
-The network log will be used to monitor the activity coming in and out of the PDP-D. This log is located at $POLICY_HOME/logs/network.log. This will show the notifications that the PDP-D sends out at different stages of processing. The order of successful processing begins with an ACTIVE notification to show that the onset was acknowledged and the operation is beginning transit.
+The network log will be used to monitor the activity coming in and out of the PDP-D. This log is located at *$POLICY_HOME/logs/network.log*. This will show the notifications that the PDP-D sends out at different stages of processing. The order of successful processing begins with an ACTIVE notification to show that the onset was acknowledged and the operation is beginning transit.
.. image:: Tut_vFW_policy_active.JPG