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

Use config field availability information from the sdk #577

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

sosthene-nitrokey
Copy link
Contributor

@sosthene-nitrokey sosthene-nitrokey commented Oct 4, 2024

In set-config, get the type of the and metadata for the fields, including information regarding the need for power-cycle and validation of accepted values.

Depends on:

Checklist

Make sure to run make check and make fix before creating a PR, otherwise the CI will fail.

  • tested with Python3.9
  • signed commits
  • updated documentation (e.g. parameter description, inline doc, docs.nitrokey)
  • added labels

Test Environment and Execution

Relevant Output Example

python nitropy.py nk3 set-config piv.disabled False
Command line tool to interact with Nitrokey devices 0.6.0
Critical error:
Unknown config value. Expected Bool, got `False`. Unknown config values can only be set if the --force/-f flag is set.  Aborting.
python nitropy.py nk3 set-config unknown-value False
Command line tool to interact with Nitrokey devices 0.6.0
Changing configuration values can have unexpected side effects, including data loss.
This should only be used for development and testing.
Critical error:
Unknown config values can only be set if the --force/-f flag is set.  Aborting.

Copy link
Member

@robin-nitrokey robin-nitrokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you still need to bump the nitrokey dependency to 0.2.1.

In the force case, the metadata could be None regardless.
In that case we can just disregard any warnings
@sosthene-nitrokey sosthene-nitrokey merged commit e3446a8 into master Oct 22, 2024
8 checks passed
@sosthene-nitrokey sosthene-nitrokey deleted the list-config branch October 22, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants