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

Compare with Current View Page History

« Previous Version 20 Next »

Introduction

To use Automatics system, partner will be providing implementation of APIs based on specification. This document gives details on how to integrate partner implementation project to Automatics system.

Automatics Core is a maven project. So partner can add core as maven dependency to their maven project. After the development of APIs, partner can deploy the project to their maven repository by executing “mvn clean deploy”.

Quick Guide to Partner Java API Project

  • Create Maven Java Project.
  • Add Automatics Core as maven dependency so all providers are available for implementation.
  • Provide Java implementation for Providers based on API specification, refer Automatics API Specification .
  • When the implementation is completed, deploy the project to partner repository.
  • Update pom.xml of Automatics Generic Tests project with partner implementation as dependency.

Automatics Core Build Steps

  • Clone Automatics Core project from the repository (rdk/tools/automatics/automatics-core) with branch (“rdk-next”)
  • In pom.xml, update distributionManagement with artifact repository url. 

<distributionManagement>

             <repository>

                          <url></url>

            </repository>

 </distributionManagement>     

  • Execute “mvn clean deploy” on project.  This will deploy the Automatics Core project to the partner's repository.

Partner XML Configuration

Automatics Core reads partner-applicationContext.xml file residing in Partner Implementation Java Project to create instances of Provider implementation.

The diagram shows how Partner Implementation instances are generated and accessed by Automatics Core


  • Partner can inject their Provider implementation to Automatics core using Spring Dependency Injection. 
  • Automatics core expects spring configuration file partner-applicationContext.xml to be available in partner project resource folder. And, it should be available at classpath during test execution.
  • All Java API implementations to be injected should be configured in partner-applicationContext.xml.
  • partner-applicationContext.xml file contains predefined bean id with respective implementation class. All beans uses "lazy-init" set to true so that bean instance will be created on demand only. And, for beans that requires separate instance for each device, property "scope" is set to value "prototype".


Please refer Automatics Partner XML Configuration attached here while developing partner implementation.

Automatics Partner XML Configuration - partner-applicationContext.xml

Partner has to implement Provider Interfaces mentioned below and map the class in partner-applicationContext.xml

Common Providers 

Providers applicable to both RDKV and RDKB platforms.

Bean NameAutomatics Core ProviderMandatoryDescription
testInitializercom.automatics.providers.TestInitilizationProviderYesAPIs for Pre and Post Test Initialization
deviceAccessValidatorcom.automatics.providers.DeviceAccessValidatorYes

APIs for Device Validation. For eg: To verify

if device is accessible for taking for execution

deviceConnectionProvidercom.automatics.providers.connection.DeviceConnectionProviderYesAPIs for executing commands within device
deviceProvidercom.automatics.providers.rack.DeviceProvider

Yes, If REST impl is not 

provided

Both REST and Java API implementation supported.

APIs to get device details, lock devices for exclusive access during  test and release them after test etc

If Java API is preferred, then implementation class to be updated in xml file. And, property partner.impl.deviceManager=true, to be set in Automatics Properties

deviceConnectionBasedTracecom.automatics.providers.trace.AbstractTraceProviderImplNoAPIs to get trace logs from device. Connection to device will be via  DeviceConnectionProvider APIs
serialConnectionBasedTracecom.automatics.providers.trace.SerialTraceProviderNoAPIs to get trace logs from device via serial console
powerProvidercom.automatics.providers.rack.PowerProviderNo

Both REST and Java API implementation supported.

If Java API is preferred, then implementation class to be updated in xml file. And, property partner.impl.powerProvider=true, to be set in Automatics Properties

remoteProviderFactorycom.automatics.providers.rack.RemoteProviderFactoryNo

Factory class that returns instances of com.automatics.providers.rack.RemoteProvider based on remote type.

Automatics Core provides rest client handler for RemoteProvider - com.automatics.providers.rack.impl.RemoteProviderRestImpl

If partner prefers to use Rest Impl, then RemoteProviderRestImpl can be returned from RemoteProviderFactory.

imageUpgradeProviderFactorycom.automatics.providers.imageupgrade.ImageUpgradeProviderFactory

No

