onboarding

Last updated: 2024-11-21 22:06:03.286178 File source: link on GitLab

onboarding

Table of Contents

Specification

Description

This file explains the onboarding functionality of Device Management Service (DMS). This functionality is catered towards compute providers who wish provide their hardware resources to Nunet for running computational tasks as well as developers who are contributing to platform development.

Structure and Organisation

Here is quick overview of the contents of this directory:

  • README: Current file which is aimed towards developers who wish to modify the onboarding functionality and build on top of it.

  • handler: This is main file where the code for onboarding functionality exists.

  • addresses: This file houses functions to generate Cardano wallet addresses along with its private key.

  • addresses_test: This file houses functions to test the address generation functions defined in addresses.

  • available_resources: This file houses functions to get the total capacity of the machine being onboarded.

  • init: This files initializes the loggers associated with onboarding package.

Class Diagram

The class diagram for the onboarding package is shown below.

Source file

onboarding Class Diagram

Rendered from source file

!$rootUrlGitlab = "https://gitlab.com/nunet/device-management-service/-/raw/main"
!$packageRelativePath = "/dms/onboarding"
!$packageUrlGitlab = $rootUrlGitlab + $packageRelativePath
 
!include $packageUrlGitlab/specs/class_diagram.puml

Functionality

Onboard

  • signature: Onboard(ctx context.Context, config types.OnboardingConfig) error

  • input #1: Context object

  • input #2: types.OnboardingConfig

  • output (error): Error message

Onboard function executes the onboarding process for a compute provider based on the configuration provided.

Offboard

  • signature: Offboard(ctx context.Context, force bool) error

  • input #1: Context object

  • input #2: force parameter

  • output: None

  • output (error): Error message

Offboard removes the resources onboarded to Nunet. If the force parameter is True, then offboarding process will continue even in the presence of errors.

IsOnboarded

  • signature: IsOnboarded(ctx context.Context) (bool, error)

  • input #1: Context object

  • output #1: bool

  • output #2: error

IsOnboarded checks if the compute provider is onboarded.

Info

  • signature: Info(ctx context.Context) (types.OnboardingConfig, error)

  • input #1: Context object

  • output #1: types.OnboardingConfig

  • output #2: error

Info returns the configuration of the onboarding process.

Data Types

  • types.OnboardingConfig: Holds the configuration for onboarding a compute provider.

Testing

Proposed Functionality / Requirements

List of issues

All issues that are related to the implementation of dms package can be found below. These include any proposals for modifications to the package or new functionality needed to cover the requirements of other packages.

References

Last updated