Page MenuHomeVyOS Platform

Rewrite commit-archive to more structured CLI format
Open, WishlistPublicFEATURE REQUEST

Description

Rewrite commit-archive to a more structured and clear CLI format.

set system config-management commit-archive location scp://<user>:<passwd>@<host>/<path>

The new proposed CLI:
V1

set system config-management commit-archive scp authentication username 'xxx'
set system config-management commit-archive scp authentication password 'xxx'
set system config-management commit-archive scp server '192.0.2.1'
set system config-management commit-archive scp path '/'

V2

set system config-management commit-archive target scp authentication username 'xxx'
set system config-management commit-archive target scp authentication password 'xxx'
set system config-management commit-archive target scp server '192.0.2.1'
set system config-management commit-archive target scp path '/''

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Improvement (missing useful functionality)

Event Timeline

I already looked a bit into it. What complicates it is the old location is a multi and one can add a list of locations.

My current approach was to have a tag node with numbers for commit-archive and the protocol as leaf node to support the same options as of now.

need configuration index too or maybe name
so we can have several destinations for same protocol

What about this format?
We still have named/predefined targets (scp|ftp|sftp|http|https) and <name> as tag

set system config-management commit-archive target scp <name> authentication username 'xxx'
set system config-management commit-archive target scp <name> authentication password 'xxx'
set system config-management commit-archive target scp <name> server '192.0.2.1'
set system config-management commit-archive target scp <name> path '/'

The format I started playing with looks like this:

set system config-management commit-archive 1 username 'xxx'
set system config-management commit-archive 1 password 'xxx'
set system config-management commit-archive 1 scheme 'scp'
set system config-management commit-archive 1 location '192.0.2.1/backup'

I didn't put the protocol in front since the configuration is the same for all and didn't seem a deciding factor for the configuration.
Changing the tag from an int to a name would make more sense in this context as it would allow for a descriptive differentiation.
Splitting location into server/path would also make sense. Same for moving username/password under authentication since it seems to be a common pattern.

Something like:

set system config-management commit-archive <name> authentication username 'xxx'
set system config-management commit-archive <name> authentication password 'xxx'
set system config-management commit-archive <name> scheme 'scp'
set system config-management commit-archive <name> server '192.0.2.1'
set system config-management commit-archive <name> path '/'

Not all targets have username/password
For example for the future "location"

set system config-management commit-archive aws authentication access-key
set system config-management commit-archive aws authentication secret-key
set system config-management commit-archive aws bucket <my-bucket-name>
set system config-management commit-archive aws path '/'

This way, predefined targets are more preferred.

Ok, that makes sense. Still need to place the tag.

How about

set system config-management commit-archive <name> scp authentication username 'xxx'
set system config-management commit-archive <name> scp authentication password 'xxx'
set system config-management commit-archive <name> scp server '192.0.2.1'
set system config-management commit-archive <name> scp path '/'