Factory class that returns instances of com.automatics.providers.imageupgrade.ImageUpgradeProvider based on type of image upgrade mechanism
codeDownloadProvidercom.automatics.providers.CodeDownloadProviderNoProvides APIs to get images for image upgrade
crashAnalysisProvidercom.automatics.providers.crashanalysis.CrashAnalysisProviderNoProvides APIs identify crash and get crash logs from crash portal
serialCommandExecutionProvidercom.automatics.providers.connection.SerialCommandExecutionProviderNo

Provides APIs to execute command from serial console

webpaProvidercom.automatics.providers.webpa.WebpaProviderNo

API to provide authentication data for rest based webpa

communication and api to provide device mac address.

snmpDataProvidercom.automatics.providers.snmp.SnmpDataProviderNoAPIs to provide device mac address and authentication data for snmp communication
snmpProviderFactorycom.automatics.providers.snmp.SnmpProviderFactoryNo

Factory class that generates instances of com.automatics.providers.snmp.SnmpProvider based on snmp version. 

Automatics Core provides default implementation of factory class com.automatics.snmp.impl.DefaultSnmpProviderFactoryImpl that will return com.automatics.snmp.impl.Snmpv2ProviderImpl and com.automatics.snmp.impl.Snmpv3ProviderImpl instances.

If Partner wants to provide a custom implementation of SnmpProvider, then they have to provide implementation for factory class as well and map factory class in xml file.

tr69Providercom.automatics.providers.tr69.TR69ProviderNoAPI to get TR69 param values
issueManagementProvidercom.automatics.providers.issuemanagement.IssueManagementProviderNoAPIs to get details to be included in auto generated Jira tickets during test failure.
buildAppenderProvidercom.automatics.providers.appender.BuildAppenderProviderNoBuildAppenderProvider helps to perform device configuration changes or set modes for device before test execution. They are invoked during Pre-Suite Intialization.
credentialCryptoProvidercom.automatics.providers.connection.auth.ICryptoNoAPIs to encrypt and decrypt partner data. Core provides default implementation for ssh connection. To make ssh connection to destination, credentials are required to be configured in file server-config.xml and it can kept in any location in Jenkins VM. The path of the file can be configured via property 'serverConfig.path'. Core will use this file to read credentials for ssh login.  If needed, partner can encrypt the credential and keep them securely in server-config.xml and the decryption logic can be added in partner java api. The decryption logic can be linked to Core via the provider ICrypto.

RDKV Providers

Providers applicable only to RDKV platform.

Bean NameAutomatics Core ProviderMandatoryDescription
rdkVideoDeviceProvidercom.automatics.providers.RdkVideoDeviceProviderYesAPIs for AV validation, fetching channel details etc
videoProvidercom.automatics.providers.rack.VideoProviderNoAPIs to capture images from settop video
imageCompareProvidercom.automatics.providers.rack.ImageCompareProviderNo

APIs for image compare. for eg: to verify if given image is 

displayed on current screen.

ocrServiceProvidercom.automatics.providers.ocr.OcrServiceProviderNoAPIs for OCR reading




RDK Interface Providers

WebPA Provider

To use webpa support provided by Automatics, partner needs to implement following APIs.

Provider - com.automatics.providers.webpa.WebpaProvider

Bean Name - webpaProvider

APIs in Provider

APIDescription
Map<String, String> getRequestHeaderAuthData(WebPaType methodType)

Authentication headers if any required for WebPa communication.

This invokes providing auth token in request header.

String getDeviceMacAddress(Dut dut);The mac address to be used for fetching/updating webpa params

SNMP Provider

To execute SNMP commands on device, partner needs to implement following APIs in SnmpDataProvider.

Provider - com.automatics.providers.snmp.SnmpDataProvider

Bean Name - snmpDataProvider

APIs in Provider

APIDescription
SnmpSecurityDetails getSnmpAuthorization(Dut dut, SnmpParams snmpParams)

Provides the authentication data for SNMP communication.

For SNMPv2, provide the community string. 

For SNMPv3, provide authentication and encryption methods to be

sent along with snmp command.

SnmpParams updateSnmpParams(Dut dut, SnmpParams snmpParams)

If partner needs to customize snmp params provided by Automatics

before execution, it can be done here.


TR69 Provider

To use TR69 support provided by Automatics, partner needs to implement following API in TR69Provider.

Provider - com.automatics.providers.tr69.TR69Provider

Bean Name - tr69Provider

APIs in Provider

APIDescription
List<String> getTr69ParameterValues(Dut dut, String[] parameters)Provide implementation to get TR 69 param values from ACS server
  • No labels