This task was superseded by T3411, hence was not backported; however that missed the bug fix in the final commit. cherry-pick rVYOSONEXeeb9687bb9aa.
- Feed Queries
- All Stories
- Search
- Feed Search
- Transactions
- Transaction Logs
May 12 2021
@rherold, this was a known bug, fixed in 1.4, but missed in backports to 1.3. As a workaround, systemctl stop vyos-configd before the commit will reveal the errors; if I recall correctly, the error is a missing 'country-code' entry.
Apr 27 2021
Apr 24 2021
Apr 18 2021
Apr 17 2021
Apr 16 2021
>>> from vyos.config import Config
>>> import pprint
>>> conf = Config()
>>> # no mangling
... tmp = conf.get_config_dict(['simple'], get_first_key=True)
>>> pprint.pprint(tmp)
{'some-tag-node': {'some-foo': {'just-a-node': {'single-value': 'bar'}},
'some-other-foo': {'just-a-node': {'multiple-value': ['first',
'second']}}}}
>>> # standard mangling
... tmp = conf.get_config_dict(['simple'], get_first_key=True, key_mangling=('-', '_'))
>>> pprint.pprint(tmp)
{'some_tag_node': {'some_foo': {'just_a_node': {'single_value': 'bar'}},
'some_other_foo': {'just_a_node': {'multiple_value': ['first',
'second']}}}}
>>> # mangling with no_tag_node_value_mangle=True
... tmp = conf.get_config_dict(['simple'], get_first_key=True, key_mangling=('-', '_'), no_tag_node_value_mangle=True)
>>> pprint.pprint(tmp)
{'some_tag_node': {'some-foo': {'just_a_node': {'single_value': 'bar'}},
'some-other-foo': {'just_a_node': {'multiple_value': ['first',
'second']}}}}
>>>Apr 14 2021
The suggested resolution is to define an include file with the syntaxVersion element. The syntaxVersion element contains the component name and version number; the including interface definition file corresponds to the conf_mode script. Hence, this defines a mapping
Apr 1 2021
There are two issues in this task (1) reordering of interfaces (2) redundant hw-id entries due to vyatta_net_name not parsing quoted values. A quick fix for (2) will be a PR for vyatta-cfg-system; the general issues the bug raises, regarding quoted values in configtree, will be addressed in the subtasks.
Mar 31 2021
Mar 30 2021
Mar 28 2021
Mar 26 2021
This is resolved by T3412.
Mar 25 2021
Draft PR linked below; it is a draft pending the addition of a supporting package (vyos-http-api-tools). All data validation for application/json requests is done implicitly using Pydantic models/validators; for multipart forms requests, all explicit validation has been moved out of the endpoint function bodies and into the middleware --- this is a pedantic block of code, but allows consolidation and review of all manual checks. An OpenAPI 3.0.2 schema is automatically generated and presented at server-name/docs (Swagger) and server-name/redoc (ReDoc version; slightly more pleasing to the eye).
Mar 24 2021
Mar 23 2021
Mar 22 2021
Mar 21 2021
@jack9603301 It is not a matter of different codes, but rather what python libraries have been provided so far: the focus has been on abstracting the config session, in several directions, and previously there had not been a use case for reading config settings from op mode.
Mar 18 2021
Mar 17 2021
Mar 16 2021
There are two versions that have been developed, reasonably feature complete, pending testing. One presents an OpenAPI schema of application/x-www-form-urlencoded (multipart forms); the other, application/json. The latter uses middleware (strictly speaking, a custom request and route class, instead of the Starlette middleware capability, although that may change) to intercept multipart requests, so as to remain backwards compatible.