You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/03/29 20:17:28 UTC

[GitHub] [trafficcontrol] shamrickus commented on a change in pull request #5686: Remove lingering references to undocumented TO endpoints

shamrickus commented on a change in pull request #5686:
URL: https://github.com/apache/trafficcontrol/pull/5686#discussion_r603584697



##########
File path: test/traffic_ops_cfg/cfg_test.pl
##########
@@ -239,20 +239,24 @@ sub get_crconfigs {
 	my $result     = &curl_me($to_cdn_url);
 	my $cdn_json   = decode_json($result);
 
+    my $old_ops = $CURL_OPTS;
+
 	foreach my $cdn ( @{ $cdn_json->{response} } ) {
 		next unless $cdn->{name} ne "ALL";
 		my $dir = $outpath . '/cdn-' . $cdn->{name};
 		make_path( $dir );
 		if ($perform_snapshot) {
 			print "Generating CRConfig for " . $cdn->{name};
 			my $start = [gettimeofday];
-			&curl_me( $to_url . "/tools/write_crconfig/" . $cdn->{name} );
+			$CURL_OPTS = $CURL_OPTS . ' -X PUT';
+			&curl_me( $to_url . "/api/2.0/snapshot/" . $cdn->{name} );
+            $CURL_OPTS = $old_ops;

Review comment:
       The old endpoint is a GET, the new endpoint is PUT.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org