Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

In ONAP community, using ansible server to configure VNF is more popular now. As of Casablanca release, APPC has provided one single ansible server configuration functionality. In Dublin, APPC will allow multiple ansible server end points for routing life cycle command (see LCM API for more details). In order to support this new function. APPC will be enhancing in several adapators, database as well as CDT GUI. This page describes how to implement, how to use this feature, and some sample requests/response will be shown.

Design

Currently APP-C directs Life Cycle commands to one and only one ansible server. This feature will enhance APPC to allow multiple ansible server end points to be defined within APPC. This will allow APP-C to route life cycle commands to additional Ansible servers (active-active).

Database enhancement

A new table will be added for storing admin artifact:

  1. Asdc_artifacts_id <next_serial_number>
  2. Artifact_type <APPC-CONFIG>
  3. Artifact_version <0.1>
  4. Artifact_description <VNF Management Admin Artifact>
  5. Internal_version <start with 0 and increment upon new verion>
  6. Creation_date <system date and time>
  7. Artifact_name <ansible_admin_FQDN_Artifact_0.0.1V.json>
  8. Artifact_content <actual json refer to the sample below>

CDT will keep using the Design interface to retrieve and save Admin Artifact to the new table above.  Admin artifact is VNF and action agnostic.  Those attributes will have a null value as inputs of the API calls. 

  • User ID = “admin”
  • Vnf-type = null
  • Action = null


/operations/design-services:dbservice

Sample Request to Save
{
  "input": {
    "design-request": {
      "request-id":"704632839946",
      "action": "uploadArtifact",
      "payload":
          "{\"userID\": \"admin\",\"vnf-type\" : \"NULL
            \",\"action\" : \"NULL\",\"artifact-name\" :
            \"reference_AllAction_vnfc2_0.0.1V.json\",\"artifact-type\"
            : \"APPC-CONFIG\",\"artifact-version\" :
           \"0.1\",\"artifact-contents\": "<content>”
    }
  }
}


Sample request to retrieve:
{
  "input": {
    "design-request": {
      "request-id": "704632839946",
      "action": "getArtifact",
      "payload": 
          "{\"vnf-type\":\"NULL\",\"vnfc-type\":\"null\",\"protocol\":\"\",\"incart\":\"N\",\"action\":\"NULL
            \",\"artifact-name\":\"reference_AllAction_vnfc2_0.0.1V.json\",\"artifact-type\":\"APPC-CONFIG\",\"userID\":\"admin\"}"
    }
  }
}


Sample of Admin Artifact
{
  "fqdn-list": [
    {
      "vnf-management-server-fqdn": "fqdn-value1 url:port",
      "cloud-owner-list": [
        {
          "cloud-owner": "xxx3.0",
          "region-id-list": [
            {
              "region-id": "san4a",
              "tenant-id-list": [
                "tenantuuid1",
                "tenantuuid2"
              ]
            },
            {
              "region-id": "san4b",
              "tenant-id-list": [
                "tenantuuid1",
                "tenantuuid2"
              ]
            }
          ]
        },
        {
          "cloud-owner": "nc1.0",
          "region-id-list": [
            {
              "region-id": "san4a",
              "tenant-id-list": [
                "tenantuuid3",
                "tenantuuid4"
              ]
            }
          ]
        }
      ],
      "description": "fqdn for east zone vUSP Production",
      "username": "albino attuid",
      "create-date": "",
      "modify-username": "",
      "modify-date": ""
    },
    {
      "vnf-management-server-fqdn": "fqdn-value2 url:port",
      "cloud-owner-list": [
        {
          "cloud-owner": "xxx3.0",
          "region-id-list": [
            {
              "region-id": "san4a",
              "tenant-id-list": [
                "tenantuuid5",
                "tenantuuid6"
              ]
            },
            {
              "region-id": "san4b",
              "tenant-id-list": [
                "tenantuuid5",
                "tenantuuid6"
              ]
            }
          ]
        },
        {
          "cloud-owner": "nc1.0",
          "region-id-list": [
            {
              "region-id": "san4a",
              "tenant-id-list": [
                "tenantuuid7",
                "tenantuuid8"
              ]
            }
          ]
        }
      ],
      "description": "fqdn for east zone vUSP E2E",
      "username": "takacho",
      "create-date": "",
      "modify-username": "",
      "modify-date": ""
    }
  ]
}


CDT GUI enhancement

 The following table lists screen objects is for the CDT GUI. 

 

Data Fields

Required

Data Type

Field Size

Description

Configuration Server FQDN

Yes

String

 

FQDN of the Ansible server

Configuration Server Port

Yes

Integer

0 – 65535 inclusive

TCP Port of the Ansible server

Cloud-owner

Yes

String

 

Cloud-owner of the tenant ID

Cloud-Region-ID

Yes

String

 

Cloud-Region of the tenant ID

Tenant

Yes

String

 

Tenant ID that is associated with the Ansible server.  Cloud-Owner, Cloud-Region, and Tenant ID uniquely identify a tenant.

There should be at least one Tenant ID per Ansible server profile.

Description

No

String

 

This a free text field for entering information identifying the Ansible server.

Creator

Yes

String

 

Current session user ID for created the profile, source from cookie. 

Not user editable.

Date Created

Yes

Date

 

Source from system clock at time of save artifact.

Not user editable.

Modifier

Required only when modifying an existing profile

String

 

Will not be populated when profile initially created.  Required when modifying existing profile.

Not user editable.

Date Modified

