You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by el...@apache.org on 2017/07/11 17:07:29 UTC
[2/3] incubator-trafficcontrol git commit: adds cackekey support to
ds profiles
adds cackekey support to ds profiles
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/bacc6236
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/bacc6236
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/bacc6236
Branch: refs/heads/master
Commit: bacc623653081e9eb82b302e4ebc7247f175d97b
Parents: 13b701a
Author: Derek Gelinas <de...@cable.comcast.com>
Authored: Thu Jun 15 16:14:23 2017 +0000
Committer: Jeff Elsloo <je...@cable.comcast.com>
Committed: Tue Jul 11 11:06:52 2017 -0600
----------------------------------------------------------------------
.../app/lib/API/Configs/ApacheTrafficServer.pm | 25 ++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/bacc6236/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 8b6662c..44dc419 100644
--- a/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
+++ b/traffic_ops/app/lib/API/Configs/ApacheTrafficServer.pm
@@ -1924,18 +1924,27 @@ sub format_parent_info {
return $text;
}
-sub parent_dot_config {
+sub ats_ver {
my $self = shift;
my $server_obj = shift;
- my $data;
-
- my $server_type = $server_obj->type->name;
my $ats_ver =
$self->db->resultset('ProfileParameter')
->search( { 'parameter.name' => 'trafficserver', 'parameter.config_file' => 'package', 'profile.id' => $server_obj->profile->id },
{ prefetch => [ 'profile', 'parameter' ] } )->get_column('parameter.value')->single();
my $ats_major_version = substr( $ats_ver, 0, 1 );
+
+ return $ats_major_version;
+}
+
+sub parent_dot_config {
+ my $self = shift;
+ my $server_obj = shift;
+ my $data;
+
+ my $server_type = $server_obj->type->name;
+
+ my $ats_major_version = $self->ats_ver( $server_obj );
my $parent_info;
my $text = $self->header_comment( $server_obj->host_name );
if ( !defined($data) ) {
@@ -2239,6 +2248,14 @@ sub build_remap_line {
$text .= " \@plugin=cacheurl.so \@pparam=" . $remap->{cacheurl_file};
}
+ if ( defined( $remap->{'param'}->{'cachekey.config'} ) ) {
+ print STDERR Dumper($remap->{'param'}->{'cachekey.config'});
+ $text .= " \@plugin=cachekey.so";
+ foreach my $ck_entry ( keys %{ $remap->{'param'}->{'cachekey.config'} } ) {
+ $text .= " \@pparam=--" . $ck_entry . "=" . $remap->{'param'}->{'cachekey.config'}->{$ck_entry};
+ }
+ }
+
# Note: should use full path here?
if ( defined( $remap->{regex_remap} ) && $remap->{regex_remap} ne "" ) {
$text .= " \@plugin=regex_remap.so \@pparam=regex_remap_" . $remap->{ds_xml_id} . ".config";