summaryrefslogtreecommitdiffstats
path: root/docs/Chapter8.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/Chapter8.rst')
-rw-r--r--docs/Chapter8.rst210
1 files changed, 1 insertions, 209 deletions
diff --git a/docs/Chapter8.rst b/docs/Chapter8.rst
index eeb2b0c..4ce9895 100644
--- a/docs/Chapter8.rst
+++ b/docs/Chapter8.rst
@@ -548,215 +548,7 @@ Table C8. Required Fields for Amount
| Type of User | Describes the types of users of the functionality offered by the software (e.g., authorized, named). This field is included when Limit Type is user. | String | Optional |
+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-------------+
-
-d. – Ansible Server Specification
-=============================================
-
-This section outlines the specifications for an ONAP compliant Ansible
-Server that can optionally be provided by the VNF Vendor. The Ansible
-Server will be used as a repository to store Ansible playbooks as well
-as an execution engine which upon a REST API request, will execute
-Ansible playbook against VNFs.
-
-Table D1. Ansible Server Requirements
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| **Principle** | **Description** | **Type** | **ID #** |
-+==============================================+==============================================================================================================================================================================================================================================================================================================================================================================+============+============+
-| Ansible Server Scope | The Ansible Server is required to support storage and execution of playbooks that are in yaml format or a collection of playbooks compressed and uploaded in tar-ball format. | Must | D1000 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | The Ansible Server must accept requests for execution of playbooks via a REST interface. The scope of each request will involve exactly one action and will request execution of one playbook. | Must | D1010 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | The playbook executed by the Ansible Server will be responsible for execution of the entire action against the VNF (e.g., calling other playbooks, running tasks on multiple VMs in the VNF) and return back the status of the action as well as any necessary output in its entirety after the action is finished. | Must | D1020 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | The Ansible Server must support simultaneous execution of multiple playbooks against different VNFs in parallel (i.e., process multiple requests). | Must | D1030 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | The Ansible Server will be loaded with all necessary credentials to invoke playbooks against target VNF(s). | Must | D1040 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| Ansible Server/ONAP Interface | Load Playbook\ **:** The Ansible Server must expose an authenticated interface to allow loading all necessary playbooks for a target VNF. It should impose an identification mechanism that allows each playbook to be uniquely identified. | Must | D1050 |
-| | | | |
-| | - It is recommended that the load Playbook API be a REST API. | | |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | Request API: The Ansible Server must expose a REST endpoint that accepts a POST message to request execution of the playbook. The POST request must be a JSON block as outlined in Table D2. | Must | D1060 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | When the Ansible server accepts an authenticated request to execute a playbook, it is required to send back an initial response indicating whether the request is accepted or rejected. The response must be a JSON Object with the key value pairs as described in Table D3. | Must | D1070 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | Result API: If the Ansible Server accepts a request to execute a playbook, it must make available status of the execution of the playbook at a Results REST endpoint indexed by the Id in the request in the form <url>?Id=<RequestId>&Type=GetResult where <url> is the URL used for submitting requests. | Must | D1080 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | When a GET is invoked against the Results REST endpoint, the Ansible Server must reply with an appropriate response: | Must | D1090 |
-| | | | |
-| | - If the Endpoint is invalid (no request, or request expired), reply with a standard HTTP 404 error. | | |
-| | | | |
-| | - If the playbook execution is still ongoing, then the Ansible Server is required to block on the GET request till the execution finishes or terminates. | | |
-| | | | |
-| | - Upon completion of execution, the Ansible Server is required to respond to the GET request with the result of the playbook execution in the form of a JSON message as outlined in the Table D4. | | |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| | The dictionary associated with the ‘Results’ key in the Result Response must be a key-value pair where each key corresponds to an entry in the NodeList and the value is a dictionary with the format as outlined in Table D5. | Must | D1100 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| Ansible Server Actions | The Ansible Server must take the following actions when triggered by a request to execute a playbook: | Must | D1110 |
-| | | | |
-| | - Determine if the request is valid, and if so, must send back an initial response message accepting the request. | | |
-| | | | |
-| | - If the request contains a “FileParameters” key that is not NULL, create all the necessary files. | | |
-| | | | |
-| | - Invoke the ansible playbook while providing it all appropriate parameters listed in EnvParameters and inventory information listed in NodeList. The playbook will be responsible for execution of all necessary steps required by the VNF action. | | |
-| | | | |
-| | - If the playbook finishes, use the PLAY\_RECAP functionality to determine whether playbook finished successfully on each endpoint identified in the NodeList. | | |
-| | | | |
-| | - If the playbook finishes, collect any output returned by the playbook. A playbook conforming to the ONAP vendor requirements document will write out any necessary output to a file named ‘<hostname>\_results.txt’ in the working directory, where ‘hostname’ is an element of the NodeList where the playbook is being executed. | | |
-| | | | |
-| | - If the playbook execution exceeds the Timeout value, the playbook execution process is terminated and ansible log that captures the last task executed is stored. | | |
-| | | | |
-| | - Make results available on the Results REST Endpoint as documented in Table D3. | | |
-| | | | |
-| | - If Callback url was provided in initial request, post the final response message on the Callback URL along with an additional key additional key “Id “: which corresponds to the request Id sent in the request. | | |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| Ansible Server Result Storage Requirements | The Ansible Server must cache and provide results of an execution as well as retain logs for debugging purposes as outlined below: | Must | D1120 |
-| | | | |
-| | - The results from a playbook execution result must be retained by the Ansible Server and made available through the respective REST endpoint for a duration that is configurable. | | |
-| | | | |
-| | - Recommended duration is 2 x Timeout. | | |
-| | | | |
-| | - The log from a playbook must be stored by the Ansible Server, tagged with the Id along with all other parameters in the initial request in a format that allows for examination for debugging purposes. | | |
-| | | | |
-| | - The results from playbook execution and log files shall be removed after a configurable defined retention period for this type of file. | | |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-| Ansible Server Locking Mechanism | The Ansible Server shall lock VNF while running playbooks that require exclusive use of a VNF (Configure is an example) and not accept requests to run other playbooks or queue those requests until playbook that requires exclusivity completes | Must | D1130 |
-+----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+------------+
-
-Table D2. Request Message
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| **Key** | **Description** | **Type** | **Comment** |
-+===================+=========================================================================================================================================================================================================================================================================================================================================================+=============+====================================================================================================================================+
-| Id | A unique string that identifies this request. For e.g., a UUID | Mandatory | NOT NULL |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| PlaybookName | A string which contains the name of the playbook to execute. | Mandatory | NOT NULL |
-| | | | |
-| | Example: memthres.yaml | | |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| Action | Name of action | Optional | |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| NodeList | List of endpoints of the VNF against which the playbook should be executed. | Optional | If not specified, playbook executed within Ansible Server (localhost) |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| Timeout | Time the Ansible Server should wait (in seconds), before terminating playbook execution. The Ansible Server will apply the timeout for the entire playbook execution (i.e., independent of number of endpoints against which the playbook is executing). If playbook execution time exceeds the timeout value, the server will terminate the process. | Optional | If not specified, Ansible server will use internal default value (configurable) |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| LocalParameters | A JSON dictionary that can be used to provide key value pairs that are specific to each individual VNF/VM instance. Key must be endpoint FQDN and value a JSON dictionary with key-value pairs for the playbook run associated with that host/group. | Optional | |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| EnvParameters | A JSON dictionary that can be used to specify key value pairs passed at run time to the playbook that are common across all hosts against which the playbook will run. | Optional | |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| CallbackUrl | A callback URL that Ansible Server can POST results to once playbook finishes execution or is terminated. | Optional | If present, Ansible Server is required to POST response back on the Callback URL |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-| FileParameters | A dictionary where keys correspond to file names to be generated and values correspond to contents of files. | Optional | If present, Ansible Server will first process this and write out contents to appropriate files and then process other parameters |
-+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------------------------------------+
-
-Table D3. Initial Response Message
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-+--------------------+------------------------------------------------------------------------------------------+-------------+---------------+
-| **Key** | **Description** | **Type** | **Comment** |
-+====================+==========================================================================================+=============+===============+
-| StatusCode | An integer indicating status of the request. It MUST take one of the following values: | Mandatory | |
-| | | | |
-| | 100 if request is accepted | | |
-| | | | |
-| | 101 if request is rejected | | |
-+--------------------+------------------------------------------------------------------------------------------+-------------+---------------+
-| StatusMessage | A string describing Server’s response | Mandatory | |
-| | | | |
-| | It MUST be set to ‘PENDING’ if StatusCode=100 | | |
-| | | | |
-| | It MUST be set to appropriate error exception message if StatusCode=101 | | |
-+--------------------+------------------------------------------------------------------------------------------+-------------+---------------+
-| ExpectedDuration | Time the server expects (in seconds) to finish the playbook execution. | Optional | |
-+--------------------+------------------------------------------------------------------------------------------+-------------+---------------+
-
-Table D4. Final Response Message
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-+-----------------+-------------------------------------------------------------------------------------------------------+-------------+------------------------+
-| **Key** | **Description** | **Type** | **Comment** |
-+=================+=======================================================================================================+=============+========================+
-| StatusCode | 200 if Execution finished normally | Mandatory | |
-| | | | |
-| | 500 otherwise. | | |
-+-----------------+-------------------------------------------------------------------------------------------------------+-------------+------------------------+
-| StatusMessage | A string which be set to either of the TWO values: | Mandatory | |
-| | | | |
-| | - ‘FINISHED’ if StatusCode=200 | | |
-| | | | |
-| | - Appropriate error exception message if StatusCode=500 | | |
-+-----------------+-------------------------------------------------------------------------------------------------------+-------------+------------------------+
-| Duration | Time it took for execution to finish (in seconds). | Optional | |
-+-----------------+-------------------------------------------------------------------------------------------------------+-------------+------------------------+
-| Result | A JSON dictionary that lists the status of playbook execution for each VM (or VNF) in the NodeList. | Optional | Not present if empty |
-+-----------------+-------------------------------------------------------------------------------------------------------+-------------+------------------------+
-
-Table D5. Result Block Format
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-+-----------------+----------------------------------------------------------+-------------+------------------------+
-| **Key** | **Description** | **Type** | **Comment** |
-+=================+==========================================================+=============+========================+
-| GroupName | Group under which the VM (or VNF) falls in a playbook. | Optional | |
-+-----------------+----------------------------------------------------------+-------------+------------------------+
-| StatusCode | A string which must have the following values: | Mandatory | |
-| | | | |
-| | - 200 if SUCCESS | | |
-| | | | |
-| | - 500 otherwise | | |
-+-----------------+----------------------------------------------------------+-------------+------------------------+
-| StatusMessage | An integer with the following values: | Mandatory | |
-| | | | |
-| | - ‘SUCCESS’ if StatusCode=200 | | |
-| | | | |
-| | - Error exception message otherwise | | |
-+-----------------+----------------------------------------------------------+-------------+------------------------+
-| Output | Any output the playbook is required to return. | Optional | Not present if empty |
-+-----------------+----------------------------------------------------------+-------------+------------------------+
-
-Some illustrative examples are shown below:
-
-1. An example POST for requesting execution of a Playbook :
-
- {"Id": "10", “Action”:”HealthCheck”, "PlaybookName":
- "ansible\_getresource.yml", "NodeList":
- ["interface1.vnf\_b.onap.com", ["interface2.vnf\_b.onap.com"],
- "Timeout": 60, "EnvParameters": {"Retry": 3, "Wait": 5}}
-
-2. Potential examples of Ansible Server initial response.
-
- a. Successfully accepted request: {"StatusCode": "100",
- "ExpectedDuration": "60sec", "StatusMessage": "PENDING"}
-
- b. Request rejected: {"StatusCode": "101", "StatusMessage": "PLAYBOOK
- NOT FOUND "}
-
-3. Potential examples of final response by Ansible Server to a GET on
-
- a. Playbook successful execution: {"Duration": "4.864815sec",
- “StatusCode”: 200, “StatusMessage”:”FINISHED”, "Results":
- {"interface\_1.vnf\_b.onap.com": {"StatusCode": "200",
- "GroupName": "vnf-x-oam", "StatusMessage": "SUCCESS",
- “Output”:{“CPU”:30, “Memory”:”5Gb”},
- "interface\_1.vnf\_b.onap.com": {"StatusCode": "200", "GroupName":
- "vnf-x-oam", "StatusMessage": "SUCCESS", “Output”:{“CPU”:60,
- “Memory”:”10Gb”}}}
-
- b. Playbook failed execution on one of the hosts: {"Duration":
- "10.8sec", “StatusCode”: 200, “StatusMessage”:”FINISHED”,
- "Results": {"interface\_1.vnf\_b.onap.com": {"StatusCode": "500",
- "GroupName": "vnf-x-oam", "StatusMessage": "Error executing
- command ", "interface\_1.vnf\_b.onap.com": {"StatusCode": "200",
- "GroupName": "vnf-x-oam", "StatusMessage": "SUCCESS",
- “Output”:{“CPU”:60, “Memory”:”10Gb”}}}
-
- c. Playbook terminated: {"Duration": "61 sec", “StatusCode”: 500,
- “StatusMessage”:”TERMINATED” }
-
-e. – Requirement List
+d. – Requirement List
==================================
R-11200: The VNF MUST keep the scope of a Cinder volume module, when it exists, to be 1:1 with the VNF Base Module or Incremental Module.