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

Non-existent keys in configuration file do not trigger an error #64

Open
Southparkfan opened this issue Dec 1, 2023 · 2 comments
Open

Comments

@Southparkfan
Copy link

Business as usual, I forgot my ☕:

[snip]
  router3:
    type: router
    interfaces:
      eth123:
        epv6: 2001:db8:beef:29::3/64
        mac: '42:42:42:42:09:03'
        bridge: 9
[snip]

Obviously, 'evp6' should have been 'ipv6'. However, I didn't get a hard failure during vnet-manager create. A configuration without any IPv4 or IPv6 address can be very legitimate, but a configuration with non-existent keys should trigger an error.

@Erik-Lamers1
Copy link
Owner

What do you mean with non-existent keys exactly?
Keys inside a YAML block, which is not used for anything in Vnet-manager?

Catching typos like these is very hard to do with a validator. Maybe it would be better to write a JSON schema for people to load in their IDE, such that it will provide auto-completion on the configuration file.

@Southparkfan
Copy link
Author

Yes, that's what I meant. A JSON schema would be perfect for validation, both in IDE (for comfort) and in the validation code itself (to avoid silent failures).

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

No branches or pull requests

2 participants