Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Script To Read/Write STH & STU Attributes #11

Open
sanssecours opened this issue Nov 26, 2020 · 0 comments
Open

Create Script To Read/Write STH & STU Attributes #11

sanssecours opened this issue Nov 26, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@sanssecours
Copy link
Member

Description

To debug the state of an STH or STU it makes sense to read (and write) some of the (EEPROM) attributes of these nodes. Ideally we should offer a command line application (Python script) that allows us to read all or specific attributes of a node. Contrary to the current design of the ICOc the application would not work interactively, but instead behave just like a normal command line application such as cat, head or git. This should make it possible to also use the program in (Shell) scripts to automate certain tasks.

Examples

General

I am still unsure about the name of the tool. In the examples below I just call it “ICOn” or icon. Of course I am open for better name suggestions.

Reading all attributes of a certain unit could look like this

icon read --name GGvXEd6B --type STH

and the output could look something like this:

EEPROM Status: Initialized (0xac)
Name: CGvXAd6B
Production Date: 2019-07-03
…

The idea here is to use subcommands (read in this example) to specify the purpose of the command just like other tools such as docker or git do.

Reading a Single Attribute

Command

icon read --name GGvXEd6B --type STH --attribute 'Production Date'

Output

2019-07-03

Writing a Single Attribute

Command

icon write --name GGvXEd6B --type STH --attribute 'Production Date' '2020-10-06'

Output

None

Retrieving All Available STHs

Command

icon list

Output

GGvXEd6B
Blubb
Hello
@sanssecours sanssecours added the enhancement New feature or request label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant