ajschmidt commented on a change in pull request #2785: In Traffic Router
Support Snapshots which only update Delivery Services
URL: https://github.com/apache/trafficcontrol/pull/2785#discussion_r240751446
##########
File path:
traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/config/CertificateChecker.java
##########
@@ -42,21 +52,14 @@ public String getDeliveryServiceType(final JsonNode
deliveryServiceJson) {
return null;
}
- public boolean certificatesAreValid(final List<CertificateData>
certificateDataList, final JsonNode deliveryServicesJson) {
-
- final Iterator<String> deliveryServiceIdIter =
deliveryServicesJson.fieldNames();
- boolean invalidConfig = false;
+ public boolean certificatesAreValid(final List<CertificateData>
certificateDataList, final List<DeliveryService> deliveryServices) {
+ final Iterator<DeliveryService> deliveryServiceIdIter =
deliveryServices.iterator();
while (deliveryServiceIdIter.hasNext()) {
- if
(!deliveryServiceHasValidCertificates(certificateDataList,
deliveryServicesJson, deliveryServiceIdIter.next())) {
- invalidConfig = true; // individual DS errors
are logged when deliveryServiceHasValidCertificates() is called
+ if
(!deliveryServiceHasValidCertificates(certificateDataList,
deliveryServiceIdIter.next())) {
Review comment:
good catch. Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services