Page MenuHomeVyOS Platform

HTTPS-API delete key without id error
Closed, ResolvedPublicBUG

Description

Delete key without id error/incorrect check

set service https api keys id foo key '12345'
commit
del service https api keys id foo key
commit

commit:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/http-api.py", line 145, in <module>
    c = get_config()
        ^^^^^^^^^^^^
  File "/usr/libexec/vyos/conf_mode/http-api.py", line 83, in get_config
    key = api_dict['keys']['id'][el]['key']
          ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'key'



[[service https api]] failed
Commit failed

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.4-rolling-202302240317
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

jestabro changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).Feb 24 2023, 3:32 PM
jestabro changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
jestabro changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).
jestabro moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.