[Feature] Better version support
Closed this issue · 4 comments
This is a wide open feature request that is not well formed.
It would be ideal to add some feature to help users with regards to versions.
IE a couple of options:
- Create a new function that allows you to get a list of available versions (possibly allowing for filters)
- Get the latest M or F version for a particular code train
- Get the recommended version
Thank you for this feature request. Below are few comments before starting implementation.
Create a new function that allows you to get a list of available versions
We can easily add a command listing all available versions with filtering. But it cannot be part of autocompletion in the CLI, so it means you have to use 2 CLI commands here:
# List available version
ardl get available-version ...
# Download selected version
ardl get eos --version 4.28.3M --image-type cEOS
Get the latest M or F version for a particular code train
I don't see any blocker to implement such option. It can be an option in ardl get eos
for instance.
# Download selected version
ardl get eos --latest-m --image-type cEOS
Warning
It will be based on highest M version in term of train and not based on release date since it is not in xml file.
Get the recommended version
This one is a bit complex as it is not available in the XML page providing all download links.
Also, since Arista policy is latest M release being the recommended version, it is always customer dependant and it should be selected carefully by customer instead of relying on a script.
Create a new function that allows you to get a list of available versions
I think the function to get a list of available versions is great. 2 commands should be fine.
Get the latest M or F version for a particular code train
For the latest M of F, when I mentioned code train, I meant 4.28 vs 4.27.
All 2 of the below could take any string matching the regex ^4\.\d{2}$
and give relevant errors if the train has no associated images. If no string is provided it will default to the latest image on the latest code train
--latest-m
--latest
Get the recommended version
A colleague of mine took the recommended-releases page stating 4.27.5M (or later) as the recommendation for a release to mean 4.27.5M is the recommendation. Hence why I mentioned this feature.
Other
I just want to continue to say I am thankful for all that you do in the open on github with regards to the Arista organization or on your own.
So we have a plan for the latest F/M and list available versions.
For recommended version, I will check, but it is not on a page we can programatically extract the value without playing with html scrapping
I will probably push a draft PR next week.
A new PR is available and will be completed in the nex coming days.
Today, only getting information is available
ardl info eos-versions --latest -r m -b 4.29
4.29.3M
But options will come for downloading with a trigger as discussed