trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [incubator-trafficcontrol] 03/03: removed unimplemented routes and unneeded comments
Date Mon, 07 May 2018 18:59:13 GMT
This is an automated email from the ASF dual-hosted git repository.

rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit fa6518ecff3e0bc6a8cece1048a0d8d8ba57bb99
Author: ASchmidt <Andrew_Schmidt@comcast.com>
AuthorDate: Mon May 7 11:46:09 2018 -0600

    removed unimplemented routes and unneeded comments
---
 lib/go-tc/deliveryservice_servers.go                | 21 ---------------------
 .../deliveryservice/servers/servers.go              | 19 -------------------
 traffic_ops/traffic_ops_golang/routes.go            |  4 +---
 3 files changed, 1 insertion(+), 43 deletions(-)

diff --git a/lib/go-tc/deliveryservice_servers.go b/lib/go-tc/deliveryservice_servers.go
index bf6a3f2..aa0ec99 100644
--- a/lib/go-tc/deliveryservice_servers.go
+++ b/lib/go-tc/deliveryservice_servers.go
@@ -17,21 +17,6 @@ import "time"
    limitations under the License.
 */
 
-/*
-# get all delivery services associated with a server (from deliveryservice_server table)
-$r->get( "/api/$version/servers/:id/deliveryservices" => [ id => qr/\d+/ ] )->over(
authenticated => 1, not_ldap => 1 )->to( 'Deliveryservice#get_deliveryservices_by_serverId',
namespace => $namespace );
-
-# delivery service / server assignments
-$r->post("/api/$version/deliveryservices/:xml_id/servers")->over( authenticated =>
1, not_ldap => 1 )
-->to( 'Deliveryservice#assign_servers', namespace => $namespace );
-$r->delete("/api/$version/deliveryservice_server/:dsId/:serverId" => [ dsId => qr/\d+/,
serverId => qr/\d+/ ] )->over( authenticated => 1, not_ldap => 1 )->to( 'DeliveryServiceServer#remove_server_from_ds',
namespace => $namespace );
-	# -- DELIVERYSERVICES: SERVERS
-	# Supports ?orderby=key
-	$r->get("/api/$version/deliveryserviceserver")->over( authenticated => 1, not_ldap
=> 1 )->to( 'DeliveryServiceServer#index', namespace => $namespace );
-	$r->post("/api/$version/deliveryserviceserver")->over( authenticated => 1, not_ldap
=> 1 )->to( 'DeliveryServiceServer#assign_servers_to_ds', namespace => $namespace
);
-
-*/
-
 // DeliveryServiceServerResponse ...
 type DeliveryServiceServerResponse struct {
 	Response []DeliveryServiceServer `json:"response"`
@@ -93,9 +78,3 @@ type DssServer struct {
 	TypeID           *int                 `json:"typeId" db:"server_type_id"`
 	UpdPending       *bool                `json:"updPending" db:"upd_pending"`
 }
-
-// UnmarshalJSON implements the json.Unmarshaller interface to suppress unmarshalling for
IDNoMod
-//func (a *IDNoMod) UnmarshalJSON([]byte) error {
-	//return nil
-//}
-
diff --git a/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go b/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
index 768dab0..f212937 100644
--- a/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
+++ b/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go
@@ -46,25 +46,6 @@ func GetRefType() *TODeliveryServiceServer {
 	return &refType
 }
 
-/*
-# get all delivery services associated with a server (from deliveryservice_server table)
-$r->get( "/api/$version/servers/:id/deliveryservices" => [ id => qr/\d+/ ] )->over(
authenticated => 1, not_ldap => 1 )->to( 'Deliveryservice#get_deliveryservices_by_serverId',
namespace => $namespace );
-
-# delivery service / server assignments
-$r->post("/api/$version/deliveryservices/:xml_id/servers")->over( authenticated =>
1, not_ldap => 1 )
-->to( 'Deliveryservice#assign_servers', namespace => $namespace );
-$r->delete("/api/$version/deliveryservice_server/:dsId/:serverId" => [ dsId => qr/\d+/,
serverId => qr/\d+/ ] )->over( authenticated => 1, not_ldap => 1 )->to( 'DeliveryServiceServer#remove_server_from_ds',
namespace => $namespace );
-	# -- DELIVERYSERVICES: SERVERS
-	# Supports ?orderby=key
-	$r->get("/api/$version/deliveryserviceserver")->over( authenticated => 1, not_ldap
=> 1 )->to( 'DeliveryServiceServer#index', namespace => $namespace );
-	$r->post("/api/$version/deliveryserviceserver")->over( authenticated => 1, not_ldap
=> 1 )->to( 'DeliveryServiceServer#assign_servers_to_ds', namespace => $namespace
);
-
-		{1.2, http.MethodGet, `deliveryservices/{id}/servers$`, api.ReadHandler(dsserver.GetRefType(),
d.DB),auth.PrivLevelReadOnly, Authenticated, nil},
-		{1.2, http.MethodGet, `deliveryservices/{id}/unassigned_servers$`, api.ReadHandler(dsserver.GetRefType(),
d.DB),auth.PrivLevelReadOnly, Authenticated, nil},
-		{1.2, http.MethodGet, `deliveryservices/{id}/servers/eligible$`, api.ReadHandler(dsserver.GetRefType(),
d.DB),auth.PrivLevelReadOnly, Authenticated, nil},
-
-*/
-
 func (dss TODeliveryServiceServer) GetKeyFieldsInfo() []api.KeyFieldInfo {
 	return []api.KeyFieldInfo{{"deliveryservice", api.GetIntKey}, {"server", api.GetIntKey}}
 }
diff --git a/traffic_ops/traffic_ops_golang/routes.go b/traffic_ops/traffic_ops_golang/routes.go
index 125f7ef..5763f70 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -150,9 +150,7 @@ func Routes(d ServerData) ([]Route, []RawRoute, http.Handler, error) {
 		{1.1, http.MethodDelete, `regions/{id}$`, api.DeleteHandler(region.GetRefType(), d.DB),
auth.PrivLevelOperations, Authenticated, nil},
 
 		// get all edge servers associated with a delivery service (from deliveryservice_server
table)
-		{1.2, http.MethodGet, `deliveryservices/{id}/servers$`, api.ReadHandler(dsserver.GetRefType(),
d.DB),auth.PrivLevelReadOnly, Authenticated, nil},
-		{1.2, http.MethodGet, `deliveryservices/{id}/unassigned_servers$`, api.ReadHandler(dsserver.GetRefType(),
d.DB),auth.PrivLevelReadOnly, Authenticated, nil},
-		{1.2, http.MethodGet, `deliveryservices/{id}/servers/eligible$`, api.ReadHandler(dsserver.GetRefType(),
d.DB),auth.PrivLevelReadOnly, Authenticated, nil},
+		{1.1, http.MethodGet, `deliveryservices/{id}/servers$`, api.ReadHandler(dsserver.GetRefType(),
d.DB),auth.PrivLevelReadOnly, Authenticated, nil},
 
 		//Server
 		{1.1, http.MethodGet, `servers/checks$`, handlerToFunc(proxyHandler), 0, NoAuth, []Middleware{}},

-- 
To stop receiving notification emails like this one, please contact
rob@apache.org.

Mime
View raw message