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/04/12 20:39:15 UTC

[1/4] incubator-trafficcontrol git commit: fix some fixtures and missing character

Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/master a36cbef1c -> ff31ace99


fix some fixtures and missing character


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/2f65a081
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/2f65a081
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/2f65a081

Branch: refs/heads/master
Commit: 2f65a0812fe209233191e5c8d0585c1b5867eb86
Parents: 158a9c5
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Wed Apr 12 20:26:23 2017 +0000
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Wed Apr 12 14:38:44 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/Fixtures/Integration/Parameter.pm          | 6 +++---
 traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/2f65a081/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm b/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm
index 66384a6..d3a0064 100644
--- a/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm
+++ b/traffic_ops/app/lib/Fixtures/Integration/Parameter.pm
@@ -4382,7 +4382,7 @@ use namespace::autoclean;
 		new => 'Parameter',
 		using => {
 			name => 'trafficserver',
-			value => '4.2.1-6.el6.x86_64',
+			value => '5.3.2-761.el6.x86_64',
 			config_file => 'package',
 			last_updated => '2015-12-10 15:43:46',
 		},
@@ -4392,7 +4392,7 @@ use namespace::autoclean;
 		new => 'Parameter',
 		using => {
 			name => 'trafficserver',
-			value => '4.0.2-2.el6.x86_64',
+			value => '5.3.2-761.el6.x86_64',
 			config_file => 'package',
 			last_updated => '2015-12-10 15:43:46',
 		},
@@ -4404,7 +4404,7 @@ use namespace::autoclean;
 			name => 'trafficserver',
 			config_file => 'package',
 			last_updated => '2015-12-10 15:43:46',
