mitchell852 commented on a change in pull request #2158: modifies ORT to
correctly parse api 1.3 for revalidation.
URL:
https://github.com/apache/incubator-trafficcontrol/pull/2158#discussion_r183715686
##########
File path: traffic_ops/bin/traffic_ops_ort.pl
##########
@@ -783,6 +771,53 @@ sub get_print_current_client_connections {
( $log_level >> $DEBUG ) && print "DEBUG There are currently
$current_connections connections.\n";
}
+sub get_update_status {
+ my $status_api;
+ my $uri = "/api/1.3/servers/$hostname_short/update_status";
+ my $upd_ref = &lwp_get($uri);
+ if ($upd_ref eq '404') {
+ ( $log_level >> $ERROR ) && printf("ERROR Traffic Ops version
does not support update_status API. Reverting to UI route.\n");
+ $uri = "/update/$hostname_short";
+ $upd_ref = &lwp_get($uri);
+ $status_api = 0;
+ }
+
+ if ( $upd_ref =~ m/^\d{3}$/ ) {
Review comment:
this doesn't make any sense to me. won't this always evaluate to true.
aren't all status codes 3 digits long?
----------------------------------------------------------------
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