Page MenuHomeVyOS Platform

Rewrite `vyatta-image-tools.pl` in Python
Closed, ResolvedPublic

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
Unspecified (please specify)

Related Objects

StatusSubtypeAssignedTask
In progressFEATURE REQUESTNone
Resolvederkin

Event Timeline

erkin triaged this task as Low priority.Dec 16 2021, 4:07 PM
erkin changed the task status from Open to In progress.Jan 5 2022, 2:27 PM

Some notes:

  1. The old syntax is quite terrible. It breaks if an image is named disk-install or running or any remote protocol. There needs to be a cleaner syntax for it, such as copy file from image My-Image/usr/local/foo to path /tmp/foo or show file in remote ftp://ftp.example.net/foo.
  2. 'Image tools' isn't exactly a descriptive name for it. It does four operations:
    • show: List files in a directory, or spit information about a file followed by its contents (hexdump if it's binary).
    • copy: Copy a file or directory from one place to another (it can merge directories).
    • delete: Deletes a file or directory (doesn't work remotely).
    • update and updateone: Updates an image's config directory with rsync (the only part directly related to image manipulation). This is actually called clone in the CLI.
  3. show, copy and delete should probably be moved to a separate (new) module related to file operations (and coupled with vyos.remote) whilst update needs to become its own thing (a helper script, perhaps).

Pythonic reimplementation complete. Now only the XML op-mode definition and the auto-complete script remain.

show-dhcp-leases.pl under vyatta-op remains the only extant deadweight Vyatta script and needs to be removed.

dmbaturin added a project: Restricted Project.