-			value => '3.2.0-4812.el6.x86_64',
+			value => '5.3.2-761.el6.x86_64',
 		},
 	},
 	## id => 440

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/2f65a081/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t b/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t
index 5cd052f..b417bbe 100644
--- a/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t
+++ b/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t
@@ -41,7 +41,7 @@ ok $t->post_ok( '/login', => form => { u => Test::TestHelper::ADMIN_USER, p => T
 	->or( sub { diag $t->tx->res->content->asset->{content}; } ), 'Should login?';
 
 # Check ATS config metadata
-ok $t->get_ok("/api/1.2/server/100/configfiles/ats")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/servers/100/configfiles/ats")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
 
 # Check server routes
 ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/12M_facts")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );


[2/4] incubator-trafficcontrol git commit: fix testing file

Posted by mi...@apache.org.
fix testing file


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/158a9c54
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/158a9c54
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/158a9c54

Branch: refs/heads/master
Commit: 158a9c545d8f9050e77c088086910388c7739c81
Parents: e5a6cea
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Wed Apr 12 19:08:47 2017 +0000
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Wed Apr 12 14:38:44 2017 -0600

----------------------------------------------------------------------
 .../1.2/config_files_apache_traffic_server.t    | 27 ++++++++++----------
 1 file changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/158a9c54/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t b/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t
index dea9187..5cd052f 100644
--- a/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t
+++ b/traffic_ops/app/t/api/1.2/config_files_apache_traffic_server.t
@@ -44,24 +44,23 @@ ok $t->post_ok( '/login', => form => { u => Test::TestHelper::ADMIN_USER, p => T
 ok $t->get_ok("/api/1.2/server/100/configfiles/ats")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
 
 # Check server routes
-ok $t->get_ok("/api/1.2/server/100/configfiles/ats/12M_facts")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/server/100/configfiles/ats/ip_allow.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/server/100/configfiles/ats/crontab_root")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/server/100/configfiles/ats/remap.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/server/100/configfiles/ats/parent.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/server/100/configfiles/ats/cache.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/server/100/configfiles/ats/hosting.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/12M_facts")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/servers/100/configfiles/ats/ip_allow.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/remap.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/servers/100/configfiles/ats/parent.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/cache.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/servers/100/configfiles/ats/hosting.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
 
 # Check CDN routes
-ok $t->get_ok("/api/1.2/cdn/cdn1/configfiles/ats/cacheurl.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/cdn/cdn1/configfiles/ats/regex_revalidate.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/cdns/cdn1/configfiles/ats/cacheurl.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/cdns/cdn1/configfiles/ats/regex_revalidate.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
 
 # Check profile routes
-ok $t->get_ok("/api/1.2/profile/100/configfiles/ats/50-ats.rules")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/profile/100/configfiles/ats/drop_qstring.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/profile/100/configfiles/ats/volume.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/profile/100/configfiles/ats/astats.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
-ok $t->get_ok("/api/1.2/profile/100/configfiles/ats/storage.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/50-ats.rules")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/drop_qstring.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/volume.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/astats.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
+ok $t->get_ok("/api/1.2/profiles/100/configfiles/ats/storage.config")->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content} } );
 
 
 # Count the 'response number'


[4/4] incubator-trafficcontrol git commit: This closes #457

Posted by mi...@apache.org.
This closes #457


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/ff31ace9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/ff31ace9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/ff31ace9

Branch: refs/heads/master
Commit: ff31ace9970bb42dcb9b3ee160e4712f70588535
Parents: 2f65a08
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Wed Apr 12 14:39:04 2017 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Wed Apr 12 14:39:04 2017 -0600

----------------------------------------------------------------------

----------------------------------------------------------------------



[3/4] incubator-trafficcontrol git commit: adjust configfiles API to match other API routes.

Posted by mi...@apache.org.
adjust configfiles API to match other API routes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/e5a6cea7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/e5a6cea7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/e5a6cea7

Branch: refs/heads/master
Commit: e5a6cea7dc9993d669b089c4f4dd2956c064860e
Parents: a36cbef
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Wed Apr 12 13:00:32 2017 +0000
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Wed Apr 12 14:38:44 2017 -0600

----------------------------------------------------------------------
 .../app/lib/API/Configs/ApacheTrafficServer.pm  | 64 ++++++++++----------
 traffic_ops/app/lib/TrafficOpsRoutes.pm         |  8 +--
 traffic_ops/bin/traffic_ops_ort.pl              |  2 +-
 3 files changed, 37 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e5a6cea7/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 25d86af..45a0ece 100644
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -107,10 +107,10 @@ sub get_config_metadata {
 	foreach my $config_file ( keys %{ $config_file_obj } ) {
 		my $scope = $self->get_scope($config_file);
 		my $scope_id;
-		if ( $scope eq 'cdn' ) {
+		if ( $scope eq 'cdns' ) {
 			$scope_id = $server->cdn->name;
 		}
-		elsif ( $scope eq 'profile' ) {
+		elsif ( $scope eq 'profiles' ) {
 			$scope_id = $server->profile->name;
 		}
 		else {
@@ -143,7 +143,7 @@ sub get_server_config {
 	}
 
 	##check the scope - is this the correct route?
-	if ( $scope ne 'server' ) {
+	if ( $scope ne 'servers' ) {
 		return $self->alert( "Error - incorrect file scope for route used.  Please use the " . $scope . " route." );
 	}
 
@@ -197,7 +197,7 @@ sub get_cdn_config {
 	}
 
 	##check the scope - is this the correct route?
-	if ( $scope ne 'cdn' ) {
+	if ( $scope ne 'cdns' ) {
 		return $self->alert( "Error - incorrect file scope for route used.  Please use the " . $scope . " route." );
 	}
 
@@ -238,7 +238,7 @@ sub get_profile_config {
 	}
 
 	##check the scope - is this the correct route?
-	if ( $scope ne 'profile' ) {
+	if ( $scope ne 'profiles' ) {
 		return $self->alert( "Error - incorrect file scope for route used.  Please use the " . $scope . " route." );
 	}
 
@@ -293,37 +293,37 @@ sub get_scope {
 	my $fname = shift;
 	my $scope;
 
-	if ( $fname eq "ip_allow.config" )            { $scope = 'server' }
-	elsif ( $fname eq "parent.config" )           { $scope = 'server' }
-	elsif ( $fname =~ /to_ext_.*\.config/ )       { $scope = 'server' }
-	elsif ( $fname eq "hosting.config" )          { $scope = 'server' }
-	elsif ( $fname eq "packages" )                { $scope = 'server' }
-	elsif ( $fname eq "chkconfig" )               { $scope = 'server' }
-	elsif ( $fname eq "12M_facts" )               { $scope = 'profile' }
-	elsif ( $fname eq "50-ats.rules" )            { $scope = 'profile' }
-	elsif ( $fname eq "astats.config" )           { $scope = 'profile' }
-	elsif ( $fname eq "cache.config" )            { $scope = 'profile' }
-	elsif ( $fname eq "drop_qstring.config" )     { $scope = 'profile' }
-	elsif ( $fname eq "logs_xml.config" )         { $scope = 'profile' }
-	elsif ( $fname eq "plugin.config" )           { $scope = 'profile' }
-	elsif ( $fname eq "records.config" )          { $scope = 'profile' }
-	elsif ( $fname eq "remap.config" )            { $scope = 'profile' }
-	elsif ( $fname eq "storage.config" )          { $scope = 'profile' }
-	elsif ( $fname eq "sysctl.conf" )             { $scope = 'profile' }
-	elsif ( $fname =~ /url_sig_.*\.config/ )      { $scope = 'profile' }
-	elsif ( $fname eq "volume.config" )           { $scope = 'profile' }
-	elsif ( $fname eq "bg_fetch.config" )         { $scope = 'cdn' }
-	elsif ( $fname =~ /cacheurl.*\.config/ )      { $scope = 'cdn' }
-	elsif ( $fname =~ /hdr_rw_.*\.config/ )       { $scope = 'cdn' }
-	elsif ( $fname =~ /regex_remap_.*\.config/ )  { $scope = 'cdn' }
-	elsif ( $fname eq "regex_revalidate.config" ) { $scope = 'cdn' }
-	elsif ( $fname =~ /set_dscp_.*\.config/ )     { $scope = 'cdn' }
-	elsif ( $fname eq "ssl_multicert.config" )    { $scope = 'cdn' }
+	if ( $fname eq "ip_allow.config" )            { $scope = 'servers' }
+	elsif ( $fname eq "parent.config" )           { $scope = 'servers' }
+	elsif ( $fname =~ /to_ext_.*\.config/ )       { $scope = 'servers' }
+	elsif ( $fname eq "hosting.config" )          { $scope = 'servers' }
+	elsif ( $fname eq "packages" )                { $scope = 'servers' }
+	elsif ( $fname eq "chkconfig" )               { $scope = 'servers' }
+	elsif ( $fname eq "12M_facts" )               { $scope = 'profiles' }
+	elsif ( $fname eq "50-ats.rules" )            { $scope = 'profiles' }
+	elsif ( $fname eq "astats.config" )           { $scope = 'profiles' }
+	elsif ( $fname eq "cache.config" )            { $scope = 'profiles' }
+	elsif ( $fname eq "drop_qstring.config" )     { $scope = 'profiles' }
+	elsif ( $fname eq "logs_xml.config" )         { $scope = 'profiles' }
+	elsif ( $fname eq "plugin.config" )           { $scope = 'profiles' }
+	elsif ( $fname eq "records.config" )          { $scope = 'profiles' }
+	elsif ( $fname eq "remap.config" )            { $scope = 'profiles' }
+	elsif ( $fname eq "storage.config" )          { $scope = 'profiles' }
+	elsif ( $fname eq "sysctl.conf" )             { $scope = 'profiles' }
+	elsif ( $fname =~ /url_sig_.*\.config/ )      { $scope = 'profiles' }
+	elsif ( $fname eq "volume.config" )           { $scope = 'profiles' }
+	elsif ( $fname eq "bg_fetch.config" )         { $scope = 'cdns' }
+	elsif ( $fname =~ /cacheurl.*\.config/ )      { $scope = 'cdns' }
+	elsif ( $fname =~ /hdr_rw_.*\.config/ )       { $scope = 'cdns' }
+	elsif ( $fname =~ /regex_remap_.*\.config/ )  { $scope = 'cdns' }
+	elsif ( $fname eq "regex_revalidate.config" ) { $scope = 'cdns' }
+	elsif ( $fname =~ /set_dscp_.*\.config/ )     { $scope = 'cdns' }
+	elsif ( $fname eq "ssl_multicert.config" )    { $scope = 'cdns' }
 	else {
 		$scope = $self->db->resultset('Parameter')->search( { -and => [ name => 'scope', config_file => $fname ] } )->get_column('value')->first();
 		if ( !defined($scope) ) {
 			$self->app->log->error("Filename not found.  Setting Server scope.");
-			$scope = 'server';
+			$scope = 'servers';
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e5a6cea7/traffic_ops/app/lib/TrafficOpsRoutes.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/TrafficOpsRoutes.pm b/traffic_ops/app/lib/TrafficOpsRoutes.pm
index 553c967..c873da8 100644
--- a/traffic_ops/app/lib/TrafficOpsRoutes.pm
+++ b/traffic_ops/app/lib/TrafficOpsRoutes.pm
@@ -472,10 +472,10 @@ sub api_routes {
 	$r->get("/api/$version/logs/newcount")->over( authenticated => 1 )->to( 'ChangeLog#newlogcount', namespace => $namespace );
 
 	# -- CONFIG FILES
-	$r->get("/api/$version/server/#id/configfiles/ats")->over( authenticated => 1 )->to ( 'ApacheTrafficServer#get_config_metadata', namespace => 'API::Configs' );
-	$r->get("/api/$version/profile/#id/configfiles/ats/#filename")->over( authenticated => 1 )->to ( 'ApacheTrafficServer#get_profile_config', namespace => 'API::Configs' );
-	$r->get("/api/$version/server/#id/configfiles/ats/#filename")->over( authenticated => 1 )->to ( 'ApacheTrafficServer#get_server_config', namespace => 'API::Configs' );
-	$r->get("/api/$version/cdn/#id/configfiles/ats/#filename")->over( authenticated => 1 )->to ( 'ApacheTrafficServer#get_cdn_config', namespace => 'API::Configs' );
+	$r->get("/api/$version/servers/#id/configfiles/ats")->over( authenticated => 1 )->to ( 'ApacheTrafficServer#get_config_metadata', namespace => 'API::Configs' );
+	$r->get("/api/$version/profiles/#id/configfiles/ats/#filename")->over( authenticated => 1 )->to ( 'ApacheTrafficServer#get_profile_config', namespace => 'API::Configs' );
+	$r->get("/api/$version/servers/#id/configfiles/ats/#filename")->over( authenticated => 1 )->to ( 'ApacheTrafficServer#get_server_config', namespace => 'API::Configs' );
+	$r->get("/api/$version/cdns/#id/configfiles/ats/#filename")->over( authenticated => 1 )->to ( 'ApacheTrafficServer#get_cdn_config', namespace => 'API::Configs' );
 
 	# -- DELIVERYSERVICES
 	# -- DELIVERYSERVICES: CRUD

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/e5a6cea7/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 0a08beb..3fa920a 100755
--- a/traffic_ops/bin/traffic_ops_ort.pl
+++ b/traffic_ops/bin/traffic_ops_ort.pl
@@ -1700,7 +1700,7 @@ sub get_cfg_file_list {
 	my $cfg_files;
 	my $profile_name;
 	my $cdn_name;
-	my $uri = "/api/1.2/server/$host_name/configfiles/ats";
+	my $uri = "/api/1.2/servers/$host_name/configfiles/ats";
 
 	my $result = &lwp_get($uri);