Skip to main content

Tools for evaluating a CSIP Aus server implementation via a virtual client

Project description

CACTUS Client

This is a set of tools for evaluating CSIP-Aus server test procedures defined at CACTUS Test Definitions.

Development

pip install -e .[dev,test]

Quickstart

Installing

CACTUS requires Python 3.12+

Install the latest version from pypi with: pip install cactus-client

To ensure it's installed properly cactus --help

Working Directory Configuration

CACTUS requires two things:

  1. A configuration file - stored either in your home directory or elsewhere (will be created below).
  2. A working directory - Where all run outputs will be stored.

Portable Installation

If you're trying to keep CACTUS to a single working directory (and want all of your CACTUS operations to run out of that working directory):

  1. Create a new empty directory (eg mkdir cactus-wd)
  2. cactus setup -l cactus-wd

Please note - all CACTUS commands will now require you to operate out of the ./cactus-wd/ directory

  1. cd cactus-wd
  2. cactus server

Global Installation

If you'd like your CACTUS commands to work from any directory (but still have the results all stored in the working directory):

  1. Create a new empty directory (eg mkdir cactus-wd)
  2. cactus setup -g cactus-wd
  3. cactus server

Client/Server Config

Setup the server connections details (dcap refers to your DeviceCapability URI)

  1. cactus server dcap https://your.server/dcap
  2. cactus server verify true

Setup your first client - You will be prompted to populate each field (like below)

  1. cactus client myclient1 You should see output like the following
Would you like to create a new client with id 'myclient1' [y/n]: y
What sort of client will this act as? [device/aggregator]: device
File path to PEM encoded client certificate: ./testdevice.crt
File path to PEM encoded client key: ./testdevice.key.decrypt
Auto calculate lfdi/sfdi from certificate? [y/n]: y
lfdi=0F3078CFDDAEE28DC20B95635DC116CC2A6D877F
sfdi=40773583337
Client Private Enterprise Number (PEN) (used for mrid generation): 12345
Client PIN (used for matching EndDevice.Registration): 111115
The DERSetting.setMaxW and DERCapability.rtgMaxW value to use (in Watts): 5000
.cactus.yaml has been updated with a new client.
                         myclient1                                                  
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ key              ┃ value                                         ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ type             │ device                                        │
│ certificate_file │ ./testdevice.crt                              │
│ key_file         │ ./testdevice.key.decrypt                      │
│ lfdi             │ 0F3078CFDDAEE28DC20B95635DC116CC2A6D877F      │
│ sfdi             │ 40773583337                                   │
│ max_watts        │ 5000                                          │
│ pen              │ 12345                                         │
│ pin              │ 111115                                        │
└──────────────────┴───────────────────────────────────────────────┘

Discovering available tests

The command cactus tests will print out all available test cases...

                                                     Available Test Procedures                                                     
┏━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Id       ┃ Category     ┃ Description                                                ┃ Required Clients                         ┃
┡━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ S-ALL-01 │ Registration │ Discovery with Out-Of-Band registration                    │ 1 client(s) with type(s): any            │
│ S-ALL-02 │ Registration │ Discovery with In-Band Registration for Direct Clients     │ 1 client(s) with type(s): device         │
...

Running your first test

The following command will run the S-ALL-01 test with the client you created earlier cactus run S-ALL-01 myclient1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cactus_client-0.0.4.tar.gz (102.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cactus_client-0.0.4-py3-none-any.whl (118.4 kB view details)

Uploaded Python 3

File details

Details for the file cactus_client-0.0.4.tar.gz.

File metadata

  • Download URL: cactus_client-0.0.4.tar.gz
  • Upload date:
  • Size: 102.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for cactus_client-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ad7d65d5d99ab1feee98fd4c5f205b598a22fa3997a3d2ef5be24a2e7007704e
MD5 7d25aa6203e9a6059f18104c2b1a0e65
BLAKE2b-256 8bde5f0688fdfa81edd7e493e1d57e733a6e69924981d945bc8545846635feb3

See more details on using hashes here.

File details

Details for the file cactus_client-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: cactus_client-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 118.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for cactus_client-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 53a4d465bf6ca97939e4ec7e1ae52779ad87d608c2eee459fce5ac037f442340
MD5 04e75ebe7564beecbe096450a4253fd8
BLAKE2b-256 ca25b67cd787baca87d95ca2966689f0f8217f86f179a2b70c357b000ecbab4c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page