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
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.InternetGateway.Skip"), c.Spec.NetworkSpec.Vcn.InternetGateway.Skip, "field requires to be true when VCN is skipped"))
104
106
}
105
107
108
+
// If Skip field is True, Skip field of ServiceGateway should be true
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.ServiceGateway.Skip"), c.Spec.NetworkSpec.Vcn.ServiceGateway.Skip, "field requires to be true when VCN is skipped"))
108
111
}
109
112
113
+
// If Skip field is True, Skip field of NATGateway should be true
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.NATGateway.Skip"), c.Spec.NetworkSpec.Vcn.NATGateway.Skip, "field requires to be true when VCN is skipped"))
112
116
}
113
117
118
+
// If Skip field is True, Skip field of RouteTable should be true
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.RouteTable.Skip"), c.Spec.NetworkSpec.Vcn.RouteTable.Skip, "field requires to be true when VCN is skipped"))
116
121
}
117
122
123
+
// For each subnet if Skip field is True, ID field of Subnet should be specified
124
+
// Also for each subnet if ID field is True, Skip field of Subnet should be true
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "subnet.Skip"), subnet.Skip, "field cannot be true when VCN is not skipped"))
134
142
}
135
143
}
136
144
}
137
145
138
-
// if c.Spec.NetworkSpec.Vcn.ID != common.String("") {
139
-
// if c.Spec.NetworkSpec.Vcn.Skip != *common.Bool(true) {
140
-
// allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.Skip"), c.Spec.NetworkSpec.Vcn.Skip, "field requires to be true if VCN ID is specified"))
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.InternetGateway.Skip"), c.Spec.NetworkSpec.Vcn.InternetGateway.Skip, "field requires to be true when VCN is skipped"))
190
194
}
191
195
196
+
// If Skip field is True, Skip field of ServiceGateway should be true
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.ServiceGateway.Skip"), c.Spec.NetworkSpec.Vcn.ServiceGateway.Skip, "field requires to be true when VCN is skipped"))
194
199
}
195
200
201
+
// If Skip field is True, Skip field of NATGateway should be true
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.NATGateway.Skip"), c.Spec.NetworkSpec.Vcn.NATGateway.Skip, "field requires to be true when VCN is skipped"))
198
204
}
199
205
206
+
// If Skip field is True, Skip field of RouteTable should be true
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.RouteTable.Skip"), c.Spec.NetworkSpec.Vcn.RouteTable.Skip, "field requires to be true when VCN is skipped"))
202
209
}
203
210
211
+
// For each subnet if Skip field is True, ID field of Subnet should be specified
212
+
// Also for each subnet if ID field is True, Skip field of Subnet should be true
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "subnet.Skip"), subnet.Skip, "field cannot be true when VCN is not skipped"))
220
230
}
221
231
}
222
232
}
223
233
224
-
// if c.Spec.NetworkSpec.Vcn.ID != common.String("") {
225
-
// if c.Spec.NetworkSpec.Vcn.Skip != *common.Bool(true) {
226
-
// allErrs = append(allErrs, field.Invalid(field.NewPath("spec", "NetworkSpec.Vcn.Skip"), c.Spec.NetworkSpec.Vcn.Skip, "field requires to be true if VCN ID is specified"))
0 commit comments