Skip to content

eclipse-ecsp/device-activation

Device Activation

Maven Build & Sonar Analysis Quality Gate Status Vulnerabilities License Compliance Latest Release

Device Activation Component provides restful services for activating and reactivating devices like Dongle, HU, TCU and Dashcam; so that these devices can send data to the cloud post activation/reactivation.

Table of Contents

Getting Started

To build the project in the local working directory after the project has been cloned/forked, run:

mvn clean install

from the command line interface.

Prerequisites

The list of tools required to build and run the project:

  • Java 17
  • Maven

Installation

Install Java 17

How to set up Maven

Coding style check configuration

checkstyle.xml is the coding standard to follow while writing new/updating existing code.

Checkstyle plugin maven-checkstyle-plugin:3.2.1 is integrated in pom.xml which runs in the validate phase and check goal of the maven lifecycle and fails the build if there are any checkstyle errors in the project.

To run checkstyle plugin explicitly, run the following command:

mvn checkstyle:check

Running the tests

To run the tests for this system run the below maven command.

mvn test

Or run a specific test

mvn test -Dtest="TheFirstUnitTest"

To run a method from within a test

mvn test -Dtest="TheSecondUnitTest#whenTestCase2_thenPrintTest2_1"

Deployment

  1. The component can be deployed as a Kubernetes pod by installing Device Activation charts. Link: Charts

  2. Postgres DB needs to be installed and ignite database/schema should be created with the required tables. Link of the database and table scripts to be installed: dmpostgres.sql

  3. Detailed information about the request and response can be found in API docs Device Activation APIs.

Architecture

Sequence diagram of Device Activation:

Usage

Device Activation microservice can be used to activate and reactivate devices like Dongle, HU, TCU and Dashcam; so that these devices can send data to the cloud post activation/reactivation. Devices are activated and maintained in PostgreSQL DB with the Device State as ACTIVE/PROVISION_ALIVE (when device activation is called without performing device association; usually done if end user buys device only for internet connection) and Association Status would be ASSOCIATED after performing Device Association and Device Activation. The end result of Device Activation/Reactivation is the generation of HarmanID/DeviceID and passcode which would be used by the devices to connect to the cloud.

Built With Dependencies

  • Spring - Web framework used for building the application
  • Maven - Build tool used for dependency management
  • Postgres - Postgres JDBC driver
  • Project Lombok - Auto-generates Java boilerplate code (e.g., getters, setters, builders)
  • Apache Common - Java Library
  • Jackson - Reading JSON Objects
  • MChange - JDBC3 Connection and Statement Pooling library
  • Logback - Concrete logging implementation used with SLF4J
  • slf4j - Logging facade providing abstraction for various logging frameworks
  • Mockito - Mocking framework for testing
  • JUnit - Unit testing framework

How to contribute

Please read CONTRIBUTING.md for details on our contribution guidelines, and the process for submitting pull requests to us.

Code of Conduct

Please read CODE_OF_CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.

Contributors

The list of contributors who participated in this project.

Security Contact Information

Please read SECURITY.md to raise any security related issues.

Support

Contact the project developers via the project's "dev" list - ecsp-dev

Troubleshooting

Please read CONTRIBUTING.md for details on how to raise an issue and submit a pull request to us.

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

Announcements

All updates to this component are present in our releases page. For the versions available, see the tags on this repository.

About

ECSP Device activation

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages