You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfield.Invalid(osImageFieldPath, osImage, fmt.Sprintf("could not determine if the license terms for the marketplace image have been accepted: %v", err))
830
+
// Image has license terms to be accepted
831
+
osImagePlan:=osImage.Plan
832
+
iflen(osImagePlan) ==0 {
833
+
// Use the default if not set in the install-config
834
+
osImagePlan=aztypes.ImageWithPurchasePlan
838
835
}
839
-
if!termsAccepted {
840
-
returnfield.Invalid(osImageFieldPath, osImage, "the license terms for the marketplace image have not been accepted")
836
+
ifplan:=vmImage.Plan; plan!=nil {
837
+
ifosImagePlan==aztypes.ImageNoPurchasePlan {
838
+
returnfield.Invalid(osImageFieldPath, osImage, "marketplace image requires license terms to be accepted")
returnfield.Invalid(osImageFieldPath, osImage, fmt.Sprintf("could not determine if the license terms for the marketplace image have been accepted: %v", err))
843
+
}
844
+
if!termsAccepted {
845
+
returnfield.Invalid(osImageFieldPath, osImage, "the license terms for the marketplace image have not been accepted")
0 commit comments