Skip to content

Commit

Permalink
Fix Comcast#1472: Add config parameters when adding delivery service/…
Browse files Browse the repository at this point in the history
… cloning cache server.
  • Loading branch information
xiaodzha committed May 30, 2016
1 parent 061f761 commit 90665a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion traffic_ops/app/lib/UI/DeliveryService.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ sub create {
my $type = $self->db->resultset('Type')->search( { id => $self->paramAsScalar('ds.type') } )->get_column('name')->single();
$self->header_rewrite( $new_id, $self->param('ds.profile'), $self->param('ds.xml_id'), $self->param('ds.edge_header_rewrite'), "edge", $type );
$self->header_rewrite( $new_id, $self->param('ds.profile'), $self->param('ds.xml_id'), $self->param('ds.mid_header_rewrite'), "mid", $type );
$self->regex_remap( $self->param('ds.profile'), $self->param('ds.xml_id'), $self->param('ds.regex_remap') );
$self->regex_remap( $new_id, $self->param('ds.profile'), $self->param('ds.xml_id'), $self->param('ds.regex_remap') );
$self->cacheurl( $new_id, $self->param('ds.profile'), $self->param('ds.xml_id'), $self->param('ds.cacheurl') );

##create dnssec keys for the new DS if DNSSEC is enabled for the CDN
Expand Down
4 changes: 4 additions & 0 deletions traffic_ops/app/lib/UI/DeliveryServiceServer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ sub clone_server {

my $ds = $self->db->resultset('Deliveryservice')->search( { id => $ds } )->single();
&UI::DeliveryService::header_rewrite( $self, $ds->id, $ds->profile, $ds->xml_id, $ds->edge_header_rewrite, "edge" );
&UI::DeliveryService::regex_remap( $self, $ds->id, $ds->profile, $ds->xml_id, $ds->regex_remap );
&UI::DeliveryService::cacheurl( $self, $ds->id, $ds->profile, $ds->xml_id, $ds->cacheurl );

}

Expand Down Expand Up @@ -222,6 +224,8 @@ sub assign_servers {

my $ds = $self->db->resultset('Deliveryservice')->search( { id => $dsid } )->single();
&UI::DeliveryService::header_rewrite( $self, $ds->id, $ds->profile, $ds->xml_id, $ds->edge_header_rewrite, "edge" );
&UI::DeliveryService::regex_remap( $self, $ds->id, $ds->profile, $ds->xml_id, $ds->regex_remap );
&UI::DeliveryService::cacheurl( $self, $ds->id, $ds->profile, $ds->xml_id, $ds->cacheurl );

&log( $self, "Link deliveryservice " . $ds->xml_id . " to " . $numlinks . " servers", "UICHANGE" );

Expand Down

0 comments on commit 90665a3

Please sign in to comment.