Skip to end of metadata
Go to start of metadata

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

Compare with Current View Version History

« Previous Version 5 Next »

Table of Contents


Background

xNF vendors are obliged to provide a number of artifacts, which are used in the operations of the xNFs.
Nokia supports mainly the FM and PM use-case artifacts:

  • VES_Event_Registration (registers all VES events - including alarms/faults)
  • PM Dictionary (registers all PM counters/measurements)

In order to simplify the management of those artifacts, the following steps are proposed:

  1. We need an artifact browser - able to parse VES_EVENT_REGISTRATION, and PM_Dictionary, which shows the contents in a tabular fashion.
    The browser shall allow to real-time filter the rows, based on the "startsWith" real-time search
  2. In the second step, we need to expand that browser
    1. By integrating it with DCAE-DS (beyond the SDC scope)
    2. By adding a possibility to select an event and use it in CL configuration, with DCAE-DS

General description of GAB library

Introduction

GABController is a tool for searching inside the [Yaml](https://yaml.org/) file content. At this moment is completely independent from any ONAPs component and can be used in any case where searching full json-path format keywords is needed. To use it, two things are required from the user: yaml document and list of fields to filter the results and nothing more.

Usage

GABController is provided as a standard JAVA archive and can be imported in any application by adding its JAR name into the classpath or using maven dependency management:


	<dependency>
            <groupId>org.onap.sdc.common</groupId>
            <artifactId>onap-generic-artifact-browser-service</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
	</dependency>


The most usable class is GABServiceImpl implements GABService and expose single method for searching paths inside the [Yaml](https://yaml.org/) file.

GABService operates on 2 different types: GABQuery as an input and GABResults as an output model.

Example 1 - searching for multiple keywords

/* First You need to create GABService */
GABService gabService = new GABServiceImpl();
/* Next step is to prepare your query model.
* In this example we will use file: 
* '/root/test.yml' 
* and will search for keywords: 
* 'event.structure.commonEventHeader' and 'event.presence' 
*/
GABQuery gabQuery = new GABQuery(Arrays.asList(
"event.structure.commonEventHeader","event.presence"), "/root/test.yml", GABQueryType.PATH);
/* And at last ask for the results */
GABResults gabResults = gabService.searchFor(gabQuery);
/* And thats it. Please notice that IOException can be thrown in some cases.
* For more info please follow specification inside the JavaDocs. 
*/ 

Dependencies

Runtime

- lombok: 1.16.16 - [Doc](https://projectlombok.org/features/all)
- snakeyaml: 1.21 - [Doc](https://bitbucket.org/asomov/snakeyaml)
- gson: 2.8.5 - [Doc](https://github.com/google/gson)
- jsurfer: 1.4.3 - [Doc](https://github.com/jsurfer/JsonSurfer)
- guava: 18.0 - [Doc](https://github.com/google/guava/wiki/Release18)
- commons-io: 2.6 - [Doc](https://commons.apache.org/proper/commons-io/)

Testing

- junit: 5.4.0 - [Doc](https://junit.org/junit5/docs/current/api/)

Tests structure

Generic Artifact Browser has got two independent layers of tests:
1. Unit testing using JUnit 5 (integrated in every component)
2. Component testing using Cucumber 2.3 (component-tests module) 

All layers are currently executed during the maven build of the main project.

Dependencies

Util

- guava: 18.0 - [Doc](https://github.com/google/guava/wiki/Release18)

Testing

- junit: 5.4.0 - [Doc](https://junit.org/junit5/docs/current/api/)
- cucumber: 2.3.1 - [Doc](https://docs.cucumber.io/)


SDC BE integration

GAB is prepared as an independent library used for simple searching inside the yaml-file content. SDC exposes dedicated endpoint providing GABs base functionality over ONAP internal artifacts-data. Below you can find screenshot from the SDC swagger page, describing the SDC endpoint for searching for a json paths inside the yaml file

ParentId and artifactUniqueId properties are needed to download artifact data from the Cassandra DAO. Content of the artifact is scanned for wanted fields and parsed to JSON response - friendly for UI representations:

{
	"data": [{
			"path1": "value1",
			"path2": "value2"
		},
		{
			"path1": "value3",
			"path2": "value4"
		}
	]
}


SDC FE integration

SDC's VF screen of Deployment Artifacts is extended to show also a button in shape of magnifier icon. Currently magnifier-button should be available for limited kinds of artifacts (at the moment only VES_EVENTS is supported), but there are also plans to handle other types of artifacts in next releases. 


On a magnifier-button click, a dialog with populated data should appear. It is important to know that even GAB back-end services provides possibility to ask for whatever-fields with only one restriction about correct format (json paths) - for Dublin release only few predefined columns are considered to be shown by the GUI dialog: event.action[2], event.comment and event.faultFields.alarmAdditionalInformation.keyValuePair[ structure.key.value==faultId].comment.



More info



  • No labels