Closed WojciechowskiPiotr closed 3 months ago
Hi @WojciechowskiPiotr, thanks for opening a PR. The dotted notation is used in many places around the script. Instead of covering two use cases every time (with dot and hyphen), how about we add the step in setup task to convert all the SD-WAN images with hyphen to dotted format?
I thought about that, but I wonder if it's possible. The image definitions are read-only, but even if this flag is removed, the ID cannot be changed, at least not from the GUI. It makes sense as image ID is referred in node definition. I think that needs further investigation.
I'm open to other solutions because if it's not changed, the only way would be to remove existing SDWAN images and set them up again using setup, which is not convenient either.
@WojciechowskiPiotr I've implemented a converter in setup task on dev-2.0.10 branch. This should verify images and if there are any SD-WAN images using "-", it will convert them to ".". Could you please test it?
Let me know if that works!
Hi,
It converted the image definition correctly. I'd like you to consider additional two cosmetic changes - put migration as a separate option (--convert-images
) under setup
and list available images at the end of setup (this also may be a separate option --list-images
just to list available images)
Thanks for implementing this change.
Thank you! I will add option for listing images. As for conversion, I don't see a reason why we shouldn't convert it always. As original problem will be fixed in 2.0.10, I will close this PR now, thank you for your contribution!
Description
If an image is already present in CML (i.e., already imported from replace ISO), it may have notation with hyphens instead of dots. This small patch fixes the handling of such notation in two places:
1) Validation of proper image for deployment
2) Listing of available images
It may be just a base to fix the notation handling in other parts of the code as well, I added support for hyphens in those two places because I don't have access to a fresh CML install to test image import via "setup" command here.
With this patch, I'll be able to deploy the lab with "sdwan-lab deploy 20.13.1" and "sdwan-lab deploy 20-13-1" commands.
Type of Change