Date

 

  (screen shot will come lately)

  • CDT GUI will have a new tab – “ADMIN” tab for administering configuration server profiles.


  • ADMIN main screen displays configuration server profiles.  All (Admin) users have read and write access to all server profiles. User can select columns to be sorted.  All columns are sortable.


  • CDT provides a sorting capability similar to the VNF profile screen.
    • User can select columns to be sorted by clicking on the arrow symbols next to the column headings. 
    • Repeated clicking on an arrow symbol toggles the sorting orders, ascending and descending.
    • In the sorting results, all fields for a row should be populated with the correct values.
    • All columns are sortable except Description


  • new buttons under Admin tab:
    • Create New Server button – opens the Server Data screen for adding new server profile

      Clicking the CREATE NEW SERVER button on the default screen takes the user to this Server Data to enter data for a new server profiles.

      These fields are not user editable.

      -          Creator – the user ID when the server profile was first created.  Once it is set during initial server profile creation, this value will not be changed.

      -          Date Created – date the server profile was created.  Once it is set during initial server profile creation, this value will not be changed.

      -          Modifier – Empty during initial profile creation

      -          Modified Date – Empty during initial profile creation

    • View/Edit button – opens the Server Data screen for editing the existing server profile

      The Configuration Server screen allows user to edit existing Ansible profiles.  CDT retrieves the server profile data and display on in the appropriate fields.

      These fields are not user editable.

      -          Creator – the user ID when the server profile was first created.  Once it is set during initial server profile creation, this value will not be changed.

      -          Date Created – date the server profile was created.  Once it is set during initial server profile creation, this value will not be changed.

      -          Modifier – user ID of the server profile was last modified and saved to APPC database.

      -          Modified Date – date of the server profile was last modified and saved to APPC database.

    • Download All To PC button – saves the Admin artifact to an file on the local PC
    • Save All To APPC button – save Admin artifact to APPC database in JSON format
      Save Admin Artifact in APPC Database
    • Arrow symbols next to column heading – sort the data by the specific column

Runtime enhancement

  • APPC will support saving of the Admin Artifact in the APPC Database – name the artifact as admin artifact.

  • APPC will provide a script to support the environment specific data in the device authentication table

    APPC Runtime will provide enhancement to the authentication util tool for the VNFs with the Ansible protocols  to support the maintenance of the user name and password in the device authentication table:

    1. Server FQDN <url>
    2. Port <port number>
    3. User name <for ansible access>
    4. Password <for ansible access>
    5. VNF type
    6. Protocol
    7. Action

    Validation: For the Ansible Protocol, the Server FQDN/ URL & Port shall be required along with the VNF type, Action, Protocol, User Name and Password.

    For the VNF’s with the Ansible protocol, APPC shall allow to store multiple records of a VNF type with different action using 1 FQDN as well as multiple records for a VNF type and its actions using a different FQDN.


  • APPC will enhance the Artifact Handler to support the loading, parsing, processing and saving of the Admin Artifact from CDT:

    The Admin artifact from the CDT GUI shall be stored in the DT tables like the other artifacts except that this artifact is VNF agnostic so shall not be associated with a VNF-Type.

    The Admin artifact shall also be stored in the ASDC_Artifacts tables like the other artifacts except that this artifact is VNF agnostic so shall not be associated with a VNF-Type.

    From the CDT GUI:

          "payload": "{\"userID\": \"admin\",\"vnf-type\" : NULL,\"action\" : NULL,\"artifact-name\" : \"ansible_admin_FQDN_Artifact_0.0.1V.json\",\"artifact-type\" : \"APPC-CONFIG\",\"artifact-version\" : \"0.1\",\"artifact-contents\": <content>

    APP-C will add the records to the DT_Artifacts_tracking tables (in addition to the asdc_artifacts table for the Admin Artifact):


  • APPC will do enhancement of the Generic Ansible DG orchestrator to support the following for all the LCM actions of the VNFs using the Ansible Protocol.

   For all the LCM actions of the VNF’s with the Ansible Protocol, APPC shall apply the following steps:

    1. From the A&AI queried data for the given VNF retrieve the Tenant ID
      1. In A&AI the generic vnf query:

                                          i.    The get query of A&AI has the related vserver with the uri of /cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}

                                         ii.    Extract the cloud-owner, cloud-region-id & thetenant-id from the above URI

                                        iii.    Assumptions:

          1. APPC is assuming that currently all the vserver objects for a given VNF in A&AI are the same.
          2. APPC is assuming that if the tenant-id by itself may be repeated in different cloud-owner/ cloud-region-id but the cloud-region/ cloud-region-id are unique across all environments and the combination of these 3 attributes will not have an overlap for the mapping with the Ansible server cluster’s FQDN.
    1. When the Ansible DG is invoking the logic to read the device authentication it shall apply the following steps:
      1. Using the Cloud-owner, the Cloud-region-id & the Tenant-id from the context memory, APPC will lookup these 3 attributes in the Admin Artifact.

                                          i.    If the matching the cloud-owner, cloud-region-id & Tenant-id is found, then APPC will read the vnf-management-server-fqdn

          1. Using the VNF-type, Protocol <ANSIBLE>, Action, vnf-management-server-fqdn, APPC will lookup the record in the device authentication table to find the user name and password.
            1. If record found from the device authentication table then APPC shall continue with the POST request to the Ansible Rest API call.
            2. If record was not found, then APPC will error out – “Authentication credentials not found for the vnf-management-server-fqdn for the <PROTOCOL> server for the given Tenant - <tenant-id> of the VNF instance <VNF instance name>”

                                         ii.    If the matching Tenant-id is not found, then APP-C will error out – “vnf-management-server-fqdn not found for the <PROTOCOL> server for the given Tenant - <tenant-id> of the VNF instance <VNF instance name>”

Payload example


Ref link:

    1. Ansible Playbook Examples in VNF Guide.

    2. Ansible Adaptor in APPC

  • No labels