Skip to content

Unify image file format for version parsing #334

@hellt

Description

@hellt

Currently, the version extraction logic uses the source image file as presented by the vendor with a sed expression parsing the version out of this sometimes long and complex file name.
This makes sane people sad when looking at these seds.

The proposal is to unify the way the source qcow/vmdk image files are provided to the make to reduce the ambiguity and drive the sed complexity to zero.

I propose to use the following file name format:

vendor_nos_[type]_(anyVersionString).qcow2

where:

  • vendor is a lowercase vendor name, as used in the makefile's VENDOR variable
  • nos is a name of the network os, as used in the makefile's NAME variable
  • type is a hardware emulated type. An optional field

The version extraction logic then can be centralized in the core make file and removed from the individual make files of a NOS. The version extraction for most systems can use awk and fetch anything from the last _ char until it reaches .qcow2.

NOSes that can't rely on the centralized version extraction should define the VERSION variable in their own make file. This should avoid version detection logic in the centralized make file as it should check if the VERSION variable is set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions