trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mitchell...@apache.org
Subject [12/14] incubator-trafficcontrol git commit: org-tenancy - comments removal
Date Mon, 10 Jul 2017 20:50:04 GMT
org-tenancy - comments removal


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

Branch: refs/heads/master
Commit: 6fbab5d40dce6a3fbbb80aa2b3fb65b433bb73e3
Parents: 80d586f
Author: nir-sopher <nirsopher@gmail.com>
Authored: Sun Apr 2 15:10:18 2017 +0300
Committer: Jeremy Mitchell <mitchell852@gmail.com>
Committed: Mon Jul 10 14:41:42 2017 -0600

----------------------------------------------------------------------
 traffic_ops/app/lib/API/Deliveryservice.pm  | 4 ++--
 traffic_ops/app/lib/API/Deliveryservice2.pm | 4 ++--
 traffic_ops/app/t/api/1.2/tenant.t          | 1 -
 3 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6fbab5d4/traffic_ops/app/lib/API/Deliveryservice.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Deliveryservice.pm b/traffic_ops/app/lib/API/Deliveryservice.pm
index 0b5fa5e..8d7f1cd 100644
--- a/traffic_ops/app/lib/API/Deliveryservice.pm
+++ b/traffic_ops/app/lib/API/Deliveryservice.pm
@@ -288,7 +288,7 @@ sub update {
 		}
 	}
 	
-	#setting tenant_id to undef if tenant is not set. TODO(nirs): remove when tenancy is no
longer optional in the API
+	#setting tenant_id to undef if tenant is not set. 
 	my $tenant_id = exists($params->{tenantId}) ? $params->{tenantId} :  undef; 
 
 	my $values = {
@@ -460,7 +460,7 @@ sub create {
 		return $self->alert( "A deliveryservice with xmlId " . $xml_id . " already exists."
);
 	}
 	
-	#setting tenant_id to the user id if tenant is not set. TODO(nirs): remove when tenancy
is no longer optional in the API
+	#setting tenant_id to the user id if tenant is not set. 
 	my $tenant_id = exists($params->{tenantId}) ? $params->{tenantId} :  $self->current_user_tenant();
 
 	my $values = {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6fbab5d4/traffic_ops/app/lib/API/Deliveryservice2.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Deliveryservice2.pm b/traffic_ops/app/lib/API/Deliveryservice2.pm
index 8b3846e..bce272a 100644
--- a/traffic_ops/app/lib/API/Deliveryservice2.pm
+++ b/traffic_ops/app/lib/API/Deliveryservice2.pm
@@ -451,11 +451,11 @@ sub _check_params {
 
 	if (defined($ds_id)) {
 		#update
-		#setting tenant_id to undef if tenant is not set. TODO(nirs): remove when tenancy is no
longer optional in the API
+		#setting tenant_id to undef if tenant is not set. 
 		$transformed_params->{tenantId} = exists($params->{tenantId}) ? $params->{tenantId}
 :  undef;
 	} else {
 		#create	
-		#setting tenant_id to the runing user if tenant is not set. TODO(nirs): remove when tenancy
is no longer optional in the API
+		#setting tenant_id to the runing user if tenant is not set. 
 		$transformed_params->{tenantId} = exists($params->{tenantId}) ? $params->{tenantId}
 :  $self->current_user_tenant();
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/6fbab5d4/traffic_ops/app/t/api/1.2/tenant.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/tenant.t b/traffic_ops/app/t/api/1.2/tenant.t
index ece6d3e..384c407 100644
--- a/traffic_ops/app/t/api/1.2/tenant.t
+++ b/traffic_ops/app/t/api/1.2/tenant.t
@@ -152,7 +152,6 @@ ok $t->delete_ok('/api/1.2/tenants/' . $tenantE_id)->status_is(200)->or(
sub { d
 ok $t->delete_ok('/api/1.2/tenants/' . $tenantD_id)->status_is(200)->or( sub { diag
$t->tx->res->content->asset->{content}; } );
 ok $t->delete_ok('/api/1.2/tenants/' . $tenantA_id)->status_is(200)->or( sub { diag
$t->tx->res->content->asset->{content}; } );
 
-#TODO(nirs): move to a "tenancy" UT when written
 #cannot delete a tenant that have a delivery-service
 ok $t->delete_ok('/api/1.2/tenants/' . 10**9)->status_is(400)
 	->json_is( "/alerts/0/text" => "Tenant 'root' is assign with delivery-services(s):
e.g. 'test-ds1-root'. Please update/delete these delivery-services and retry." )


Mime
View raw message