Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Update copy image logic to match create image. #828
Image "guestOsFeatures" should behave the same during image copy and creation.
done, ready for review
Checklist (tick everything that applies)
Sorry for the delay. Looks fine and tests/lint check pass.
We've now duplicated that guest_os_feature check in both the create and copy methods - what do you think about creating a helper function to reduce the duplication (any chance of any other API exposing this somehow)? Also, are there more guest_os_features coming? Should we make a static list?
I moved the functions together for that purpose and considered writing a helper function. I decided against it for two reasons.
We will want to add more guest_os_features in the near future, so it should be a static list. Any suggestions for where I should put that? Define a global variable in the file?