Deployment Type
Docker
Version
v2.0.4
Steps to Reproduce
- Copy contents of example from documentation into /etc/hyperglass/directives.yaml
- Start container and check logs
One example:
show-bgp-summary:
name: BGP Summary
rules:
- condition: null
command: show bgp all summary
field: null
Expected Behavior
The directive should be parsed correctly and not throw errors.
Observed Behavior
Error shown.
Defining/undefining the directive on the device does not matter, same error.
Have tried many different custom directive configs but one way or another it throws a validation error.
Configuration
No response
Devices
No response
Logs
╭─────────────────────────────── locals ────────────────────────────────╮ │
│ │ data = { │ │
│ │ │ 'id': 'show-bgp-summary', │ │
│ │ │ 'name': 'BGP Summary', │ │
│ │ │ 'rules': [ │ │
│ │ │ │ { │ │
│ │ │ │ │ 'condition': None, │ │
│ │ │ │ │ 'command': 'show bgp all summary' │ │
│ │ │ │ } │ │
│ │ │ ], │ │
│ │ │ 'field': None │ │
│ │ } │ │
│ │ self = Directive() │ │
│ ╰───────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────╯
ValidationError: 3 validation errors for Directive
rules.condition
Input should be a valid string [type=string_type, input_value=None,
input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.8/v/string_type
field.Text
Input should be a valid dictionary or instance of Text [type=model_type,
input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.8/v/model_type
field.Select
Input should be a valid dictionary or instance of Select [type=model_type,
input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.8/v/model_type
Deployment Type
Docker
Version
v2.0.4
Steps to Reproduce
One example:
Expected Behavior
The directive should be parsed correctly and not throw errors.
Observed Behavior
Error shown.
Defining/undefining the directive on the device does not matter, same error.
Have tried many different custom directive configs but one way or another it throws a validation error.
Configuration
No response
Devices
No response
Logs