diff options
-rw-r--r-- | docs/development/actors/aai/aai.rst | 143 | ||||
-rw-r--r-- | docs/development/actors/aai/classHierarchy.png | bin | 0 -> 38398 bytes | |||
-rw-r--r-- | docs/development/actors/aai/classHierarchy.pptx | bin | 0 -> 36745 bytes | |||
-rw-r--r-- | docs/development/actors/guard/guard.rst | 125 | ||||
-rw-r--r-- | docs/development/actors/sdnr/sdnr.rst | 186 | ||||
-rw-r--r-- | docs/development/actors/so/so.rst | 445 | ||||
-rw-r--r-- | docs/development/actors/vfc/vfc.rst | 162 | ||||
-rw-r--r-- | docs/development/devtools/distribution-s3p.rst | 60 | ||||
-rw-r--r-- | docs/development/devtools/images/distribution-performance-api-report.png | bin | 0 -> 76255 bytes | |||
-rw-r--r-- | docs/development/devtools/images/distribution-performance-summary-report.png | bin | 0 -> 98261 bytes |
10 files changed, 1099 insertions, 22 deletions
diff --git a/docs/development/actors/aai/aai.rst b/docs/development/actors/aai/aai.rst index b8e0bdc6..a418f440 100644 --- a/docs/development/actors/aai/aai.rst +++ b/docs/development/actors/aai/aai.rst @@ -2,14 +2,149 @@ .. Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -################# +.. _aai-label: + +########## A&AI Actor -################# +########## .. contents:: :depth: 3 Overview of A&AI Actor -############################# +###################### +ONAP Policy Framework enables various actors, several of which require additional +data to be gathered from A&AI via a REST call. Previously, the request was built, +and the REST call made, by the application. However, A&AI queries have now been +implemented using the new Actor framework. + +Each operation supported by the actor is associated with its own java class, which is +responsible for populating the request structure and invoking the REST service. The +class hierarchy is shown below. + +.. image:: classHierarchy.png + +Currently, the following operations are supported: + +- Tenant +- Pnf +- CustomQuery + +One thing that sets the A&AI Actor implementation apart from the other Actor +implementations is that it is typically used to gather data for input to the +other actors. Consequently, when an A&AI operation completes, it places its +response into the *properties* field of the *context*, which is passed via the +*ControlLoopOperationParams*. The names of the keys within the *properties* +field are typically of the form, "AAI.<operation>.<targetEntity>", where +"operation" is the name of the operation, and "targetEntity" is the *targetEntity* +passed via the *ControlLoopOperationParams*. For example, the response for +the Tenant query for a target entity named "ozVserver" would be stored as a +*properties* named "AAI.Tenant.ozVserver". + +On the other hand, as there is only one "custom query" for a given ONSET, the +*Custom Query* operation deviates from this, in that it always stores its response +using the key, "AAI.AaiCqResponse". + + +Request +####### + +Most of the the A&AI operations use "GET" requests and thus do not populate +a request structure. However, for those that do, the request structure is +described in the table below. + +Note: the Custom Query Operation requires tenant data, thus it performs a *Tenant* +operation before sending its request. The tenant data is gathered for the vserver +whose name is found in the "vserver.vserver-name" field of the enrichment data provided +by DCAE with the ONSET event. + ++----------------------------------+---------+----------------------------------------------------------------------+ +| Field Name | Type | Description | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| Custom Query: | | | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *start* | string | Extracted from the *result-data[0].resource-link* field of the | +| | | Tenant query response. | ++----------------------------------+---------+----------------------------------------------------------------------+ + + +Examples +######## + +Suppose the *ControlLoopOperationParams* were populated as follows, with the tenant +query having already been performed: + +.. code-block:: bash + + { + "actor": "AAI", + "operation": "CustomQuery", + "context": { + "enrichment": { + "vserver.vserver-name": "Ete_vFWCLvFWSNK_7ba1fbde_0" + }, + "properties": { + "AAI.Tenant.Ete_vFWCLvFWSNK_7ba1fbde_0": { + "result-data": [ + { + "resource-type": "vserver", + "resource-link": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/6c3b3714-e36c-45af-9f16-7d3a73d99497" + } + ] + } + } + } + } + +An example of a Custom Query request constructed by the actor using the above +parameters, sent to the A&AI REST server: + +.. code-block:: bash + + { + "start": "/aai/v15/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/3f2aaef74ecb4b19b35e26d0849fe9a2/vservers/vserver/6c3b3714-e36c-45af-9f16-7d3a73d99497", + "query": "query/closed-loop" + } + + +An example response received from the A&AI REST service: + +.. code-block:: bash + + { + "results": [ + { + "vserver": { + "vserver-id": "f953c499-4b1e-426b-8c6d-e9e9f1fc730f", + "vserver-name": "Ete_vFWCLvFWSNK_7ba1fbde_0", + "vserver-name2": "Ete_vFWCLvFWSNK_7ba1fbde_0", + "prov-status": "ACTIVE", + "vserver-selflink": "http://10.12.25.2:8774/v2.1/41d6d38489bd40b09ea8a6b6b852dcbd/servers/f953c499-4b1e-426b-8c6d-e9e9f1fc730f", + "in-maint": false, + "is-closed-loop-disabled": false, + ... + } + + +Configuration of the A&AI Actor +############################### + +The following table specifies the fields that should be provided to configure the A&AI +actor. + +=============================== ==================== ================================================================== +Field name type Description +=============================== ==================== ================================================================== +clientName string Name of the HTTP client to use to send the request to the + A&AI REST server. +timeoutSec integer (optional) Maximum time, in seconds, to wait for a response to be received + from the REST server. Defaults to 90s. +path string URI appended to the URL. This field only applies to individual + operations; it does not apply at the actor level. Note: the + *path* should not include a leading or trailing slash. +=============================== ==================== ================================================================== -This is a place-holder for the actor documentation. +The individual operations are configured using these same field names. However, all +of them, except the *path*, are optional, as they inherit their values from the +corresponding actor-level fields. diff --git a/docs/development/actors/aai/classHierarchy.png b/docs/development/actors/aai/classHierarchy.png Binary files differnew file mode 100644 index 00000000..162b1da3 --- /dev/null +++ b/docs/development/actors/aai/classHierarchy.png diff --git a/docs/development/actors/aai/classHierarchy.pptx b/docs/development/actors/aai/classHierarchy.pptx Binary files differnew file mode 100644 index 00000000..e320c49a --- /dev/null +++ b/docs/development/actors/aai/classHierarchy.pptx diff --git a/docs/development/actors/guard/guard.rst b/docs/development/actors/guard/guard.rst index 5a26c76d..2c7f2611 100644 --- a/docs/development/actors/guard/guard.rst +++ b/docs/development/actors/guard/guard.rst @@ -2,14 +2,127 @@ .. Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -################# -Guard Actor -################# +########### +GUARD Actor +########### .. contents:: :depth: 3 -Overview of Guard Actor -############################# +Overview of GUARD Actor +####################### -This is a place-holder for the actor documentation. +Within ONAP Policy Framework, a GUARD is typically an implicit check performed at the +start of each operation and is performed by making a REST call to the XACML-PDP. +Previously, the request was built, and the REST call made, by the application. However, +Guard checks have now been implemented using the new Actor framework. + +Currently, there is a single operation, *Decision*, which is implemented by the java +class, *GuardOperation*. This class is derived from *HttpOperation*. + + +Request +####### + +A number of the request fields are populated from values specified in the +actor/operation's configuration parameters (e.g., "onapName"). Additional fields +are specified below. + +Request ID +********** + +The "requestId" field is set to a UUID. + + +Resource +******** + +The "resource" field is populated with a *Map* containing a single item, "guard". The +value of the item is set to the contents of the *payload* specified within the +*ControlLoopOperationParams*. + + +Examples +######## + +Suppose the *ControlLoopOperationParams* were populated as follows: + +.. code-block:: bash + + { + "actor": "GUARD", + "operation": "Decision", + "payload": { + "actor": "SO", + "operation": "VF Module Create", + "target": "OzVServer", + "requestId": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", + "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "vfCount": 2 + } + } + +An example of a request constructed by the actor using the above parameters, sent to the +GUARD REST server: + +.. code-block:: bash + + { + "ONAPName": "Policy", + "ONAPComponent": "Drools PDP", + "ONAPInstance": "Usecases", + "requestId": "90ee99d2-f2d8-4d90-b162-605203c30180", + "action": "guard", + "resource": { + "guard": { + "actor": "SO", + "operation": "VF Module Create", + "target": "OzVServer", + "requestId": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65", + "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3", + "vfCount": 2 + } + } + } + + +An example response received from the GUARD REST service: + +.. code-block:: bash + + { + "status": "Permit", + "advice": {}, + "obligations": {}, + "policies": {} + } + + +Configuration of the GUARD Actor +################################ + +The following table specifies the fields that should be provided to configure the GUARD +actor. + +=============================== ===================== ================================================================== +Field name type Description +=============================== ===================== ================================================================== +clientName string Name of the HTTP client to use to send the request to the + GUARD REST server. +timeoutSec integer (optional) Maximum time, in seconds, to wait for a response to be received + from the REST server. Defaults to 90s. +path string URI appended to the URL. This field only applies to individual + operations; it does not apply at the actor level. Note: the + *path* should not include a leading or trailing slash. +onapName string ONAP Name (e.g., "Policy") +onapComponent string ONAP Component (e.g., "Drools PDP") +onapInstance string ONAP Instance (e.g., "Usecases") +action string (optional) Used to populate the "action" request field. + Defaults to "guard". +disabled boolean (optional) **True**, to disable guard checks, **false** otherwise. + Defaults to *false*. +=============================== ===================== ================================================================== + +The individual operations are configured using these same field names. However, all +of them, except the path, are optional, as they inherit their values from the +corresponding actor-level fields. diff --git a/docs/development/actors/sdnr/sdnr.rst b/docs/development/actors/sdnr/sdnr.rst index 2b49d24a..13d91940 100644 --- a/docs/development/actors/sdnr/sdnr.rst +++ b/docs/development/actors/sdnr/sdnr.rst @@ -2,14 +2,192 @@ .. Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -################# +.. _sdnr-label: + +########## SDNR Actor -################# +########## .. contents:: :depth: 3 Overview of SDNR Actor -############################# +###################### +ONAP Policy Framework enables SDNR as one of the supported actors. SDNR uses two +DMaaP topics, one to which requests are published, and another from which responses +are received. SDNR may generate more than one response for a particular request, +the first response simply indicating that the request was accepted, while the second +response indicates completion of the request. For each request, a unique sub-request +ID is generated. This is used to match the received responses with the published +requests. + +When an SDNR request completes, whether successfully or unsuccessfully, the actor +populates the *controlLoopResponse* within the *OperationOutcome*. The application +will typically publish this to a notification topic so that downstream systems can +take appropriate action. + +All SDNR operations are currently supported by a single java class, +*SdnrOperation*, which is responsible for populating the request structure +appropriately. This class is derived from *BidirectionalTopicOperation*. + + +Request +####### + +CommonHeader +************ + +The "CommonHeader" field in the request is built by policy. + +=============================== =========== ================================================================== + "CommonHeader" field name type Description +=============================== =========== ================================================================== +SubRequestID string Generated by Policy. Is a UUID and used internally by policy + to match the response with the request. +RequestID string Inserted by Policy. Maps to the UUID sent by DCAE i.e. the ID + used throughout the closed loop lifecycle to identify a request. +=============================== =========== ================================================================== + + +Action +****** + +The "action" field uniquely identifies the operation to perform. Operation names are +not validated. Instead, they are passed to SDNR, untouched. + + +RPC Name +******** + +The "rpc-name" field is the same as the "action" field, with everything mapped to lower +case. + + +Payload +******* + +The "payload" field is populated with the *payload* text that is provided within the +ONSET event; no additional transformation is applied. + + +Examples +######## + +Suppose the *ControlLoopOperationParams* were populated as follows: + +.. code-block:: bash + + { + "actor": "SDNR", + "operation": "ModifyConfig", + "context": { + "event": { + "requestId": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "payload": "some text" + } + } + } + +An example of a request constructed by the actor using the above parameters, published +to the SDNR request topic: + +.. code-block:: bash + + { + "body": { + "input": { + "CommonHeader": { + "TimeStamp": "2020-05-18T14:43:58.550499700Z", + "APIVer": "1.0", + "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "SubRequestID": "848bfd15-b189-43a1-bdea-80982b41fa24", + "RequestTrack": {}, + "Flags": {} + }, + "Action": "ModifyConfig", + "Payload": "some text" + } + }, + "version": "1.0", + "rpc-name": "modifyconfig", + "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-848bfd15-b189-43a1-bdea-80982b41fa24", + "type": "request" + } + + +An example initial response received from the SDNR response topic: + +.. code-block:: bash + + { + "body": { + "output": { + "CommonHeader": { + "TimeStamp": "2020-05-18T14:44:10.000Z", + "APIver": "1.0", + "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "SubRequestID": "848bfd15-b189-43a1-bdea-80982b41fa24", + "RequestTrack": [], + "Flags": [] + }, + "Status": { + "Code": 100, + "Value": "ACCEPTED" + } + } + }, + "version": "1.0", + "rpc-name": "modifyconfig", + "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-848bfd15-b189-43a1-bdea-80982b41fa24", + "type": "response" + } + + +An example final response received from the SDNR on the same response topic: + +.. code-block:: bash + + { + "body": { + "output": { + "CommonHeader": { + "TimeStamp": "2020-05-18T14:44:20.000Z", + "APIver": "1.0", + "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200", + "SubRequestID": "848bfd15-b189-43a1-bdea-80982b41fa24", + "RequestTrack": [], + "Flags": [] + }, + "Status": { + "Code": 200, + "Value": "SUCCESS" + }, + "Payload": "{ \"Configurations\":[ { \"Status\": { \"Code\": 200, \"Value\": \"SUCCESS\" }, \"data\":{\"FAPService\":{\"alias\":\"Chn0330\",\"X0005b9Lte\":{\"phyCellIdInUse\":6,\"pnfName\":\"ncserver23\"},\"CellConfig\":{\"LTE\":{\"RAN\":{\"Common\":{\"CellIdentity\":\"Chn0330\"}}}}}} } ] }" + } + }, + "version": "1.0", + "rpc-name": "modifyconfig", + "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-848bfd15-b189-43a1-bdea-80982b41fa24", + "type": "response" + } + + +Configuration of the SDNR Actor +############################### + +The following table specifies the fields that should be provided to configure the SNDR +actor. + +=============================== ==================== ================================================================== +Field name type Description +=============================== ==================== ================================================================== +sinkTopic string Name of the topic to which the request should be published. +sourceTopic string Name of the topic from which the response should be read. + This must not be the same as the *sinkTopic*. +timeoutSec integer (optional) Maximum time, in seconds, to wait for a response to be received + on the topic. +=============================== ==================== ================================================================== -This is a place-holder for the actor documentation. +The individual operations are configured using these same field names. However, all +of them are optional, as they inherit their values from the corresponding actor-level +fields. diff --git a/docs/development/actors/so/so.rst b/docs/development/actors/so/so.rst index 2062d585..c7663d8b 100644 --- a/docs/development/actors/so/so.rst +++ b/docs/development/actors/so/so.rst @@ -2,14 +2,451 @@ .. Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -################# +.. _so-label: + +########## SO Actor -################# +########## .. contents:: :depth: 3 Overview of SO Actor -############################# +###################### +ONAP Policy Framework enables SO as one of the supported actors. SO uses a REST-based +interface. However, as requests may not complete right away, a REST-based polling +interface is used to check the status of the request. The *requestId* is extracted +from the initial response and is appended to the *pathGet* configuration parameter to +generate the URL used to poll for completion. + +Each operation supported by the actor is associated with its own java class, which is +responsible for populating the request structure appropriately and sending the request. +Note: the request may be issued via POST, DELETE, etc., depending on the operation. +The operation-specific classes are all derived from the *SoOperation* class, which is, +itself, derived from *HttpOperation*. The following operations are currently supported: + +- VF Module Create +- VF Module Delete + + +Request +####### + +A number of nested structures are populated within the request. Several of them are +populated with data extracted from the A&AI Custom Query response that is retrieved +using the Target resource ID specified in the *ControlLoopOperationParams*. The +following table lists the contents of some of the fields that appear within these +structures. + ++----------------------------------+---------+----------------------------------------------------------------------+ +| Field Name | Type | Description | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| top level: | | | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *operationType* | string | Inserted by Policy. Name of the operation. | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| requestDetails: | | | ++----------------------------------+---------+----------------------------------------------------------------------+ +| requestParameters | | Applicable to *VF Module Create*. | +| | | Set by Policy from the *requestParameters* specified in the | +| | | *payload* of the *ControlLoopOperationParams*. | +| | | The value is treated as a JSON string and decoded into an | +| | | *SoRequestParameters* object that is placed into this field. | ++----------------------------------+---------+----------------------------------------------------------------------+ +| configurationParameters | | Applicable to *VF Module Create*. | +| | | Set by Policy from the *configurationParameters* specified in the | +| | | *payload* of the *ControlLoopOperationParams*. | +| | | The value is treated as a JSON string and decoded into a | +| | | *List* of *Maps* that is placed into this field. | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| modelInfo: | | Set by Policy. Copied from the *target* specified in the | +| | | *ControlLoopOperationParams*. | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| cloudConfiguration: | | | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *tenantId* | string | The ID of the "default" Tenant selected from the A&AI Custom Query | +| | | response. | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *lcpCloudRegionId* | string | The ID of the "default" Cloud Region selected from the A&AI Custom | +| | | Query response. | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| relatedInstanceList[0]: | | Applicable to *VF Module Create*. | +| | | The "default" Service Instance selected from the A&AI Custom Query | +| | | response. | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| relatedInstanceList[1]: | | Applicable to *VF Module Create*. | +| | | The VNF selected from the A&AI Custom Query | +| | | response. | ++----------------------------------+---------+----------------------------------------------------------------------+ + + +Examples +######## + +Suppose the *ControlLoopOperationParams* were populated as follows: + +.. code-block:: bash + + { + "actor": "SO", + "operation": "Reroute", + "target": { + "modelInvariantId": "2246ebc9-9b9f-42d0-a5e4-0248324fb884", + "modelName": "VlbCdsSb00..vdns..module-3", + "modelVersion": "1", + "modelCustomizationUuid": "3a74410a-6c74-4a32-94b2-71488be6da1a", + "modelVersionId": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1", + "modelCustomizationId": "3a74410a-6c74-4a32-94b2-71488be6da1a", + "modelUuid": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1", + "modelInvariantUuid": "2246ebc9-9b9f-42d0-a5e4-0248324fb884" + }, + "context": { + "cqdata": { + "tenant": { + "id": "41d6d38489bd40b09ea8a6b6b852dcbd" + }, + "cloud-region": { + "id": "RegionOne" + }, + "service-instance": { + "id": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34", + "modelInvariantId": "6418bb39-61e1-45fc-a36b-3f211bb846c7", + "modelName": "vLB_CDS_SB00_02", + "modelVersion": "1.0", + "modelVersionId": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51", + "modelUuid": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51", + "modelInvariantUuid": "6418bb39-61e1-45fc-a36b-3f211bb846c7" + }, + "generic-vnf": [ + { + "vnfId": "6636c4d5-f608-4376-b6d8-7977e98cb16d", + "vf-modules": [ + { + "modelInvariantId": "827356a9-cb60-4976-9713-c30b4f850b41", + "modelName": "vLB_CDS_SB00", + "modelVersion": "1.0", + "modelCustomizationUuid": "6478f94b-0b20-4b44-afc0-94e48070586a", + "modelVersionId": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da", + "modelCustomizationId": "6478f94b-0b20-4b44-afc0-94e48070586a", + "modelUuid": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da", + "modelInvariantUuid": "827356a9-cb60-4976-9713-c30b4f850b41" + } + ] + } + ] + } + }, + "payload": { + "requestParameters": "{\"usePreload\": false}", + "configurationParameters": "[{\"ip-addr\": \"$.vf-module-topology.vf-module-parameters.param[16].value\", \"oam-ip-addr\": \"$.vf-module-topology.vf-module-parameters.param[30].value\"}]" + } + } + +An example of a request constructed by the actor using the above parameters, sent to the +SO REST server: + +.. code-block:: bash + + { + "requestDetails": { + "modelInfo": { + "modelInvariantId": "2246ebc9-9b9f-42d0-a5e4-0248324fb884", + "modelType": "vfModule", + "modelName": "VlbCdsSb00..vdns..module-3", + "modelVersion": "1", + "modelCustomizationUuid": "3a74410a-6c74-4a32-94b2-71488be6da1a", + "modelVersionId": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1", + "modelCustomizationId": "3a74410a-6c74-4a32-94b2-71488be6da1a", + "modelUuid": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1", + "modelInvariantUuid": "2246ebc9-9b9f-42d0-a5e4-0248324fb884" + }, + "cloudConfiguration": { + "tenantId": "41d6d38489bd40b09ea8a6b6b852dcbd", + "lcpCloudRegionId": "RegionOne" + }, + "requestInfo": { + "instanceName": "vfModuleName", + "source": "POLICY", + "suppressRollback": false, + "requestorId": "policy" + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34", + "modelInfo": { + "modelInvariantId": "6418bb39-61e1-45fc-a36b-3f211bb846c7", + "modelType": "service", + "modelName": "vLB_CDS_SB00_02", + "modelVersion": "1.0", + "modelVersionId": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51", + "modelUuid": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51", + "modelInvariantUuid": "6418bb39-61e1-45fc-a36b-3f211bb846c7" + } + } + }, + { + "relatedInstance": { + "instanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d", + "modelInfo": { + "modelInvariantId": "827356a9-cb60-4976-9713-c30b4f850b41", + "modelType": "vnf", + "modelName": "vLB_CDS_SB00", + "modelVersion": "1.0", + "modelCustomizationUuid": "6478f94b-0b20-4b44-afc0-94e48070586a", + "modelVersionId": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da", + "modelCustomizationId": "6478f94b-0b20-4b44-afc0-94e48070586a", + "modelUuid": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da", + "modelInvariantUuid": "827356a9-cb60-4976-9713-c30b4f850b41" + } + } + } + ], + "requestParameters": { + "usePreload": false + }, + "configurationParameters": [ + { + "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value", + "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value" + } + ] + } + } + +An example response received to the initial request, from the SO REST service: + +.. code-block:: bash + + { + "requestReferences": { + "requestId": "70f28791-c271-4cae-b090-0c2a359e26d9", + "instanceId": "68804843-18e0-41a3-8838-a6d90a035e1a", + "requestSelfLink": "http://so.onap:8080/orchestrationRequests/v7/b789e4e6-0b92-42c3-a723-1879af9c799d" + } + } + +An example URL used for the "get" (i.e., poll) request subsequently sent to SO: + +.. code-block:: bash + + GET https://so.onap:6969/orchestrationRequests/v5/70f28791-c271-4cae-b090-0c2a359e26d9 + +An example response received to the poll request, when SO has not completed the request: + +.. code-block:: bash + + { + "request": { + "requestId": "70f28791-c271-4cae-b090-0c2a359e26d9", + "startTime": "Fri, 15 May 2020 12:12:50 GMT", + "requestScope": "vfModule", + "requestType": "scaleOut", + "requestDetails": { + "modelInfo": { + "modelInvariantId": "2246ebc9-9b9f-42d0-a5e4-0248324fb884", + "modelType": "vfModule", + "modelName": "VlbCdsSb00..vdns..module-3", + "modelVersion": "1", + "modelCustomizationUuid": "3a74410a-6c74-4a32-94b2-71488be6da1a", + "modelVersionId": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1", + "modelCustomizationId": "3a74410a-6c74-4a32-94b2-71488be6da1a", + "modelUuid": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1", + "modelInvariantUuid": "2246ebc9-9b9f-42d0-a5e4-0248324fb884" + }, + "requestInfo": { + "source": "POLICY", + "instanceName": "vfModuleName", + "suppressRollback": false, + "requestorId": "policy" + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34", + "modelInfo": { + "modelInvariantId": "6418bb39-61e1-45fc-a36b-3f211bb846c7", + "modelType": "service", + "modelName": "vLB_CDS_SB00_02", + "modelVersion": "1.0", + "modelVersionId": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51", + "modelUuid": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51", + "modelInvariantUuid": "6418bb39-61e1-45fc-a36b-3f211bb846c7" + } + } + }, + { + "relatedInstance": { + "instanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d", + "modelInfo": { + "modelInvariantId": "827356a9-cb60-4976-9713-c30b4f850b41", + "modelType": "vnf", + "modelName": "vLB_CDS_SB00", + "modelVersion": "1.0", + "modelCustomizationUuid": "6478f94b-0b20-4b44-afc0-94e48070586a", + "modelVersionId": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da", + "modelCustomizationId": "6478f94b-0b20-4b44-afc0-94e48070586a", + "modelUuid": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da", + "modelInvariantUuid": "827356a9-cb60-4976-9713-c30b4f850b41" + } + } + } + ], + "cloudConfiguration": { + "tenantId": "41d6d38489bd40b09ea8a6b6b852dcbd", + "tenantName": "Integration-SB-00", + "cloudOwner": "CloudOwner", + "lcpCloudRegionId": "RegionOne" + }, + "requestParameters": { + "usePreload": false + }, + "configurationParameters": [ + { + "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value", + "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value" + } + ] + }, + "instanceReferences": { + "serviceInstanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34", + "vnfInstanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d", + "vfModuleInstanceId": "68804843-18e0-41a3-8838-a6d90a035e1a", + "vfModuleInstanceName": "vfModuleName" + }, + "requestStatus": { + "requestState": "IN_PROGRESS", + "statusMessage": "FLOW STATUS: Execution of ActivateVfModuleBB has completed successfully, next invoking ConfigurationScaleOutBB (Execution Path progress: BBs completed = 4; BBs remaining = 2). TASK INFORMATION: Last task executed: Call SDNC RESOURCE STATUS: The vf module was found to already exist, thus no new vf module was created in the cloud via this request", + "percentProgress": 68, + "timestamp": "Fri, 15 May 2020 12:13:41 GMT" + } + } + } + +An example response received to the poll request, when SO has completed the request: + +.. code-block:: bash + + { + "request": { + "requestId": "70f28791-c271-4cae-b090-0c2a359e26d9", + "startTime": "Fri, 15 May 2020 12:12:50 GMT", + "finishTime": "Fri, 15 May 2020 12:14:21 GMT", + "requestScope": "vfModule", + "requestType": "scaleOut", + "requestDetails": { + "modelInfo": { + "modelInvariantId": "2246ebc9-9b9f-42d0-a5e4-0248324fb884", + "modelType": "vfModule", + "modelName": "VlbCdsSb00..vdns..module-3", + "modelVersion": "1", + "modelCustomizationUuid": "3a74410a-6c74-4a32-94b2-71488be6da1a", + "modelVersionId": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1", + "modelCustomizationId": "3a74410a-6c74-4a32-94b2-71488be6da1a", + "modelUuid": "1f94cedb-f656-4ddb-9f55-60ba1fc7d4b1", + "modelInvariantUuid": "2246ebc9-9b9f-42d0-a5e4-0248324fb884" + }, + "requestInfo": { + "source": "POLICY", + "instanceName": "vfModuleName", + "suppressRollback": false, + "requestorId": "policy" + }, + "relatedInstanceList": [ + { + "relatedInstance": { + "instanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34", + "modelInfo": { + "modelInvariantId": "6418bb39-61e1-45fc-a36b-3f211bb846c7", + "modelType": "service", + "modelName": "vLB_CDS_SB00_02", + "modelVersion": "1.0", + "modelVersionId": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51", + "modelUuid": "d01d9dec-afb6-4a53-bd9e-2eb10ca07a51", + "modelInvariantUuid": "6418bb39-61e1-45fc-a36b-3f211bb846c7" + } + } + }, + { + "relatedInstance": { + "instanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d", + "modelInfo": { + "modelInvariantId": "827356a9-cb60-4976-9713-c30b4f850b41", + "modelType": "vnf", + "modelName": "vLB_CDS_SB00", + "modelVersion": "1.0", + "modelCustomizationUuid": "6478f94b-0b20-4b44-afc0-94e48070586a", + "modelVersionId": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da", + "modelCustomizationId": "6478f94b-0b20-4b44-afc0-94e48070586a", + "modelUuid": "ca3c4797-0cdd-4797-8bec-9a3ce78ac4da", + "modelInvariantUuid": "827356a9-cb60-4976-9713-c30b4f850b41" + } + } + } + ], + "cloudConfiguration": { + "tenantId": "41d6d38489bd40b09ea8a6b6b852dcbd", + "tenantName": "Integration-SB-00", + "cloudOwner": "CloudOwner", + "lcpCloudRegionId": "RegionOne" + }, + "requestParameters": { + "usePreload": false + }, + "configurationParameters": [ + { + "ip-addr": "$.vf-module-topology.vf-module-parameters.param[16].value", + "oam-ip-addr": "$.vf-module-topology.vf-module-parameters.param[30].value" + } + ] + }, + "instanceReferences": { + "serviceInstanceId": "c14e61b5-1ee6-4925-b4a9-b9c8dbfe3f34", + "vnfInstanceId": "6636c4d5-f608-4376-b6d8-7977e98cb16d", + "vfModuleInstanceId": "68804843-18e0-41a3-8838-a6d90a035e1a", + "vfModuleInstanceName": "vfModuleName" + }, + "requestStatus": { + "requestState": "COMPLETE", + "statusMessage": "STATUS: ALaCarte-VfModule-scaleOut request was executed correctly. FLOW STATUS: Successfully completed all Building Blocks RESOURCE STATUS: The vf module was found to already exist, thus no new vf module was created in the cloud via this request", + "percentProgress": 100, + "timestamp": "Fri, 15 May 2020 12:14:21 GMT" + } + } + } + + +Configuration of the SO Actor +############################### + +The following table specifies the fields that should be provided to configure the SO +actor. + +=============================== ==================== ================================================================== +Field name type Description +=============================== ==================== ================================================================== +clientName string Name of the HTTP client to use to send the request to the + SO REST server. +timeoutSec integer (optional) Maximum time, in seconds, to wait for a response to be received + from the REST server. Defaults to 90s. +path string URI appended to the URL. This field only applies to individual + operations; it does not apply at the actor level. Note: the + *path* should not include a leading or trailing slash. +maxGets integer (optional) Maximum number of get/poll requests to make to determine the + final outcome of the request. Defaults to 20. +waitSecGet integer (optional) Time, in seconds, to wait between issuing "get" requests. + Defaults to 20s. +pathGet string (optional) Path to use when polling (i.e., issuing "get" requests). + Note: this should include a trailing slash, but no leading + slash. +=============================== ==================== ================================================================== -This is a place-holder for the actor documentation. +The individual operations are configured using these same field names. However, all +of them, except the *path*, are optional, as they inherit their values from the +corresponding actor-level fields. diff --git a/docs/development/actors/vfc/vfc.rst b/docs/development/actors/vfc/vfc.rst index c99c9340..e7d8d3e7 100644 --- a/docs/development/actors/vfc/vfc.rst +++ b/docs/development/actors/vfc/vfc.rst @@ -2,14 +2,168 @@ .. Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 -################# +.. _vfc-label: + +########## VFC Actor -################# +########## .. contents:: :depth: 3 Overview of VFC Actor -############################# +###################### +ONAP Policy Framework enables VFC as one of the supported actors. + +.. note:: +There has not been any support given to the Policy Framework project for the VFC Actor +in several releases. Thus, the code and information provided is to the best of the +knowledge of the team. If there are any questions or problems, please consult the VFC +Project to help provide guidance. + +VFC uses a REST-based +interface. However, as requests may not complete right away, a REST-based polling +interface is used to check the status of the request. The *jobId* is extracted +from each response and is appended to the *pathGet* configuration parameter to +generate the URL used to poll for completion. + +Each operation supported by the actor is associated with its own java class, which is +responsible for populating the request structure appropriately and sending the request. +The operation-specific classes are all derived from the *VfcOperation* class, which is, +itself, derived from *HttpOperation*. The following operations are currently supported: + +- Restart + + +Request +####### + +A number of nested structures are populated within the request. Several of them are +populated from items found within the A&AI "enrichment" data provided by DCAE with +the ONSET event. The following table lists the contents of some of the fields that +appear within these structures. + ++----------------------------------+---------+----------------------------------------------------------------------+ +| Field Name | Type | Description | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| top level: | | | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *requestId* | string | Inserted by Policy. Maps to the UUID sent by DCAE i.e. the ID | +| | | used throughout the closed loop lifecycle to identify a request. | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *nsInstanceId* | string | Set by Policy, using the | +| | | "service-instance.service-instance-id" property | +| | | found within the enrichment data. | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| healVnfData: | | | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *cause* | string | Set by Policy to the name of the operation. | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *vnfInstanceId* | string | Set by Policy, using the | +| | | "generic-vnf.vnf-id" property | +| | | found within the enrichment data. | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| additionalParams: | | | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *action* | | Set by Policy to the name of the operation. | ++----------------------------------+---------+----------------------------------------------------------------------+ ++----------------------------------+---------+----------------------------------------------------------------------+ +| actionvminfo: | | | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *vmid* | string | Set by Policy, using the | +| | | "vserver.vserver-id" property | +| | | found within the enrichment data. | ++----------------------------------+---------+----------------------------------------------------------------------+ +| *vmname* | string | Set by Policy, using the | +| | | "vserver.vserver-name" property | +| | | found within the enrichment data. | ++----------------------------------+---------+----------------------------------------------------------------------+ + + +Examples +######## + +Suppose the *ControlLoopOperationParams* were populated as follows: + +.. code-block:: bash + + { + TBD + } + +An example of a request constructed by the actor using the above parameters, sent to the +VFC REST server: + +.. code-block:: bash + + { + TBD + } + +An example response received to the initial request, from the VFC REST service: + +.. code-block:: bash + + { + TBD + } + +An example URL used for the "get" (i.e., poll) request subsequently sent to VFC: + +.. code-block:: bash + + TBD + +An example response received to the poll request, when VFC has not completed the request: + +.. code-block:: bash + + { + TBD + } + +An example response received to the poll request, when VFC has completed the request: + +.. code-block:: bash + + { + TBD + } + + +Configuration of the VFC Actor +############################### + +The following table specifies the fields that should be provided to configure the VFC +actor. + +=============================== ==================== ================================================================== +Field name type Description +=============================== ==================== ================================================================== +clientName string Name of the HTTP client to use to send the request to the + VFC REST server. +timeoutSec integer (optional) Maximum time, in seconds, to wait for a response to be received + from the REST server. Defaults to 90s. +=============================== ==================== ================================================================== + +The individual operations are configured using these same field names. However, all +of them are optional, as they inherit their values from the +corresponding actor-level fields. The following additional fields are specified at +the individual operation level. -This is a place-holder for the actor documentation. +=============================== ==================== =================================================================== +Field name type Description +=============================== ==================== =================================================================== +path string URI appended to the URL. Note: this + should not include a leading or trailing slash. +maxGets integer (optional) Maximum number of get/poll requests to make to determine the + final outcome of the request. Defaults to 0 (i.e., no polling). +waitSecGet integer Time, in seconds, to wait between issuing "get" requests. + Defaults to 20s. +pathGet string Path to use when polling (i.e., issuing "get" requests). + Note: this should include a trailing slash, but no leading + slash. +=============================== ==================== =================================================================== diff --git a/docs/development/devtools/distribution-s3p.rst b/docs/development/devtools/distribution-s3p.rst index f448690b..093e28c0 100644 --- a/docs/development/devtools/distribution-s3p.rst +++ b/docs/development/devtools/distribution-s3p.rst @@ -270,3 +270,63 @@ Stability test plan was triggered for 72 hours. .. image:: images/distribution-summary-report.png .. image:: images/distribution-results-tree.png + +Performance Test of Policy Distribution ++++++++++++++++++++++++++++++++++++++++ + +Introduction +------------ + +Performance test of distribution has the goal of testing the min/avg/max processing time and +rest call throughput for all the requests when the number of requests are large enough to saturate +the resource and find the bottleneck. +It also tests that distribution can handle multiple policy csar's and that these are deployed within 30 seconds consistently. + +Setup Details +------------- + +The performance test is based on the same setup as the distribution stability tests. + +Test Plan +--------- + +Performance test plan is different from the stability test plan. +Instead of handling one policy csar at a time, multiple csar's are deployed within the watched folder at the exact same time. +We then expect all policies from these csar's to be deployed within 30 seconds. +Alongside these, there are multithreaded tests running towards the healtchcheck and statistics endpoints of the distribution service. + +Run Test +-------- + +Copy the performance test plans folder onto VM2. +Edit the /tmp/ folder permissions to allow the Testplan to insert the CSAR into the /tmp/policydistribution/distributionmount/ folder. + +.. code-block:: bash + + $ sudo chmod a+trwx /tmp + +From the apache jMeter folder run the test, pointing it towards the stabiltiy.jmx file inside the testplans folder + +.. code-block:: bash + + $ ./bin/jmeter -n -t /home/rossc/testplans/performance.jmx -Jduration=259200 -l testresults.jtl + +Test Results +------------ + +**Summary** + +Performance test plan was triggered for 4 hours. + +**Test Statistics** + +======================= ================= ================== ================================== +**Total # of requests** **Success %** **Error %** **Average time taken per request** +======================= ================= ================== ================================== +239819 100 % 0 % 100 ms +======================= ================= ================== ================================== + +**JMeter Screenshot** + +.. image:: images/distribution-performance-summary-report.png +.. image:: images/distribution-performance-api-report.png diff --git a/docs/development/devtools/images/distribution-performance-api-report.png b/docs/development/devtools/images/distribution-performance-api-report.png Binary files differnew file mode 100644 index 00000000..12102718 --- /dev/null +++ b/docs/development/devtools/images/distribution-performance-api-report.png diff --git a/docs/development/devtools/images/distribution-performance-summary-report.png b/docs/development/devtools/images/distribution-performance-summary-report.png Binary files differnew file mode 100644 index 00000000..3cea8e99 --- /dev/null +++ b/docs/development/devtools/images/distribution-performance-summary-report.png |