Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

First version which outputs a claim

Pre-release
Pre-release
Compare
Choose a tag to compare
@ryandgoulding ryandgoulding released this 10 Nov 16:11
Populate claim data

This patch populates all claim data except for lshw characteristics, which is
tracked separately by CTONET-528.  This fulfills the definition of done
requirements for CTONET-580.

In order to make this change, some heavier architectural decisions were made.
First, it was made explicit (in CONTRIBUTING.md) that configuration must be
provided with working MarshalJSON and UnmarshalJSON interfaces (whether they
are purely inherited or custom if needed).  The reason is a claim is defined
using JSON, and to make the test session repeatable, the configuration must be
included in the claim.

To keep track of the different configurations available, a lightweight
singleton pool is abstracted called `Pool`.  Different configurations must
register with the Pool so they are included in the Claim.  Information for
registering with the Pool is included in Contributing.md.

Version information is currently in pre-release, but eventually should be
populated by a build system.  For now, a "version.json" was abstracted to allow
developers to bump the version, so it may be included in the claim file.  Simply
rev the version with a commit, then tag a release.

Changes were 100% unit tested.  The generated claim.json file was tested for
compliance with test-network-function-claim's claim-schema.json (v0.0.4).

Signed-off-by: Ryan Goulding <rgouldin@redhat.com>