summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-11-14 01:00:15 +0000
committerGerrit Code Review <gerrit@onap.org>2017-11-14 01:00:15 +0000
commit628353edad045927ec30006cce1593d20e8df6bd (patch)
tree2bc8b95347ef3017b2b8cd143d1e88ebe19ed16d
parent0f85e76095bbe0f31e4842367ee36c2ca53a9127 (diff)
parentd18118014319955fcf3402e8231f023dbde4f56a (diff)
Merge "Policy documentation"
-rwxr-xr-xdocs/platform/Swarch_brmsgw.pngbin0 -> 39001 bytes
-rwxr-xr-xdocs/platform/Tut_cl_confirmAndDirectory.PNGbin0 -> 20448 bytes
-rwxr-xr-xdocs/platform/Tut_cl_finalStep.PNGbin0 -> 26471 bytes
-rwxr-xr-xdocs/platform/Tut_cl_preDeploy.PNGbin0 -> 22721 bytes
-rwxr-xr-xdocs/platform/Tut_cl_propFile.PNGbin0 -> 4793 bytes
-rwxr-xr-xdocs/platform/Tut_cl_valuesHighlight.pngbin0 -> 87568 bytes
-rw-r--r--docs/platform/clsimulation.rst539
-rw-r--r--docs/platform/index.rst6
-rwxr-xr-xdocs/platform/modAAI_getAllVserver.PNGbin0 -> 107025 bytes
-rwxr-xr-xdocs/platform/modAAI_getByVserverName.PNGbin0 -> 93524 bytes
-rwxr-xr-xdocs/platform/modAAI_getCloudRegions.pngbin0 -> 43507 bytes
-rwxr-xr-xdocs/platform/modAAI_namedQueryVnfId.PNGbin0 -> 87355 bytes
-rw-r--r--docs/platform/modAAIdata.rst124
-rw-r--r--docs/platform/swarch_brmsgw.rst83
-rw-r--r--docs/platform/tutorial_cl.rst56
15 files changed, 808 insertions, 0 deletions
diff --git a/docs/platform/Swarch_brmsgw.png b/docs/platform/Swarch_brmsgw.png
new file mode 100755
index 000000000..d4d067961
--- /dev/null
+++ b/docs/platform/Swarch_brmsgw.png
Binary files differ
diff --git a/docs/platform/Tut_cl_confirmAndDirectory.PNG b/docs/platform/Tut_cl_confirmAndDirectory.PNG
new file mode 100755
index 000000000..d9892faa7
--- /dev/null
+++ b/docs/platform/Tut_cl_confirmAndDirectory.PNG
Binary files differ
diff --git a/docs/platform/Tut_cl_finalStep.PNG b/docs/platform/Tut_cl_finalStep.PNG
new file mode 100755
index 000000000..bbdf09e5f
--- /dev/null
+++ b/docs/platform/Tut_cl_finalStep.PNG
Binary files differ
diff --git a/docs/platform/Tut_cl_preDeploy.PNG b/docs/platform/Tut_cl_preDeploy.PNG
new file mode 100755
index 000000000..fdf28ff95
--- /dev/null
+++ b/docs/platform/Tut_cl_preDeploy.PNG
Binary files differ
diff --git a/docs/platform/Tut_cl_propFile.PNG b/docs/platform/Tut_cl_propFile.PNG
new file mode 100755
index 000000000..422a8d236
--- /dev/null
+++ b/docs/platform/Tut_cl_propFile.PNG
Binary files differ
diff --git a/docs/platform/Tut_cl_valuesHighlight.png b/docs/platform/Tut_cl_valuesHighlight.png
new file mode 100755
index 000000000..c229280fe
--- /dev/null
+++ b/docs/platform/Tut_cl_valuesHighlight.png
Binary files differ
diff --git a/docs/platform/clsimulation.rst b/docs/platform/clsimulation.rst
new file mode 100644
index 000000000..06bea2911
--- /dev/null
+++ b/docs/platform/clsimulation.rst
@@ -0,0 +1,539 @@
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+**********************************************************
+Control Loop Simulation and Injection of Messages Overview
+**********************************************************
+
+.. contents::
+ :depth: 3
+
+Telemetry
+^^^^^^^^^
+The username and password for the Telemetry commands are in *${POLCIY_HOME}/config/policy-engine.properties*.
+
+Injecting messages:
+-------------------
+
+To inject messages use the following command. The injected message will look as if it came in from the specified topic and will be processed accordingly.
+
+Use the command:
+
+ .. code-block:: bash
+
+ http -a <userName>:<password> PUT :9696/policy/pdp/engine/topics/sources/ueb/<topic>/events @<onsetFile> Content-Type:"text/plain"
+
+Alternatively, this command could be used:
+
+ .. code-block:: bash
+
+ curl --silent --user <userName>:<password> -X PUT --header "Content-Type: text/plain" –data @<onsetFile> http://localhost:9696/policy/pdp/engine/topics/sources/ueb/<topic>/events
+
+The topic beeing used is *unauthenticated.DCAE_CL_OUTPUT*, which is subject to change. The onset file is a file that contains the data to inject as the onset. The data contained depends on the use case. This is an example for VoLTE:
+
+ .. code-block:: json
+ :caption: VoLTE_Sample_Onset
+
+ {
+ "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",
+ "closedLoopAlarmStart": 1484677482204798,
+ "closedLoopEventClient": "DCAE.HolmesInstance",
+ "closedLoopEventStatus": "ONSET",
+ "requestID": "97964e10-686e-4790-8c45-bdfa61df770f",
+ "target_type": "VM",
+ "target": "vserver.vserver-name",
+ "AAI": {
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.vserver-name": "dfw1lb01lb01",
+ "service-instance.service-instance-id" : "vserver-name-16102016-aai3255-data-11-1",
+ "generic-vnf.vnf-id" : "vnf-id-16102016-aai3255-data-11-1",
+ "generic-vnf.vnf-name" : "vnf-name-16102016-aai3255-data-11-1"
+ },
+ "from": "DCAE",
+ "version": "1.0.2"
+ }
+
+Getting Information
+-------------------
+
+To get the name of the controller(s) active, use:
+
+ .. code-block:: bash
+
+ curl --silent --user <username>:<password> -X GET http://localhost:9696/policy/pdp/engine/controllers | python -m json.tool
+
+To check the facts currently in memory, use the following command. There should be 1 each of org.onap.policy.controlloop.PapParams and org.onap.policy.controlloop.Params per policy pushed.
+
+ .. code-block:: bash
+
+ curl --silent --user <username>:<password> -X GET http://localhost:9696/policy/pdp/engine/controllers/<controllerName>/drools/facts/<artifactId> | python -m json.tool
+
+To get additional information about the controller, use:
+
+ .. code-block:: bash
+
+ curl --silent --user <username>:<password> -X GET http://localhost:9696/policy/pdp/engine/controllers/<controllerName> | python -m json.tool
+
+
+Simulators
+^^^^^^^^^^
+
+Currently, there are 4 supported simulators: A&AI, SO, vFC, and guard. When they are up, they are accessed via localhost on the following ports: A&AI – 6666, SO – 6667, vFC – 6668, and guard – 6669. They all respond with hard-coded values representing their various success messages except for with certain inputs. For the A&AI simulator, if the value being queried with a “GET” query is “getFail” the simulator returns an exception message, if the value being queried in a “GET” query is “disableClosedLoop” the simulator returns a response with the value of “is-closed-loop-disabled” set to true, and if the value being queried in a named query is “error” the response from the simulator is A&AI’s failure message. The other simulator that can return multiple response is the guard simulator, and that returns a deny response if the closed loop control name passed in is “denyGuard”
+
+Using the Simulators
+--------------------
+
+To check the status of the simulators, run the command: "*features status*". If the feature controlloop-utils is enabled, the simulators are being used, otherwise, they are not.
+
+**Turning on the simulators**
+
+ - First, make sure the controller is off by running the command “*policy stop*”.
+ - Then turn the feature on with the command “*features enable controlloop-utils*”.
+ - Finally restart the controller by running “*policy start*”.
+ - Run “*features status*” again and the *feature controlloop-utils* will be **enabled**.
+
+**Turning the simulators off**
+
+ - First, make sure the controller is off by running the command “*policy stop*”.
+ - Then turn the feature off with the command “*features disable controlloop-utils*”.
+ - Finally restart the controller by running “*policy start*”.
+ - Run “*features status*” again and the *feature controlloop-utils* will be **disabled**.
+
+**For Junits**
+
+ For Junits, the package *org.onap.policy.simulators* is neeeded. In the Util class, there are four methods to start the four different simulators: *buildAaiSim()*, *buildSoSim()*, *buildVfcSim()*, and *buildGuardSim()*. Once the method is called, the simulator should be up and waiting to respond to requests. To bring down the simulators, call *HttpServletServer.factory.destroy()*.
+
+Responses
+---------
+
+**A&AI**
+
+ .. code-block:: bash
+ :caption: vnf-GET-response
+
+ {
+ "vnf-id": vnfId, //vnfId will be the vnfId you query on. If you query on a vnfName, the id will be "error" if the name is "error", "5e49ca06-2972-4532-9ed4-6d071588d792" otherwise
+ "vnf-name": vnfName, //vnfName will be the vnfName you query on. If you query on a vnfId, the name will be "USUCP0PCOIL0110UJRT01"
+ "vnf-type": "RT",
+ "service-id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
+ "equipment-role": "UCPE",
+ "orchestration-status": "created",
+ "management-option": "ATT",
+ "ipv4-oam-address": "32.40.68.35",
+ "ipv4-loopback0-address": "32.40.64.57",
+ "nm-lan-v6-address": "2001:1890:e00e:fffe::1345",
+ "management-v6-address": "2001:1890:e00e:fffd::36",
+ "in-maint": false,
+ "is-closed-loop-disabled": isDisabled, //isDisabled will be true if the vnf name/Id you query on is disableClosedLoop, false otherwise
+ "resource-version": "1493389458092",
+
+ "relationship-list": {
+ "relationship": [{
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/1610_Func_Global_20160817084727/service-subscriptions/service-subscription/uCPE-VMS/service-instances/service-instance/USUCP0PCOIL0110UJZZ01",
+ "relationship-data": [{
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "1610_Func_Global_20160817084727"
+ }, {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "uCPE-VMS"
+ }, {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "USUCP0PCOIL0110UJZZ01"
+ }],
+ "related-to-property": [{
+ "property-key": "service-instance.service-instance-name"
+ }]
+ }, {
+ "related-to": "vserver",
+ "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USUCP0PCOIL0110UJZZ01%3A%3AuCPE-VMS/vservers/vserver/3b2558f4-39d8-40e7-bfc7-30660fb52c45",
+ "relationship-data": [{
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "att-aic"
+ }, {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "AAIAIC25"
+ }, {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "USUCP0PCOIL0110UJZZ01::uCPE-VMS"
+ }, {
+ "relationship-key": "vserver.vserver-id",
+ "relationship-value": "3b2558f4-39d8-40e7-bfc7-30660fb52c45"
+ }],
+ "related-to-property": [{
+ "property-key": "vserver.vserver-name",
+ "property-value": "USUCP0PCOIL0110UJZZ01-vsrx"
+ }]
+ }]
+ }
+
+
+ .. code-block:: bash
+ :caption: vnf-GET-fail
+
+ //This is returned if you query on the value "getFail"
+ {
+ "requestError": {
+ "serviceException": {
+ "messageId": "SVC3001",
+ "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)",
+ "variables": ["GET", "network/generic-vnfs/generic-vnf/getFail", "Node Not Found:No Node of type generic-vnf found at network/generic-vnfs/generic-vnf/getFail", "ERR.5.4.6114"]
+ }
+ }
+ }
+
+
+ .. code-block:: bash
+ :caption: vserver-GET-response
+
+ {
+ "vserver": [{
+ "vserver-id": "d0668d4f-c25e-4a1b-87c4-83845c01efd8",
+ "vserver-name": vserverName, // The value you query on
+ "vserver-name2": "vjunos0",
+ "vserver-selflink": "https://aai-ext1.test.att.com:8443/aai/v7/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USMSO1SX7NJ0103UJZZ01%3A%3AuCPE-VMS/vservers/vserver/d0668d4f-c25e-4a1b-87c4-83845c01efd8",
+ "in-maint": false,
+ "is-closed-loop-disabled": isDisabled, // True if the vserverName is "disableClosedLoop", false otherwise
+ "resource-version": "1494001931513",
+ "relationship-list": {
+ "relationship": [{
+ "related-to": "generic-vnf",
+ "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/e1a41e99-4ede-409a-8f9d-b5e12984203a",
+ "relationship-data": [{
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "e1a41e99-4ede-409a-8f9d-b5e12984203a"
+ }],
+ "related-to-property": [{
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "USMSO1SX7NJ0103UJSW01"
+ }]
+ }, {
+ "related-to": "pserver",
+ "related-link": "/aai/v11/cloud-infrastructure/pservers/pserver/USMSO1SX7NJ0103UJZZ01",
+ "relationship-data": [{
+ "relationship-key": "pserver.hostname",
+ "relationship-value": "USMSO1SX7NJ0103UJZZ01"
+ }],
+ "related-to-property": [{
+ "property-key": "pserver.pserver-name2"
+ }]
+ }]
+ }
+ }]
+ }
+
+
+ .. code-block:: bash
+ :caption: vserver-GET-error
+
+ //This is returned if you query on the value "getFail"
+ {
+ "requestError": {
+ "serviceException": {
+ "messageId": "SVC3001",
+ "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)",
+ "variables": ["GET", "nodes/vservers", "Node Not Found:No Node of type generic-vnf found at nodes/vservers", "ERR.5.4.6114"]
+ }
+ }
+ }
+
+
+ .. code-block:: bash
+ :caption: vnf-NamedQuery-response
+
+ {
+ "inventory-response-item": [{
+ "model-name": "service-instance",
+ "generic-vnf": {
+ "vnf-id": vnfID, // This will be the vnfID you query on
+ "vnf-name": "ZRDM2MMEX39",
+ "vnf-type": "vMME Svc Jul 14/vMME VF Jul 14 1",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "orchestration-status": "active",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1503082370097",
+ "model-invariant-id": "82194af1-3c2c-485a-8f44-420e22a9eaa4",
+ "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [{
+ "model-name": "service-instance",
+ "service-instance": {
+ "service-instance-id": "37b8cdb7-94eb-468f-a0c2-4e3c3546578e",
+ "service-instance-name": "Changed Service Instance NAME",
+ "model-invariant-id": "82194af1-3c2c-485a-8f44-420e22a9eaa4",
+ "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9",
+ "resource-version": "1503082993532",
+ "orchestration-status": "Active"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [{
+ "model-name": "pnf",
+ "generic-vnf": {
+ "vnf-id": "jimmy-test",
+ "vnf-name": "jimmy-test-vnf",
+ "vnf-type": "vMME Svc Jul 14/vMME VF Jul 14 1",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "orchestration-status": "active",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1504013830207",
+ "model-invariant-id": "862b25a1-262a-4961-bdaa-cdc55d69785a",
+ "model-version-id": "e9f1fa7d-c839-418a-9601-03dc0d2ad687"
+ },
+ "extra-properties": {}
+ }, {
+ "model-name": "service-instance",
+ "generic-vnf": {
+ "vnf-id": "jimmy-test-vnf2",
+ "vnf-name": "jimmy-test-vnf2-named",
+ "vnf-type": "vMME Svc Jul 14/vMME VF Jul 14 1",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "orchestration-status": "active",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1504014833841",
+ "model-invariant-id": "Eace933104d443b496b8.nodes.heat.vpg",
+ "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9"
+ },
+ "extra-properties": {}
+ }]
+ }
+ }]
+ }
+ }]
+ }
+
+
+ .. code-block:: bash
+ :caption: vserver-NamedQuery-response
+
+ {
+ "inventory-response-item": [{
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [{
+ "extra-properties": {
+ "extra-property": [{
+ "property-name": "model-ver.model-version-id",
+ "property-value": "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"
+ }, {
+ "property-name": "model-ver.model-name",
+ "property-value": "generic-vnf"
+ }, {
+ "property-name": "model.model-type",
+ "property-value": "widget"
+ }, {
+ "property-name": "model.model-invariant-id",
+ "property-value": "acc6edd8-a8d4-4b93-afaa-0994068be14c"
+ }, {
+ "property-name": "model-ver.model-version",
+ "property-value": "1.0"
+ }]
+ },
+ "generic-vnf": {
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "model-invariant-id": "acc6edd8-a8d4-4b93-afaa-0994068be14c",
+ "model-version-id": "93a6166f-b3d5-4f06-b4ba-aed48d009ad9",
+ "orchestration-status": "Created",
+ "resource-version": "1507826325834",
+ "service-id": "b3f70641-bdb9-4030-825e-6abb73a1f929",
+ "vnf-id": "594e2fe0-48b8-41ff-82e2-3d4bab69b192",
+ "vnf-name": "Vnf_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8",
+ "vnf-type": "8330e932-2a23-4943-8606/c15ce9e1-e914-4c8f-b8bb 1"
+ },
+ "inventory-response-items": {
+ "inventory-response-item": [{
+ "extra-properties": {
+ "extra-property": [{
+ "property-name": "model-ver.model-version-id",
+ "property-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+ }, {
+ "property-name": "model-ver.model-name",
+ "property-value": "service-instance"
+ }, {
+ "property-name": "model.model-type",
+ "property-value": "widget"
+ }, {
+ "property-name": "model.model-invariant-id",
+ "property-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+ }, {
+ "property-name": "model-ver.model-version",
+ "property-value": "1.0"
+ }]
+ },
+ "model-name": "service-instance",
+ "service-instance": {
+ "model-invariant-id": "82194af1-3c2c-485a-8f44-420e22a9eaa4",
+ "model-version-id": "46b92144-923a-4d20-b85a-3cbd847668a9",
+ "resource-version": "1507827626200",
+ "service-instance-id": "cf8426a6-0b53-4e3d-bfa6-4b2f4d5913a5",
+ "service-instance-name": "Service_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8"
+ }
+ }, {
+ "extra-properties": {
+ "extra-property": [{
+ "property-name": "model-ver.model-version-id",
+ "property-value": "93a6166f-b3d5-4f06-b4ba-aed48d009ad9"
+ }, {
+ "property-name": "model-ver.model-name",
+ "property-value": "generic-vnf"
+ }, {
+ "property-name": "model.model-type",
+ "property-value": "widget"
+ }, {
+ "property-name": "model.model-invariant-id",
+ "property-value": "acc6edd8-a8d4-4b93-afaa-0994068be14c"
+ }, {
+ "property-name": "model-ver.model-version",
+ "property-value": "1.0"
+ }]
+ },
+ "model-name": "generic-vnf",
+ "vf-module": {
+ "heat-stack-id": "Vfmodule_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8/5845f37b-6cda-4e91-8ca3-f5572d226488",
+ "is-base-vf-module": true,
+ "model-invariant-id": "acc6edd8-a8d4-4b93-afaa-0994068be14c",
+ "model-version-id": "93a6166f-b3d5-4f06-b4ba-aed48d009ad9",
+ "orchestration-status": "active",
+ "resource-version": "1507826326804",
+ "vf-module-id": "b0eff878-e2e1-4947-9597-39afdd0f51dd",
+ "vf-module-name": "Vfmodule_Ete_Named90e1ab3-dcd5-4877-9edb-eadfc84e32c8"
+ }
+ }]
+ },
+ "model-name": "generic-vnf"
+ }, {
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item": [{
+ "cloud-region": {
+ "cloud-owner": "Rackspace",
+ "cloud-region-id": "DFW",
+ "cloud-region-version": "v1",
+ "cloud-type": "SharedNode",
+ "cloud-zone": "CloudZone",
+ "owner-defined-type": "OwnerType",
+ "resource-version": "1507828410019",
+ "sriov-automation": false
+ },
+ "extra-properties": {}
+ }]
+ },
+ "tenant": {
+ "resource-version": "1507828410764",
+ "tenant-id": "1015548",
+ "tenant-name": "1015548"
+ }
+ }]
+ },
+ "vserver": {
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "prov-status": "ACTIVE",
+ "resource-version": "1507828410832",
+ "vserver-id": "70f081eb-2a87-4c81-9296-4b93d7d145c6",
+ "vserver-name": "vlb-lb-32c8",
+ "vserver-name2": "vlb-lb-32c8",
+ "vserver-selflink": "https://aai.api.simpledemo.openecomp.org:8443/aai/v11/nodes/vservers?vserver-name=vlb-lb-32c8"
+ }
+ }]
+ }
+
+
+ .. code-block:: bash
+ :caption: NamedQuery-error
+
+ // This is returned if you query the value "error"
+ {
+ "requestError": {
+ "serviceException": {
+ "messageId": "SVC3001",
+ "text": "Resource not found for %1 using id %2 (msg=%3) (ec=%4)",
+ "variables": ["POST Search", "getNamedQueryResponse", "Node Not Found:No Node of type generic-vnf found for properties", "ERR.5.4.6114"]
+ }
+ }
+ }
+
+
+**SO**
+
+ .. code-block:: bash
+ :caption: SO-response
+
+ {
+ "requestReferences": {
+ "instanceId": "ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff",
+ "requestId": "rq1234d1-5a33-ffdf-23ab-12abad84e331"
+ }
+ }
+
+
+**vFC**
+
+ .. code-block:: bash
+ :caption: vFC-POST-response
+
+ {
+ "jobId": "1"
+ }
+
+
+ .. code-block:: bash
+ :caption: vFC-GET-response
+
+ {
+ "jobId": jobId, //The jod id that you query
+ "responseDescriptor": {
+ "progress": "40",
+ "status": "finished",
+ "statusDescription": "OMC VMs are decommissioned in VIM",
+ "errorCode": null,
+ "responseId": 101,
+ "responseHistoryList": [{
+ "progress": "40",
+ "status": "proccessing",
+ "statusDescription": "OMC VMs are decommissioned in VIM",
+ "errorCode": null,
+ "responseId": "1"
+ }, {
+ "progress": "41",
+ "status": "proccessing",
+ "statusDescription": "OMC VMs are decommissioned in VIM",
+ "errorCode": null,
+ "responseId": "2"
+ }]
+ }
+ }
+
+
+**GUARD**
+
+ .. code-block:: bash
+ :caption: permit-response
+
+ {
+ "decision": "PERMIT",
+ "details": "Decision Permit. OK!"
+ }
+
+
+ .. code-block:: bash
+ :caption: permit-response
+
+ //This is returned if the closed loop name is deny guard
+ {
+ "decision": "DENY",
+ "details": "Decision Deny. You asked for it"
+ }
+
+
+End of Document
+
+.. SSNote: Wiki page ref. https://wiki.onap.org/pages/viewpage.action?pageId=16003633
+
diff --git a/docs/platform/index.rst b/docs/platform/index.rst
index 92faac72d..ae01ff9db 100644
--- a/docs/platform/index.rst
+++ b/docs/platform/index.rst
@@ -20,7 +20,9 @@ Policy Software Architecture
swarch_pap.rst
swarch_pdpx.rst
+ swarch_brmsgw.rst
feature_eelf.rst
+ clsimulation.rst
feature_testtransaction.rst
feature_healthcheck.rst
feature_statemgmt.rst
@@ -35,8 +37,12 @@ Policy Platform Tutorials
deployPDPPAP.rst
guardpolicy.rst
guardpdp.rst
+ tutorial_cl.rst
tutorial_vDNS.rst
tutorial_VOLTE.rst
tutorial_vFW.rst
tutorial_vCPE.rst
+ modAAIdata.rst
+
+
diff --git a/docs/platform/modAAI_getAllVserver.PNG b/docs/platform/modAAI_getAllVserver.PNG
new file mode 100755
index 000000000..93bd489fc
--- /dev/null
+++ b/docs/platform/modAAI_getAllVserver.PNG
Binary files differ
diff --git a/docs/platform/modAAI_getByVserverName.PNG b/docs/platform/modAAI_getByVserverName.PNG
new file mode 100755
index 000000000..25858d412
--- /dev/null
+++ b/docs/platform/modAAI_getByVserverName.PNG
Binary files differ
diff --git a/docs/platform/modAAI_getCloudRegions.png b/docs/platform/modAAI_getCloudRegions.png
new file mode 100755
index 000000000..8da0a218a
--- /dev/null
+++ b/docs/platform/modAAI_getCloudRegions.png
Binary files differ
diff --git a/docs/platform/modAAI_namedQueryVnfId.PNG b/docs/platform/modAAI_namedQueryVnfId.PNG
new file mode 100755
index 000000000..192df9ba8
--- /dev/null
+++ b/docs/platform/modAAI_namedQueryVnfId.PNG
Binary files differ
diff --git a/docs/platform/modAAIdata.rst b/docs/platform/modAAIdata.rst
new file mode 100644
index 000000000..4d8ad9c75
--- /dev/null
+++ b/docs/platform/modAAIdata.rst
@@ -0,0 +1,124 @@
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+****************************
+Verifying/Modifying AAI Data
+****************************
+
+.. contents::
+ :depth: 3
+
+This page highlights key commands used by Policy to look at and modify A&AI data for testing purposes. Please refer to the A&AI REST API Documentation for more details.
+
+Checking Current Data
+^^^^^^^^^^^^^^^^^^^^^
+
+To get all the vnfs that are in AAI
+-----------------------------------
+
+Use this command if you want to get all the vnf's that are provisioned in A&AI. This is useful if you want to find a couple vnf's you can later query.
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -X GET https://aai.api.simpledemo.openecomp.org:8443/aai/v11/network/generic-vnfs | python -m json.tool
+
+To get a specific vnf
+---------------------
+
+If you have a **vnf-id**, this command returns the details related to the specific vnf id you are querying. Policy primarily does this query if the onset has a vnf id but not the isClosedLoopDisabled field.
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -X GET https://aai.api.simpledemo.openecomp.org:8443/aai/v11/network/generic-vnfs/generic-vnf/<vnfID> | python -m json.tool
+
+If you have a **vnf-name**, this command returns the details related to the specific vnf name you are querying. Policy primarily does this query if the onset has a vnf name but no vnf id.
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -X GET https://aai.api.simpledemo.openecomp.org:8443/aai/v11/network/generic-vnfs/generic-vnf?vnf-name=<vnfName> | python -m json.tool
+
+To find all the vservers
+------------------------
+
+Follow these steps to get all of the vservers. This is useful to get a couple of vservers to query later, either manually or through a closed loop.
+
+**Step 1:** Execute the following:
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -X GET https://aai.api.simpledemo.openecomp.org:8443/aai/v11/cloud-infrastructure/cloud-regions | python -m json.tool
+
+ Take note of all the cloud-owner/cloud-region combinations. In this example, there are 3 combinations: Skynet/CL-MR1, AMIST/AMCR1, and Rackspace/DFW.
+
+ .. image:: modAAI_getCloudRegions.png
+
+**Step 2:** Invoke the following command for each combination:
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -X GET https://aai.api.simpledemo.openecomp.org:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/<cloudOwner>/<cloudRegion>?depth=all | python -m json.tool
+
+ .. image:: modAAI_getAllVserver.PNG
+
+To get a specific vserver
+-------------------------
+
+Use this command to get the details of a specific vserver based on its vserver name.
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -X GET https://aai.api.simpledemo.openecomp.org:8443/aai/v11/nodes/vservers?vserver-name=<vserverName> | python -m json.tool
+
+ .. image:: modAAI_getByVserverName.PNG
+
+Named-Queries
+-------------
+
+These commands are used to get more information than can be obtained in a single other query. They require more data to be sent in the query, but return information on the related instances of a given vnf or vserver, as well as the information about the vnf/vserver itself.
+
+**For vFW:**
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -d "{\"query-parameters\": { \"named-query\": { \"named-query-uuid\": \"a93ac487-409c-4e8c-9e5f-334ae8f99087\" } }, \"instance-filters\":{\"instance-filter\":[ {\"generic-vnf\": { \"vnf-id\": \"<vnfID>\"}}]}}" -X POST https://aai.api.simpledemo.openecomp.org:8443/aai/search/named-query | python -m json.tool
+
+ .. image:: modAAI_namedQueryVnfId.PNG
+
+**For vDNS:**
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<userName>:<password>" --header "X-FromAppId: <fromApp>" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: <requestID>" -d "{\"query-parameters\": { \"named-query\": { \"named-query-uuid\": \"4ff56a54-9e3f-46b7-a337-07a1d3c6b469\" } }, \"instance-filters\":{\"instance-filter\":[ {\"vserver\": { \"vserver-name\": \"<vnfID>\"}}]}}" -X POST https://aai.api.simpledemo.openecomp.org:8443/aai/search/named-query | python -m json.tool
+
+Adding Data to A&AI
+^^^^^^^^^^^^^^^^^^^
+
+Generic-Vnf
+-----------
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<username>:<password>" --header "X-FromAppId: POLICY" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: 8611ece5-5786-4e71-b72f-e87ef44029da" -X PUT -H "Content-Type: application/json" --data @addVnf.txt https://aai.api.simpledemo.openecomp.org:8443/aai/v11/network/generic-vnfs/generic-vnf/<vnfID> | python -m json.tool
+
+The addVNF.txt file is just the data you would like to add. At minimum, the vnf-id, vnf-name, vnf-type and is-closed-loop-disabled fields need to be filled out, and the vnf-id needs to match the one you choose in the url of the curl command.
+
+Vserver
+-------
+
+ .. code-block:: bash
+
+ curl --silent -k -u "<username>:<password>" --header "X-FromAppId: POLICY" --header "Content-Type: application/json" --header "Accept: application/json" --header "X-TransactionId: 8611ece5-5786-4e71-b72f-e87ef44029da" -X PUT -H "Content-Type: application/json" --data @addVserver.txt https://aai.api.simpledemo.openecomp.org:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/<cloud-owner>/<cloud-region-id>/tenants/tenant/<tenant-id>/vservers/vserver/<vserver-id>
+
+The addVserver.txt file is the vserver object you would like to add. It needs values for vserver-id, vserver-name, vserver-selflink, in-maint, and is-close-loop-disabled at minimum. The values of <cloud-owner>, <cloud-region-id>, and <tenants> depends on the values already in Rackspace, see the section above under finding all Vservers.
+
+Named Queries
+-------------
+
+The data for the named queries is based off of the data in the relationship-list field for both vservers and vnfs.
+
+End of Document
+
+.. SSNote: Wiki page ref. https://wiki.onap.org/pages/viewpage.action?pageId=16005849#Verifying/ModifyingAAIData
+
+
diff --git a/docs/platform/swarch_brmsgw.rst b/docs/platform/swarch_brmsgw.rst
new file mode 100644
index 000000000..7f4a6087a
--- /dev/null
+++ b/docs/platform/swarch_brmsgw.rst
@@ -0,0 +1,83 @@
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+****************************
+BRMSGW Software Architecture
+****************************
+
+.. contents::
+ :depth: 3
+
+Overview
+^^^^^^^^
+This document provides an architectural overview of the **BRMSGW**. **BRMS** stands for Business Rule Management System which is based on JBoss Business Rule Management software used by PDP-D or Drools based rules and **GW** is short for Gateway. BRMSGW acts as as interface between PDP-D and PDP-X so that the drools rules are managed/assigned to PDP-D. It manages the rules present in PDP-D and is an integral part of the closed loop architecture.
+
+Context
+^^^^^^^
+Purpose of BRMSGW:
+
+- PDP-D needs rule artifacts in nexus in order to take them. So, BRMSGW converts the BRMS configuration rules from PDP-X .drl format to PDP-D nexus artifact format.
+- BRMSGW Listens to Notifications from PDP for any BRMS based policies.
+- It manages controllers and dependencies for the PDP-D rule artifacts/jars.
+- Upon any notification, BRMS rule (.drl) would be extracted from the PDP-X and updated to the maven project
+- Maven deploy is executed to create the rule jar and pushed to nexus repository to make it available for PDP-D.
+- DMaaP/UEB notification is sent to PDP-D regarding the new rule artifact
+
+BRMSGW Application software
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- BRMSGW application is a standalone java application. It can support multiple BRMSGW applications running. But, would run in active-standby mode. This is internally managed by BRMSGW backup monitors.
+- It is a policy client application which only acts on PDP's notifications. The action is only taken if the BRMSGW Node is active and during standby mode actions are skipped in order to avoid multiple nexus jars
+- Upon Notification BRMSGW, will be doing a getConfig call back to PDP to retrieve the brms policy configuration which is the .drl rule. This rule is identified by its controller meta data information and added to appropriate controller's maven project in file system.
+- Once the project structure is updated based on update or remove notification the BRMS push is initiated. During this process maven deploy cycle is executed and the rule jar is pushed to nexus repository.
+- Once the rule jar is pushed to nexus, a notification message is sent to PDP-D.
+- MariaDB - In order to maintain sync and other controller, rule information database is used to keep in sync.
+- FileSystem - Properties, configuration and Rule maven projects are stored in file system.
+- Maven - BRMSGW has dependency on maven installation, hence needs maven and maven's settings.xml file to be available in order to be operating successfully.
+- BRMSGW project is available at https://git.onap.org/policy/engine/tree/BRMSGateway
+
+Architecture Overview
+^^^^^^^^^^^^^^^^^^^^^
+BRMSGW flow is shown below:
+
+ .. image:: Swarch_brmsgw.png
+
+ 1. Notification Listener will be listening to notifications from BRMSGW and will be triggered by PDP's Notification messages.
+ 2. If the notification is about BRMS rule, Retrieve rule is called.
+ 3. Retrieve rule does a getConfig call using the policy API to PDP-X and retrieves the BRMS configuration rule which is the raw .drl rule.
+ 4. The .drl rule retrieved is then passed down to Rule project management.
+ 5. The rule is either added to the project or removed from the project as per the notification received and the file system is updated.
+ 6. Maven deploy execution cycle is called.which creates the rule jar artifact from the updated project.
+ 7. Maven deploy is going to upload the rule jar to nexus repository.
+ 8. Once nexus is updated a DMaaP/UEB notification message is sent to PDP-D about the new rule artifact.
+
+ .. code-block:: bash
+ :caption: Notification Format that is sent to PDP-D:
+
+ {
+ "requestID": "7f5474ca-16a9-42ac-abc0-d86f62296fbc",
+ "entity": "controller",
+ "controllers": [{
+ "name": "closed-loop",
+ "drools": {
+ "groupId": "org.onap.policy-engine.drools",
+ "artifactId": "closed-loop",
+ "version": "1.1.0"
+ },
+ "operation": "create"
+ }]
+ }
+
+
+Configuration
+^^^^^^^^^^^^^
+- All configurations related to the brmsgw are present in config.properties.
+- All dependency configurations related to controllers are maintained in dependency.json file.
+
+
+End of Document
+
+.. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/BRMSGW+Software+Architecture
+
+
diff --git a/docs/platform/tutorial_cl.rst b/docs/platform/tutorial_cl.rst
new file mode 100644
index 000000000..f73bf8991
--- /dev/null
+++ b/docs/platform/tutorial_cl.rst
@@ -0,0 +1,56 @@
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+***********************************************************************************************
+Tutorial: Generating and Testing your own Control Loop Operational Policy in a standalone PDP-D
+***********************************************************************************************
+
+.. contents::
+ :depth: 3
+
+To generate your own control loop operational policy, use the *create-cl-amsterdam* tool. The *create-cl-amsterdam* script is located in *${POLICY_HOME}/bin (/opt/app/policy/bin)*. When the script is run, it will ask for values for a variety of fields. The fields will have pre-filled out defaults, and for the most part, the defaults are fine to leave in. The two main fields that should be changed are the Template Control Loop Name and the Control Loop Yaml.
+
+ .. image:: Tut_cl_valuesHighlight.png
+
+Make sure the Yaml’s controlLoopName matches the Template Control Loop Name you pass in. Finally, confirm that the parameters are correct, confirm the directory it will add the policy files in (default is /tmp) and tell the script to create the maven artifact.
+
+ *Confirm the parameters and enter the directory to install in as shown below:*
+
+ .. image:: Tut_cl_confirmAndDirectory.PNG
+
+ *Choose whether to immediately deploy (in this case the directory is /tmp/amsterdam)*
+
+ .. image:: Tut_cl_preDeploy.PNG
+
+When the processing is done, you get the choice of immediately deploying the policy to the local repository, or first examining the rules in the directory it tells you. If you don’t immediately deploy, you need to use the “*mvn install*” command in the newly created directory to continue. When all that is done, go to the directory where the rule was placed (the /tmp/amsterdam directory in this case) and copy the *<name>-controller.properties* file to *${POLICY_HOME}/config*. Turn the engine off and then back on with “*policy stop*” and then “*policy start*”.
+
+ *Location of the properties file*
+
+ .. image:: Tut_cl_propFile.PNG
+
+ *Moving the properties file to ${POLICY_HOME}/config*
+
+ .. image:: Tut_cl_finalStep.PNG
+
+Proceed with testing your new policy as described in the specific tutorials:
+
+• vCPE - Tutorial: Testing the vCPE use case in a standalone PDP-D
+• vDNS - Tutorial: Testing the vDNS Use Case in a standalone PDP-D
+• vFW - Tutorial: Testing the vFW flow in a standalone PDP-D
+• VoLTE - Tutorial: Testing the VOLTE Use Case in a standalone PDP-D
+
+If you would like to deploy a control loop in Eclipse from the control loop archetype template:
+
+• Modifying the Amsterdam release template
+
+
+
+
+End of Document
+
+
+
+
+.. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/Tutorial%3A+Generating+and+Testing+your+own+Control+Loop+Operational+Policy+in+a+standalone+PDP-D
+