You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/03/16 21:09:19 UTC
[21/29] incubator-trafficcontrol git commit: change tm references to
to
change tm references to to
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/dd1cdc05
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/dd1cdc05
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/dd1cdc05
Branch: refs/heads/master
Commit: dd1cdc05c89dfe76a33324b8fe9851aebcd74f28
Parents: 4e15297
Author: Derek Gelinas <mr...@gmail.com>
Authored: Wed Mar 15 20:16:50 2017 +0000
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Thu Mar 16 15:08:24 2017 -0600
----------------------------------------------------------------------
.../app/lib/API/Configs/ApacheTrafficServer.pm | 8 +++---
traffic_ops/bin/traffic_ops_ort.pl | 26 ++++++++++----------
2 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/dd1cdc05/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
index 055a9c7..241a383 100644
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -63,8 +63,8 @@ sub get_config_metadata {
my %condition = ( 'me.host_name' => $host_name );
my $rs_server = $self->db->resultset('Server')->search( \%condition, { prefetch => [ 'cdn', 'profile' ] } );
- my $tm_url = $self->db->resultset('Parameter')->search( { -and => [ name => 'tm.url', config_file => 'global' ] } )->get_column('value')->first();
- my $tm_cache_url = $self->db->resultset('Parameter')->search( { -and => [ name => 'tm_cache.url', config_file => 'global' ] } )->get_column('value')->first();
+ my $to_url = $self->db->resultset('Parameter')->search( { -and => [ name => 'tm.url', config_file => 'global' ] } )->get_column('value')->first();
+ my $to_cache_url = $self->db->resultset('Parameter')->search( { -and => [ name => 'tm_cache.url', config_file => 'global' ] } )->get_column('value')->first();
my $cdn_name = $server_obj->cdn->name;
my $server = $rs_server->next;
if ($server) {
@@ -75,9 +75,9 @@ sub get_config_metadata {
$data_obj->{'info'}->{'profile_id'} = $server->profile->id;
$data_obj->{'info'}->{'cdn_name'} = $cdn_name;
$data_obj->{'info'}->{'cdn_id'} = $server->cdn->id;
- $data_obj->{'info'}->{'tm_url'} = $tm_url;
+ $data_obj->{'info'}->{'to_url'} = $to_url;
if ( $tm_cache_url ) {
- $data_obj->{'info'}->{'tm_cache_url'} = $tm_cache_url;
+ $data_obj->{'info'}->{'to_cache_url'} = $to_cache_url;
}
#$data_obj->{'profile'}->{'name'} = $server->profile->name;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/dd1cdc05/traffic_ops/bin/traffic_ops_ort.pl
----------------------------------------------------------------------
diff --git a/traffic_ops/bin/traffic_ops_ort.pl b/traffic_ops/bin/traffic_ops_ort.pl
index 0b3ec7b..91c59fe 100755
--- a/traffic_ops/bin/traffic_ops_ort.pl
+++ b/traffic_ops/bin/traffic_ops_ort.pl
@@ -62,14 +62,14 @@ given ( $ARGV[1] ) {
}
my $traffic_ops_host = undef;
-my $tm_url = undef;
-my $tm_cache_url = undef;
+my $to_url = undef;
+my $to_cache_url = undef;
my $TM_LOGIN = undef;
if ( defined( $ARGV[2] ) ) {
if ( $ARGV[2] !~ /^https*:\/\/.*$/ ) {
&usage();
- }
+
else {
$traffic_ops_host = $ARGV[2];
$traffic_ops_host =~ s/\/*$//g;
@@ -1418,7 +1418,7 @@ sub lwp_get {
}
if ( $cache_in_use == 1 ) {
( $log_level >> $ERROR ) && print "ERROR There appears to be an issue with the Traffic Ops Cache. Reverting to primary Traffic Ops host.\n";
- $traffic_ops_host = $tm_url;
+ $traffic_ops_host = $to_url;
$cache_in_use = 0;
}
sleep 2**( $retries - $retry_counter );
@@ -1722,16 +1722,16 @@ sub get_cfg_file_list {
my $ort_ref = decode_json($result);
if ($api_in_use == 1) {
- $tm_url = $ort_ref->{'info'}->{'tm_url'};
- $tm_url =~ s/\/*$//g;
- $traffic_ops_host = $tm_url;
- ( $log_level >> $INFO ) && printf("INFO Found Traffic Ops URL from Traffic Ops: $tm_url\n");
- $tm_cache_url = $ort_ref->{'info'}->{'tm_cache_url'};
- if ( $tm_cache_url ) {
- $tm_cache_url =~ s/\/*$//g;
- $traffic_ops_host = $tm_cache_url;
+ $to_url = $ort_ref->{'info'}->{'to_url'};
+ $to_url =~ s/\/*$//g;
+ $traffic_ops_host = $to_url;
+ ( $log_level >> $INFO ) && printf("INFO Found Traffic Ops URL from Traffic Ops: $to_url\n");
+ $to_cache_url = $ort_ref->{'info'}->{'to_cache_url'};
+ if ( $to_cache_url ) {
+ $to_cache_url =~ s/\/*$//g;
+ $traffic_ops_host = $to_cache_url;
$cache_in_use = 1;
- ( $log_level >> $INFO ) && printf("INFO Found Traffic Ops Cache URL from Traffic Ops: $tm_cache_url\n");
+ ( $log_level >> $INFO ) && printf("INFO Found Traffic Ops Cache URL from Traffic Ops: $to_cache_url\n");
}
$profile_name = $ort_ref->{'info'}->{'profile_name'};
( $log_level >> $INFO ) && printf("INFO Found profile from Traffic Ops: $profile_name\n");