This is an automated email from the ASF dual-hosted git repository.

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

commit ce3326291714a259a7e8d313dd25100786f01803
Author: Rawlin Peters <rawlin_pet...@comcast.com>
AuthorDate: Fri Apr 20 14:05:01 2018 -0600

    Rename 'location' to 'coordinate'
---
 CHANGELOG.md                                       |   2 +-
 docs/source/api/index.rst                          |   1 +
 .../v13/location.rst => api/v13/coordinate.rst}    | 102 ++++++++--------
 docs/source/api/{ => v13}/index.rst                |  25 ++--
 lib/go-tc/v13/{locations.go => coordinates.go}     |  44 +++----
 ...ation.sql => 20180420000000_add_coordinate.sql} |   6 +-
 .../client/v13/{location.go => coordinate.go}      |  48 ++++----
 traffic_ops/testing/api/v13/coordinates_test.go    | 129 +++++++++++++++++++++
 traffic_ops/testing/api/v13/locations_test.go      | 129 ---------------------
 traffic_ops/testing/api/v13/tc-fixtures.json       |   6 +-
 traffic_ops/testing/api/v13/traffic_control.go     |   2 +-
 .../locations.go => coordinate/coordinates.go}     | 120 +++++++++----------
 .../coordinates_test.go}                           |  54 ++++-----
 traffic_ops/traffic_ops_golang/routes.go           |  17 ++-
 14 files changed, 341 insertions(+), 344 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 13bbbb3..7ad7d75 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,7 +22,7 @@ The format is based on [Keep a 
Changelog](http://keepachangelog.com/en/1.0.0/).
   - /api/1.3/deliveryservice_requests `(GET,POST,PUT,DELETE)`
   - /api/1.3/divisions `(GET,POST,PUT,DELETE)`
   - /api/1.3/hwinfos `(GET)`
-  - /api/1.3/locations `(GET,POST,PUT,DELETE)`
+  - /api/1.3/coordinates `(GET,POST,PUT,DELETE)`
   - /api/1.3/parameters `(GET,POST,PUT,DELETE)`
   - /api/1.3/profileparameters `(GET,POST,PUT,DELETE)`
   - /api/1.3/phys_locations `(GET,POST,PUT,DELETE)`
diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst
index cd619bc..6cdf32e 100644
--- a/docs/source/api/index.rst
+++ b/docs/source/api/index.rst
@@ -24,4 +24,5 @@ A guide to external RESTful APIs for Traffic Ops
   routes
   v11/index
   v12/index
+  v13/index
   
diff --git a/docs/source/development/traffic_ops_api/v13/location.rst 
b/docs/source/api/v13/coordinate.rst
similarity index 83%
rename from docs/source/development/traffic_ops_api/v13/location.rst
rename to docs/source/api/v13/coordinate.rst
index 807dad3..5a18e50 100644
--- a/docs/source/development/traffic_ops_api/v13/location.rst
+++ b/docs/source/api/v13/coordinate.rst
@@ -13,17 +13,17 @@
 .. limitations under the License.
 .. 
 
-.. _to-api-v13-location:
+.. _to-api-v13-coordinate:
 
-Location
-========
+Coordinate
+==========
 
-.. _to-api-v13-locations-route:
+.. _to-api-v13-coordinates-route:
 
-/api/1.3/locations
-++++++++++++++++++
+/api/1.3/coordinates
+++++++++++++++++++++
 
-**GET /api/1.3/locations**
+**GET /api/1.3/coordinates**
 
   Authentication Required: Yes
 
@@ -34,9 +34,9 @@ Location
   
+-----------------+----------+---------------------------------------------------+
   | Name            | Required | Description                                   
    |
   
+=================+==========+===================================================+
-  | ``id``          | no       | Filter Locations by ID.                       
    |
+  | ``id``          | no       | Filter Coordinates by ID.                     
    |
   
+-----------------+----------+---------------------------------------------------+
-  | ``name``        | no       | Filter Locations by name.                     
    |
+  | ``name``        | no       | Filter Coordinates by name.                   
    |
   
+-----------------+----------+---------------------------------------------------+
 
   **Response Properties**
@@ -44,15 +44,15 @@ Location
   
+-----------------------------------+--------+--------------------------------------------------------------------------+
   | Parameter                         | Type   | Description                   
                                           |
   
+===================================+========+==========================================================================+
-  | ``id``                            | int    | Local unique identifier for 
the Location                                 |
+  | ``id``                            | int    | Local unique identifier for 
the Coordinate                               |
   
+-----------------------------------+--------+--------------------------------------------------------------------------+
   | ``lastUpdated``                   | string | The Time / Date this entry 
was last updated                              |
   
+-----------------------------------+--------+--------------------------------------------------------------------------+
-  | ``latitude``                      | float  | Latitude of the Location      
                                           |
+  | ``latitude``                      | float  | Latitude of the Coordinate    
                                           |
   
+-----------------------------------+--------+--------------------------------------------------------------------------+
-  | ``longitude``                     | float  | Longitude of the Location     
                                           |
+  | ``longitude``                     | float  | Longitude of the Coordinate   
                                           |
   
+-----------------------------------+--------+--------------------------------------------------------------------------+
-  | ``name``                          | string | The name of the Location      
                                           |
+  | ``name``                          | string | The name of the Coordinate    
                                           |
   
+-----------------------------------+--------+--------------------------------------------------------------------------+
 
   **Response Example** ::
@@ -64,23 +64,23 @@ Location
            "lastUpdated": "2012-09-25 20:27:28",
            "latitude": 0,
            "longitude": 0,
-           "name": "dc-chicago",
+           "name": "dc-chicago"
         },
         {
            "id": 22,
            "lastUpdated": "2012-09-25 20:27:28",
            "latitude": 0,
            "longitude": 0,
-           "name": "dc-chicago-1",
+           "name": "dc-chicago-1"
         }
-     ],
+     ]
     }
 
 |
 
-**POST /api/1.3/locations**
+**POST /api/1.3/coordinates**
 
-  Create Location.
+  Create Coordinate.
 
   Authentication Required: Yes
 
@@ -91,19 +91,19 @@ Location
   
+---------------------------------+----------+-------------------------------------------------------------------+
   | Name                            | Required | Description                   
                                    |
   
+=================================+==========+===================================================================+
-  | ``name``                        | yes      | The name of the Location 
entry                                    |
+  | ``name``                        | yes      | The name of the Coordinate 
entry                                  |
   
+---------------------------------+----------+-------------------------------------------------------------------+
-  | ``latitude``                    | no       | Latitude of the Location      
                                    |
+  | ``latitude``                    | no       | Latitude of the Coordinate    
                                    |
   
+---------------------------------+----------+-------------------------------------------------------------------+
-  | ``longitude``                   | no       | Longitude of the Location     
                                    |
+  | ``longitude``                   | no       | Longitude of the Coordinate   
                                    |
   
+---------------------------------+----------+-------------------------------------------------------------------+
 
   **Request Example** ::
 
     {
-        "name": "my_location",
+        "name": "my_coordinate",
         "latitude": 1.2,
-        "longitude": 4.5,
+        "longitude": 4.5
     }
 
   **Response Properties**
@@ -111,13 +111,13 @@ Location
   
+------------------------------------+--------+-------------------------------------------------------------------+
   | Parameter                          | Type   | Description                  
                                     |
   
+====================================+========+===================================================================+
-  | ``id``                             | int    | The id of the Location       
                                     |
+  | ``id``                             | int    | The id of the Coordinate     
                                     |
   
+------------------------------------+--------+-------------------------------------------------------------------+
-  | ``name``                           | string | The name of the Location     
                                     |
+  | ``name``                           | string | The name of the Coordinate   
                                     |
   
+------------------------------------+--------+-------------------------------------------------------------------+
-  | ``latitude``                       | float  | Latitude of the Location     
                                     |
+  | ``latitude``                       | float  | Latitude of the Coordinate   
                                     |
   
+------------------------------------+--------+-------------------------------------------------------------------+
-  | ``longitude``                      | float  | Longitude of the Location    
                                     |
+  | ``longitude``                      | float  | Longitude of the Coordinate  
                                     |
   
+------------------------------------+--------+-------------------------------------------------------------------+
   | ``lastUpdated``                    | string | The Time / Date this entry 
was last updated                       |
   
+------------------------------------+--------+-------------------------------------------------------------------+
@@ -134,23 +134,23 @@ Location
         "alerts": [
                   {
                           "level": "success",
-                          "text": "location was created"
+                          "text": "coordinate was created"
                   }
           ],
         "response": {
             'longitude' : 4.5,
             'lastUpdated' : '2016-01-25 13:55:30',
-            'name' : 'my_location',
+            'name' : 'my_coordinate',
             'latitude' : 1.2,
-            'id' : 1,
+            'id' : 1
         }
     }
    
 |
 
-**PUT /api/1.3/locations**
+**PUT /api/1.3/coordinates**
 
-  Update location.
+  Update coordinate.
 
   Authentication Required: Yes
 
@@ -161,7 +161,7 @@ Location
   +------+----------+------------------------------------+
   | Name | Required | Description                        |
   +======+==========+====================================+
-  | id   | yes      | The id of the location to edit.    |
+  | id   | yes      | The id of the coordinate to edit.  |
   +------+----------+------------------------------------+
 
   **Request Parameters**
@@ -169,22 +169,22 @@ Location
   
+---------------------------------+----------+-------------------------------------------------------------------+
   | Name                            | Required | Description                   
                                    |
   
+=================================+==========+===================================================================+
-  | ``id``                          | yes      | The id of the Location        
                                    |
+  | ``id``                          | yes      | The id of the Coordinate      
                                    |
   
+---------------------------------+----------+-------------------------------------------------------------------+
-  | ``name``                        | yes      | The name of the Location 
entry                                    |
+  | ``name``                        | yes      | The name of the Coordinate 
entry                                  |
   
+---------------------------------+----------+-------------------------------------------------------------------+
-  | ``latitude``                    | no       | Latitude of the Location      
                                    |
+  | ``latitude``                    | no       | Latitude of the Coordinate    
                                    |
   
+---------------------------------+----------+-------------------------------------------------------------------+
-  | ``longitude``                   | no       | Longitude of the Location     
                                    |
+  | ``longitude``                   | no       | Longitude of the Coordinate   
                                    |
   
+---------------------------------+----------+-------------------------------------------------------------------+
 
   **Request Example** ::
 
     {
         "id": 1,
-        "name": "my_location",
+        "name": "my_coordinate",
         "latitude": 12,
-        "longitude": 45,
+        "longitude": 45
     }
 
   **Response Properties**
@@ -192,13 +192,13 @@ Location
   
+------------------------------------+--------+-------------------------------------------------------------------+
   | Parameter                          | Type   | Description                  
                                     |
   
+====================================+========+===================================================================+
-  | ``id``                             | int    | The id of the Location       
                                     |
+  | ``id``                             | int    | The id of the Coordinate     
                                     |
   
+------------------------------------+--------+-------------------------------------------------------------------+
-  | ``name``                           | string | The name of the Location     
                                     |
+  | ``name``                           | string | The name of the Coordinate   
                                     |
   
+------------------------------------+--------+-------------------------------------------------------------------+
-  | ``latitude``                       | float  | Latitude of the Location     
                                     |
+  | ``latitude``                       | float  | Latitude of the Coordinate   
                                     |
   
+------------------------------------+--------+-------------------------------------------------------------------+
-  | ``longitude``                      | float  | Longitude of the Location    
                                     |
+  | ``longitude``                      | float  | Longitude of the Coordinate  
                                     |
   
+------------------------------------+--------+-------------------------------------------------------------------+
   | ``lastUpdated``                    | string | The Time / Date this entry 
was last updated                       |
   
+------------------------------------+--------+-------------------------------------------------------------------+
@@ -215,23 +215,23 @@ Location
         "alerts": [
                   {
                           "level": "success",
-                          "text": "location was updated"
+                          "text": "coordinate was updated"
                   }
           ],
         "response": {
             'longitude' : 45,
             'lastUpdated' : '2016-01-25 13:55:30',
-            'name' : 'my_location',
+            'name' : 'my_coordinate',
             'latitude' : 12,
-            'id' : 1,
+            'id' : 1
         }
     }
 
 |
 
-**DELETE /api/1.3/locations**
+**DELETE /api/1.3/coordinates**
 
-  Delete location.
+  Delete coordinate.
 
   Authentication Required: Yes
 
@@ -242,7 +242,7 @@ Location
   +------+----------+--------------------------------------+
   | Name | Required | Description                          |
   +======+==========+======================================+
-  | id   | yes      | The id of the location to delete.    |
+  | id   | yes      | The id of the coordinate to delete.  |
   +------+----------+--------------------------------------+
   
   **Response Properties**
@@ -263,9 +263,9 @@ Location
           "alerts": [
                     {
                             "level": "success",
-                            "text": "location was deleted"
+                            "text": "coordinate was deleted"
                     }
-            ],
+            ]
     }
 
 |
diff --git a/docs/source/api/index.rst b/docs/source/api/v13/index.rst
similarity index 79%
copy from docs/source/api/index.rst
copy to docs/source/api/v13/index.rst
index cd619bc..4624560 100644
--- a/docs/source/api/index.rst
+++ b/docs/source/api/v13/index.rst
@@ -1,27 +1,24 @@
-.. 
-.. 
+..
+..
 .. Licensed under the Apache License, Version 2.0 (the "License");
 .. you may not use this file except in compliance with the License.
 .. You may obtain a copy of the License at
-.. 
+..
 ..     http://www.apache.org/licenses/LICENSE-2.0
-.. 
+..
 .. Unless required by applicable law or agreed to in writing, software
 .. distributed under the License is distributed on an "AS IS" BASIS,
 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 .. See the License for the specific language governing permissions and
 .. limitations under the License.
-.. 
+..
 
-APIs
-****
-A guide to external RESTful APIs for Traffic Ops
+
+API 1.3 Reference
+*****************
+Traffic Ops API V1.3
 
 .. toctree::
-  :maxdepth: 2
+  :maxdepth: 1
 
-  traffic_ops_api
-  routes
-  v11/index
-  v12/index
-  
+  coordinate
diff --git a/lib/go-tc/v13/locations.go b/lib/go-tc/v13/coordinates.go
similarity index 69%
rename from lib/go-tc/v13/locations.go
rename to lib/go-tc/v13/coordinates.go
index 282c487..bb66982 100644
--- a/lib/go-tc/v13/locations.go
+++ b/lib/go-tc/v13/coordinates.go
@@ -21,43 +21,43 @@ import tc 
"github.com/apache/incubator-trafficcontrol/lib/go-tc"
  * under the License.
  */
 
-// A List of Locations Response
-// swagger:response LocationsResponse
+// A List of Coordinates Response
+// swagger:response CoordinatesResponse
 // in: body
-type LocationsResponse struct {
+type CoordinatesResponse struct {
        // in: body
-       Response []Location `json:"response"`
+       Response []Coordinate `json:"response"`
 }
 
-// A Single Location Response for Update and Create to depict what changed
-// swagger:response LocationResponse
+// A Single Coordinate Response for Update and Create to depict what changed
+// swagger:response CoordinateResponse
 // in: body
-type LocationResponse struct {
+type CoordinateResponse struct {
        // in: body
-       Response Location `json:"response"`
+       Response Coordinate `json:"response"`
 }
 
-// Location ...
-type Location struct {
+// Coordinate ...
+type Coordinate struct {
 
-       // The Location to retrieve
+       // The Coordinate to retrieve
        //
-       // ID of the Location
+       // ID of the Coordinate
        //
        // required: true
        ID int `json:"id" db:"id"`
 
-       // Name of the Location
+       // Name of the Coordinate
        //
        // required: true
        Name string `json:"name" db:"name"`
 
-       // the latitude of the Location
+       // the latitude of the Coordinate
        //
        // required: true
        Latitude float64 `json:"latitude" db:"latitude"`
 
-       // the latitude of the Location
+       // the latitude of the Coordinate
        //
        // required: true
        Longitude float64 `json:"longitude" db:"longitude"`
@@ -67,27 +67,27 @@ type Location struct {
        LastUpdated tc.TimeNoMod `json:"lastUpdated" db:"last_updated"`
 }
 
-// LocationNullable ...
-type LocationNullable struct {
+// CoordinateNullable ...
+type CoordinateNullable struct {
 
-       // The Location to retrieve
+       // The Coordinate to retrieve
        //
-       // ID of the Location
+       // ID of the Coordinate
        //
        // required: true
        ID *int `json:"id" db:"id"`
 
-       // Name of the Location
+       // Name of the Coordinate
        //
        // required: true
        Name *string `json:"name" db:"name"`
 
-       // the latitude of the Location
+       // the latitude of the Coordinate
        //
        // required: true
        Latitude *float64 `json:"latitude" db:"latitude"`
 
-       // the latitude of the Location
+       // the latitude of the Coordinate
        //
        // required: true
        Longitude *float64 `json:"longitude" db:"longitude"`
diff --git a/traffic_ops/app/db/migrations/20180409000000_add_location.sql 
b/traffic_ops/app/db/migrations/20180420000000_add_coordinate.sql
similarity index 83%
rename from traffic_ops/app/db/migrations/20180409000000_add_location.sql
rename to traffic_ops/app/db/migrations/20180420000000_add_coordinate.sql
index 1a259be..89a0f66 100644
--- a/traffic_ops/app/db/migrations/20180409000000_add_location.sql
+++ b/traffic_ops/app/db/migrations/20180420000000_add_coordinate.sql
@@ -16,7 +16,7 @@
 -- +goose Up
 -- SQL in section 'Up' is executed when this migration is applied
 
-CREATE TABLE location (
+CREATE TABLE coordinate (
     id bigserial primary key NOT NULL,
     name text UNIQUE NOT NULL,
     latitude numeric NOT NULL DEFAULT 0.0,
@@ -24,8 +24,8 @@ CREATE TABLE location (
     last_updated timestamp WITH time zone NOT NULL DEFAULT now()
 );
 
-CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON location FOR EACH 
ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
+CREATE TRIGGER on_update_current_timestamp BEFORE UPDATE ON coordinate FOR 
EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_last_updated();
 
 -- +goose Down
 -- SQL section 'Down' is executed when this migration is rolled back
-DROP TABLE location;
+DROP TABLE coordinate;
diff --git a/traffic_ops/client/v13/location.go 
b/traffic_ops/client/v13/coordinate.go
similarity index 67%
rename from traffic_ops/client/v13/location.go
rename to traffic_ops/client/v13/coordinate.go
index b54bade..3dc8ea1 100644
--- a/traffic_ops/client/v13/location.go
+++ b/traffic_ops/client/v13/coordinate.go
@@ -26,19 +26,19 @@ import (
 )
 
 const (
-       API_v13_Locations = "/api/1.3/locations"
+       API_v13_Coordinates = "/api/1.3/coordinates"
 )
 
-// Create a Location
-func (to *Session) CreateLocation(location v13.Location) (tc.Alerts, ReqInf, 
error) {
+// Create a Coordinate
+func (to *Session) CreateCoordinate(coordinate v13.Coordinate) (tc.Alerts, 
ReqInf, error) {
 
        var remoteAddr net.Addr
-       reqBody, err := json.Marshal(location)
+       reqBody, err := json.Marshal(coordinate)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {
                return tc.Alerts{}, reqInf, err
        }
-       resp, remoteAddr, err := to.request(http.MethodPost, API_v13_Locations, 
reqBody)
+       resp, remoteAddr, err := to.request(http.MethodPost, 
API_v13_Coordinates, reqBody)
        if err != nil {
                return tc.Alerts{}, reqInf, err
        }
@@ -48,16 +48,16 @@ func (to *Session) CreateLocation(location v13.Location) 
(tc.Alerts, ReqInf, err
        return alerts, reqInf, nil
 }
 
-// Update a Location by ID
-func (to *Session) UpdateLocationByID(id int, location v13.Location) 
(tc.Alerts, ReqInf, error) {
+// Update a Coordinate by ID
+func (to *Session) UpdateCoordinateByID(id int, coordinate v13.Coordinate) 
(tc.Alerts, ReqInf, error) {
 
        var remoteAddr net.Addr
-       reqBody, err := json.Marshal(location)
+       reqBody, err := json.Marshal(coordinate)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {
                return tc.Alerts{}, reqInf, err
        }
-       route := fmt.Sprintf("%s?id=%d", API_v13_Locations, id)
+       route := fmt.Sprintf("%s?id=%d", API_v13_Coordinates, id)
        resp, remoteAddr, err := to.request(http.MethodPut, route, reqBody)
        if err != nil {
                return tc.Alerts{}, reqInf, err
@@ -68,23 +68,23 @@ func (to *Session) UpdateLocationByID(id int, location 
v13.Location) (tc.Alerts,
        return alerts, reqInf, nil
 }
 
-// Returns a list of Locations
-func (to *Session) GetLocations() ([]v13.Location, ReqInf, error) {
-       resp, remoteAddr, err := to.request(http.MethodGet, API_v13_Locations, 
nil)
+// Returns a list of Coordinates
+func (to *Session) GetCoordinates() ([]v13.Coordinate, ReqInf, error) {
+       resp, remoteAddr, err := to.request(http.MethodGet, 
API_v13_Coordinates, nil)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {
                return nil, reqInf, err
        }
        defer resp.Body.Close()
 
-       var data v13.LocationsResponse
+       var data v13.CoordinatesResponse
        err = json.NewDecoder(resp.Body).Decode(&data)
        return data.Response, reqInf, nil
 }
 
-// GET a Location by the Location id
-func (to *Session) GetLocationByID(id int) ([]v13.Location, ReqInf, error) {
-       route := fmt.Sprintf("%s?id=%d", API_v13_Locations, id)
+// GET a Coordinate by the Coordinate id
+func (to *Session) GetCoordinateByID(id int) ([]v13.Coordinate, ReqInf, error) 
{
+       route := fmt.Sprintf("%s?id=%d", API_v13_Coordinates, id)
        resp, remoteAddr, err := to.request(http.MethodGet, route, nil)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {
@@ -92,7 +92,7 @@ func (to *Session) GetLocationByID(id int) ([]v13.Location, 
ReqInf, error) {
        }
        defer resp.Body.Close()
 
-       var data v13.LocationsResponse
+       var data v13.CoordinatesResponse
        if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
                return nil, reqInf, err
        }
@@ -100,9 +100,9 @@ func (to *Session) GetLocationByID(id int) ([]v13.Location, 
ReqInf, error) {
        return data.Response, reqInf, nil
 }
 
-// GET a Location by the Location name
-func (to *Session) GetLocationByName(name string) ([]v13.Location, ReqInf, 
error) {
-       url := fmt.Sprintf("%s?name=%s", API_v13_Locations, name)
+// GET a Coordinate by the Coordinate name
+func (to *Session) GetCoordinateByName(name string) ([]v13.Coordinate, ReqInf, 
error) {
+       url := fmt.Sprintf("%s?name=%s", API_v13_Coordinates, name)
        resp, remoteAddr, err := to.request(http.MethodGet, url, nil)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {
@@ -110,7 +110,7 @@ func (to *Session) GetLocationByName(name string) 
([]v13.Location, ReqInf, error
        }
        defer resp.Body.Close()
 
-       var data v13.LocationsResponse
+       var data v13.CoordinatesResponse
        if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
                return nil, reqInf, err
        }
@@ -118,9 +118,9 @@ func (to *Session) GetLocationByName(name string) 
([]v13.Location, ReqInf, error
        return data.Response, reqInf, nil
 }
 
-// DELETE a Location by ID
-func (to *Session) DeleteLocationByID(id int) (tc.Alerts, ReqInf, error) {
-       route := fmt.Sprintf("%s?id=%d", API_v13_Locations, id)
+// DELETE a Coordinate by ID
+func (to *Session) DeleteCoordinateByID(id int) (tc.Alerts, ReqInf, error) {
+       route := fmt.Sprintf("%s?id=%d", API_v13_Coordinates, id)
        resp, remoteAddr, err := to.request(http.MethodDelete, route, nil)
        reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: 
remoteAddr}
        if err != nil {
diff --git a/traffic_ops/testing/api/v13/coordinates_test.go 
b/traffic_ops/testing/api/v13/coordinates_test.go
new file mode 100644
index 0000000..708bc98
--- /dev/null
+++ b/traffic_ops/testing/api/v13/coordinates_test.go
@@ -0,0 +1,129 @@
+package v13
+
+/*
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+import (
+       "testing"
+
+       "github.com/apache/incubator-trafficcontrol/lib/go-log"
+       tc "github.com/apache/incubator-trafficcontrol/lib/go-tc"
+)
+
+func TestCoordinates(t *testing.T) {
+       CreateTestCoordinates(t)
+       GetTestCoordinates(t)
+       UpdateTestCoordinates(t)
+       DeleteTestCoordinates(t)
+}
+
+func CreateTestCoordinates(t *testing.T) {
+       failed := false
+
+       for _, coord := range testData.Coordinates {
+
+               _, _, err := TOSession.CreateCoordinate(coord)
+               if err != nil {
+                       t.Errorf("could not CREATE coordinates: %v\n", err)
+                       failed = true
+               }
+       }
+       if !failed {
+               log.Debugln("CreateTestCoordinates() PASSED: ")
+       }
+}
+
+func GetTestCoordinates(t *testing.T) {
+       failed := false
+       for _, coord := range testData.Coordinates {
+               resp, _, err := TOSession.GetCoordinateByName(coord.Name)
+               if err != nil {
+                       t.Errorf("cannot GET Coordinate: %v - %v\n", err, resp)
+                       failed = true
+               }
+       }
+       if !failed {
+               log.Debugln("GetTestCoordinates() PASSED: ")
+       }
+}
+
+func UpdateTestCoordinates(t *testing.T) {
+       failed := false
+       firstCoord := testData.Coordinates[0]
+       resp, _, err := TOSession.GetCoordinateByName(firstCoord.Name)
+       if err != nil {
+               t.Errorf("cannot GET Coordinate by name: %v - %v\n", 
firstCoord.Name, err)
+               failed = true
+       }
+       coord := resp[0]
+       expectedLat := 12.34
+       coord.Latitude = expectedLat
+
+       var alert tc.Alerts
+       alert, _, err = TOSession.UpdateCoordinateByID(coord.ID, coord)
+       if err != nil {
+               t.Errorf("cannot UPDATE Coordinate by id: %v - %v\n", err, 
alert)
+               failed = true
+       }
+
+       // Retrieve the Coordinate to check Coordinate name got updated
+       resp, _, err = TOSession.GetCoordinateByID(coord.ID)
+       if err != nil {
+               t.Errorf("cannot GET Coordinate by name: '$%s', %v\n", 
firstCoord.Name, err)
+               failed = true
+       }
+       coord = resp[0]
+       if coord.Latitude != expectedLat {
+               t.Errorf("results do not match actual: %s, expected: %f\n", 
coord.Name, expectedLat)
+       }
+       if !failed {
+               log.Debugln("UpdateTestCoordinates() PASSED: ")
+       }
+}
+
+func DeleteTestCoordinates(t *testing.T) {
+       failed := false
+
+       for _, coord := range testData.Coordinates {
+               // Retrieve the Coordinate by name so we can get the id for the 
Update
+               resp, _, err := TOSession.GetCoordinateByName(coord.Name)
+               if err != nil {
+                       t.Errorf("cannot GET Coordinate by name: %v - %v\n", 
coord.Name, err)
+                       failed = true
+               }
+               if len(resp) > 0 {
+                       respCoord := resp[0]
+                       _, _, err := 
TOSession.DeleteCoordinateByID(respCoord.ID)
+                       if err != nil {
+                               t.Errorf("cannot DELETE Coordinate by name: 
'%s' %v\n", respCoord.Name, err)
+                               failed = true
+                       }
+                       // Retrieve the Coordinate to see if it got deleted
+                       coords, _, err := 
TOSession.GetCoordinateByName(coord.Name)
+                       if err != nil {
+                               t.Errorf("error deleting Coordinate name: 
%s\n", err.Error())
+                               failed = true
+                       }
+                       if len(coords) > 0 {
+                               t.Errorf("expected Coordinate name: %s to be 
deleted\n", coord.Name)
+                               failed = true
+                       }
+               }
+       }
+
+       if !failed {
+               log.Debugln("DeleteTestCoordinates() PASSED: ")
+       }
+}
diff --git a/traffic_ops/testing/api/v13/locations_test.go 
b/traffic_ops/testing/api/v13/locations_test.go
deleted file mode 100644
index 669e6ce..0000000
--- a/traffic_ops/testing/api/v13/locations_test.go
+++ /dev/null
@@ -1,129 +0,0 @@
-package v13
-
-/*
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-import (
-       "testing"
-
-       "github.com/apache/incubator-trafficcontrol/lib/go-log"
-       tc "github.com/apache/incubator-trafficcontrol/lib/go-tc"
-)
-
-func TestLocations(t *testing.T) {
-       CreateTestLocations(t)
-       GetTestLocations(t)
-       UpdateTestLocations(t)
-       DeleteTestLocations(t)
-}
-
-func CreateTestLocations(t *testing.T) {
-       failed := false
-
-       for _, loc := range testData.Locations {
-
-               _, _, err := TOSession.CreateLocation(loc)
-               if err != nil {
-                       t.Errorf("could not CREATE locations: %v\n", err)
-                       failed = true
-               }
-       }
-       if !failed {
-               log.Debugln("CreateTestLocations() PASSED: ")
-       }
-}
-
-func GetTestLocations(t *testing.T) {
-       failed := false
-       for _, loc := range testData.Locations {
-               resp, _, err := TOSession.GetLocationByName(loc.Name)
-               if err != nil {
-                       t.Errorf("cannot GET Location: %v - %v\n", err, resp)
-                       failed = true
-               }
-       }
-       if !failed {
-               log.Debugln("GetTestLocations() PASSED: ")
-       }
-}
-
-func UpdateTestLocations(t *testing.T) {
-       failed := false
-       firstLoc := testData.Locations[0]
-       resp, _, err := TOSession.GetLocationByName(firstLoc.Name)
-       if err != nil {
-               t.Errorf("cannot GET Location by name: %v - %v\n", 
firstLoc.Name, err)
-               failed = true
-       }
-       loc := resp[0]
-       expectedName := "blah"
-       loc.Name = expectedName
-
-       var alert tc.Alerts
-       alert, _, err = TOSession.UpdateLocationByID(loc.ID, loc)
-       if err != nil {
-               t.Errorf("cannot UPDATE Location by id: %v - %v\n", err, alert)
-               failed = true
-       }
-
-       // Retrieve the Location to check Location name got updated
-       resp, _, err = TOSession.GetLocationByID(loc.ID)
-       if err != nil {
-               t.Errorf("cannot GET Location by name: '$%s', %v\n", 
firstLoc.Name, err)
-               failed = true
-       }
-       loc = resp[0]
-       if loc.Name != expectedName {
-               t.Errorf("results do not match actual: %s, expected: %s\n", 
loc.Name, expectedName)
-       }
-       if !failed {
-               log.Debugln("UpdateTestLocations() PASSED: ")
-       }
-}
-
-func DeleteTestLocations(t *testing.T) {
-       failed := false
-
-       for _, loc := range testData.Locations {
-               // Retrieve the Location by name so we can get the id for the 
Update
-               resp, _, err := TOSession.GetLocationByName(loc.Name)
-               if err != nil {
-                       t.Errorf("cannot GET Location by name: %v - %v\n", 
loc.Name, err)
-                       failed = true
-               }
-               if len(resp) > 0 {
-                       respLoc := resp[0]
-                       _, _, err := TOSession.DeleteLocationByID(respLoc.ID)
-                       if err != nil {
-                               t.Errorf("cannot DELETE Location by name: '%s' 
%v\n", respLoc.Name, err)
-                               failed = true
-                       }
-                       // Retrieve the Location to see if it got deleted
-                       locs, _, err := TOSession.GetLocationByName(loc.Name)
-                       if err != nil {
-                               t.Errorf("error deleting Location name: %s\n", 
err.Error())
-                               failed = true
-                       }
-                       if len(locs) > 0 {
-                               t.Errorf("expected Location name: %s to be 
deleted\n", loc.Name)
-                               failed = true
-                       }
-               }
-       }
-
-       if !failed {
-               log.Debugln("DeleteTestLocations() PASSED: ")
-       }
-}
diff --git a/traffic_ops/testing/api/v13/tc-fixtures.json 
b/traffic_ops/testing/api/v13/tc-fixtures.json
index c4fbbd7..cecc13e 100644
--- a/traffic_ops/testing/api/v13/tc-fixtures.json
+++ b/traffic_ops/testing/api/v13/tc-fixtures.json
@@ -183,16 +183,16 @@
             "name": "division2"
         }
     ],
-    "locations": [
+    "coordinates": [
         {
             "latitude": 1.1,
             "longitude": 2.2,
-            "name": "location1"
+            "name": "coordinate1"
         },
         {
             "latitude": 3.3,
             "longitude": 4.4,
-            "name": "location2"
+            "name": "coordinate2"
         }
     ],
     "parameters": [
diff --git a/traffic_ops/testing/api/v13/traffic_control.go 
b/traffic_ops/testing/api/v13/traffic_control.go
index 0c50a1c..5e01a4a 100644
--- a/traffic_ops/testing/api/v13/traffic_control.go
+++ b/traffic_ops/testing/api/v13/traffic_control.go
@@ -29,7 +29,7 @@ type TrafficControl struct {
        DeliveryServiceRequestComments []v12.DeliveryServiceRequestComment 
`json:"deliveryServiceRequestComments"`
        DeliveryServices               []v12.DeliveryService               
`json:"deliveryservices"`
        Divisions                      []v12.Division                      
`json:"divisions"`
-       Locations                      []v13.Location                      
`json:"locations"`
+       Coordinates                    []v13.Coordinate                    
`json:"coordinates"`
        Profiles                       []v13.Profile                       
`json:"profiles"`
        Parameters                     []v12.Parameter                     
`json:"parameters"`
        ProfileParameters              []v13.ProfileParameter              
`json:"profileParameters"`
diff --git a/traffic_ops/traffic_ops_golang/location/locations.go 
b/traffic_ops/traffic_ops_golang/coordinate/coordinates.go
similarity index 69%
rename from traffic_ops/traffic_ops_golang/location/locations.go
rename to traffic_ops/traffic_ops_golang/coordinate/coordinates.go
index cab72d8..331e48e 100644
--- a/traffic_ops/traffic_ops_golang/location/locations.go
+++ b/traffic_ops/traffic_ops_golang/coordinate/coordinates.go
@@ -1,4 +1,4 @@
-package location
+package coordinate
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -38,47 +38,47 @@ import (
 )
 
 //we need a type alias to define functions on
-type TOLocation v13.LocationNullable
+type TOCoordinate v13.CoordinateNullable
 
 //the refType is passed into the handlers where a copy of its type is used to 
decode the json.
-var refType = TOLocation{}
+var refType = TOCoordinate{}
 
-func GetRefType() *TOLocation {
+func GetRefType() *TOCoordinate {
        return &refType
 }
 
-func (location TOLocation) GetKeyFieldsInfo() []api.KeyFieldInfo {
+func (coordinate TOCoordinate) GetKeyFieldsInfo() []api.KeyFieldInfo {
        return []api.KeyFieldInfo{{"id", api.GetIntKey}}
 }
 
 //Implementation of the Identifier, Validator interface functions
-func (location TOLocation) GetKeys() (map[string]interface{}, bool) {
-       if location.ID == nil {
+func (coordinate TOCoordinate) GetKeys() (map[string]interface{}, bool) {
+       if coordinate.ID == nil {
                return map[string]interface{}{"id": 0}, false
        }
-       return map[string]interface{}{"id": *location.ID}, true
+       return map[string]interface{}{"id": *coordinate.ID}, true
 }
 
-func (location TOLocation) GetAuditName() string {
-       if location.Name != nil {
-               return *location.Name
+func (coordinate TOCoordinate) GetAuditName() string {
+       if coordinate.Name != nil {
+               return *coordinate.Name
        }
-       if location.ID != nil {
-               return strconv.Itoa(*location.ID)
+       if coordinate.ID != nil {
+               return strconv.Itoa(*coordinate.ID)
        }
        return "0"
 }
 
-func (location TOLocation) GetType() string {
-       return "location"
+func (coordinate TOCoordinate) GetType() string {
+       return "coordinate"
 }
 
-func (location *TOLocation) SetKeys(keys map[string]interface{}) {
+func (coordinate *TOCoordinate) SetKeys(keys map[string]interface{}) {
        i, _ := keys["id"].(int) //this utilizes the non panicking type 
assertion, if the thrown away ok variable is false i will be the zero of the 
type, 0 here.
-       location.ID = &i
+       coordinate.ID = &i
 }
 
-func isValidLocationChar(r rune) bool {
+func isValidCoordinateChar(r rune) bool {
        if r >= 'a' && r <= 'z' {
                return true
        }
@@ -94,33 +94,33 @@ func isValidLocationChar(r rune) bool {
        return false
 }
 
-// IsValidLocationName returns true if the name contains only characters valid 
for a Location name
-func IsValidLocationName(str string) bool {
-       i := strings.IndexFunc(str, func(r rune) bool { return 
!isValidLocationChar(r) })
+// IsValidCoordinateName returns true if the name contains only characters 
valid for a Coordinate name
+func IsValidCoordinateName(str string) bool {
+       i := strings.IndexFunc(str, func(r rune) bool { return 
!isValidCoordinateChar(r) })
        return i == -1
 }
 
 // Validate fulfills the api.Validator interface
-func (location TOLocation) Validate(db *sqlx.DB) []error {
-       validName := validation.NewStringRule(IsValidLocationName, "invalid 
characters found - Use alphanumeric . or - or _ .")
+func (coordinate TOCoordinate) Validate(db *sqlx.DB) []error {
+       validName := validation.NewStringRule(IsValidCoordinateName, "invalid 
characters found - Use alphanumeric . or - or _ .")
        latitudeErr := "Must be a floating point number within the range +-90"
        longitudeErr := "Must be a floating point number within the range +-180"
        errs := validation.Errors{
-               "name":      validation.Validate(location.Name, 
validation.Required, validName),
-               "latitude":  validation.Validate(location.Latitude, 
validation.Min(-90.0).Error(latitudeErr), 
validation.Max(90.0).Error(latitudeErr)),
-               "longitude": validation.Validate(location.Longitude, 
validation.Min(-180.0).Error(longitudeErr), 
validation.Max(180.0).Error(longitudeErr)),
+               "name":      validation.Validate(coordinate.Name, 
validation.Required, validName),
+               "latitude":  validation.Validate(coordinate.Latitude, 
validation.Min(-90.0).Error(latitudeErr), 
validation.Max(90.0).Error(latitudeErr)),
+               "longitude": validation.Validate(coordinate.Longitude, 
validation.Min(-180.0).Error(longitudeErr), 
validation.Max(180.0).Error(longitudeErr)),
        }
        return tovalidate.ToErrors(errs)
 }
 
-//The TOLocation implementation of the Creator interface
+//The TOCoordinate implementation of the Creator interface
 //all implementations of Creator should use transactions and return the proper 
errorType
-//ParsePQUniqueConstraintError is used to determine if a location with 
conflicting values exists
+//ParsePQUniqueConstraintError is used to determine if a coordinate with 
conflicting values exists
 //if so, it will return an errorType of DataConflict and the type should be 
appended to the
 //generic error message returned
-//The insert sql returns the id and lastUpdated values of the newly inserted 
location and have
+//The insert sql returns the id and lastUpdated values of the newly inserted 
coordinate and have
 //to be added to the struct
-func (location *TOLocation) Create(db *sqlx.DB, user auth.CurrentUser) (error, 
tc.ApiErrorType) {
+func (coordinate *TOCoordinate) Create(db *sqlx.DB, user auth.CurrentUser) 
(error, tc.ApiErrorType) {
        rollbackTransaction := true
        tx, err := db.Beginx()
        defer func() {
@@ -137,12 +137,12 @@ func (location *TOLocation) Create(db *sqlx.DB, user 
auth.CurrentUser) (error, t
                log.Error.Printf("could not begin transaction: %v", err)
                return tc.DBError, tc.SystemError
        }
-       resultRows, err := tx.NamedQuery(insertQuery(), location)
+       resultRows, err := tx.NamedQuery(insertQuery(), coordinate)
        if err != nil {
                if pqErr, ok := err.(*pq.Error); ok {
                        err, eType := 
dbhelpers.ParsePQUniqueConstraintError(pqErr)
                        if eType == tc.DataConflictError {
-                               return errors.New("a location with " + 
err.Error()), eType
+                               return errors.New("a coordinate with " + 
err.Error()), eType
                        }
                        return err, eType
                } else {
@@ -163,16 +163,16 @@ func (location *TOLocation) Create(db *sqlx.DB, user 
auth.CurrentUser) (error, t
                }
        }
        if rowsAffected == 0 {
-               err = errors.New("no location was inserted, no id was returned")
+               err = errors.New("no coordinate was inserted, no id was 
returned")
                log.Errorln(err)
                return tc.DBError, tc.SystemError
        } else if rowsAffected > 1 {
-               err = errors.New("too many ids returned from location insert")
+               err = errors.New("too many ids returned from coordinate insert")
                log.Errorln(err)
                return tc.DBError, tc.SystemError
        }
-       location.SetKeys(map[string]interface{}{"id": id})
-       location.LastUpdated = &lastUpdated
+       coordinate.SetKeys(map[string]interface{}{"id": id})
+       coordinate.LastUpdated = &lastUpdated
        err = tx.Commit()
        if err != nil {
                log.Errorln("Could not commit transaction: ", err)
@@ -182,7 +182,7 @@ func (location *TOLocation) Create(db *sqlx.DB, user 
auth.CurrentUser) (error, t
        return nil, tc.NoError
 }
 
-func (location *TOLocation) Read(db *sqlx.DB, parameters map[string]string, 
user auth.CurrentUser) ([]interface{}, []error, tc.ApiErrorType) {
+func (coordinate *TOCoordinate) Read(db *sqlx.DB, parameters 
map[string]string, user auth.CurrentUser) ([]interface{}, []error, 
tc.ApiErrorType) {
        var rows *sqlx.Rows
 
        // Query Parameters to Database Query column mappings
@@ -201,30 +201,30 @@ func (location *TOLocation) Read(db *sqlx.DB, parameters 
map[string]string, user
 
        rows, err := db.NamedQuery(query, queryValues)
        if err != nil {
-               log.Errorf("Error querying Location: %v", err)
+               log.Errorf("Error querying Coordinate: %v", err)
                return nil, []error{tc.DBError}, tc.SystemError
        }
        defer rows.Close()
 
-       Locations := []interface{}{}
+       Coordinates := []interface{}{}
        for rows.Next() {
-               var s TOLocation
+               var s TOCoordinate
                if err = rows.StructScan(&s); err != nil {
-                       log.Errorf("error parsing Location rows: %v", err)
+                       log.Errorf("error parsing Coordinate rows: %v", err)
                        return nil, []error{tc.DBError}, tc.SystemError
                }
-               Locations = append(Locations, s)
+               Coordinates = append(Coordinates, s)
        }
 
-       return Locations, []error{}, tc.NoError
+       return Coordinates, []error{}, tc.NoError
 }
 
-//The TOLocation implementation of the Updater interface
+//The TOCoordinate implementation of the Updater interface
 //all implementations of Updater should use transactions and return the proper 
errorType
-//ParsePQUniqueConstraintError is used to determine if a location with 
conflicting values exists
+//ParsePQUniqueConstraintError is used to determine if a coordinate with 
conflicting values exists
 //if so, it will return an errorType of DataConflict and the type should be 
appended to the
 //generic error message returned
-func (location *TOLocation) Update(db *sqlx.DB, user auth.CurrentUser) (error, 
tc.ApiErrorType) {
+func (coordinate *TOCoordinate) Update(db *sqlx.DB, user auth.CurrentUser) 
(error, tc.ApiErrorType) {
        rollbackTransaction := true
        tx, err := db.Beginx()
        defer func() {
@@ -241,13 +241,13 @@ func (location *TOLocation) Update(db *sqlx.DB, user 
auth.CurrentUser) (error, t
                log.Error.Printf("could not begin transaction: %v", err)
                return tc.DBError, tc.SystemError
        }
-       log.Debugf("about to run exec query: %s with location: %++v", 
updateQuery(), location)
-       resultRows, err := tx.NamedQuery(updateQuery(), location)
+       log.Debugf("about to run exec query: %s with coordinate: %++v", 
updateQuery(), coordinate)
+       resultRows, err := tx.NamedQuery(updateQuery(), coordinate)
        if err != nil {
                if pqErr, ok := err.(*pq.Error); ok {
                        err, eType := 
dbhelpers.ParsePQUniqueConstraintError(pqErr)
                        if eType == tc.DataConflictError {
-                               return errors.New("a location with " + 
err.Error()), eType
+                               return errors.New("a coordinate with " + 
err.Error()), eType
                        }
                        return err, eType
                } else {
@@ -267,10 +267,10 @@ func (location *TOLocation) Update(db *sqlx.DB, user 
auth.CurrentUser) (error, t
                }
        }
        log.Debugf("lastUpdated: %++v", lastUpdated)
-       location.LastUpdated = &lastUpdated
+       coordinate.LastUpdated = &lastUpdated
        if rowsAffected != 1 {
                if rowsAffected < 1 {
-                       return errors.New("no location found with this id"), 
tc.DataMissingError
+                       return errors.New("no coordinate found with this id"), 
tc.DataMissingError
                } else {
                        return fmt.Errorf("this update affected too many rows: 
%d", rowsAffected), tc.SystemError
                }
@@ -284,9 +284,9 @@ func (location *TOLocation) Update(db *sqlx.DB, user 
auth.CurrentUser) (error, t
        return nil, tc.NoError
 }
 
-//The Location implementation of the Deleter interface
+//The Coordinate implementation of the Deleter interface
 //all implementations of Deleter should use transactions and return the proper 
errorType
-func (location *TOLocation) Delete(db *sqlx.DB, user auth.CurrentUser) (error, 
tc.ApiErrorType) {
+func (coordinate *TOCoordinate) Delete(db *sqlx.DB, user auth.CurrentUser) 
(error, tc.ApiErrorType) {
        rollbackTransaction := true
        tx, err := db.Beginx()
        defer func() {
@@ -303,8 +303,8 @@ func (location *TOLocation) Delete(db *sqlx.DB, user 
auth.CurrentUser) (error, t
                log.Error.Printf("could not begin transaction: %v", err)
                return tc.DBError, tc.SystemError
        }
-       log.Debugf("about to run exec query: %s with location: %++v", 
deleteQuery(), location)
-       result, err := tx.NamedExec(deleteQuery(), location)
+       log.Debugf("about to run exec query: %s with coordinate: %++v", 
deleteQuery(), coordinate)
+       result, err := tx.NamedExec(deleteQuery(), coordinate)
        if err != nil {
                log.Errorf("received error: %++v from delete execution", err)
                return tc.DBError, tc.SystemError
@@ -315,7 +315,7 @@ func (location *TOLocation) Delete(db *sqlx.DB, user 
auth.CurrentUser) (error, t
        }
        if rowsAffected != 1 {
                if rowsAffected < 1 {
-                       return errors.New("no location with that id found"), 
tc.DataMissingError
+                       return errors.New("no coordinate with that id found"), 
tc.DataMissingError
                } else {
                        return fmt.Errorf("this delete affected too many rows: 
%d", rowsAffected), tc.SystemError
                }
@@ -337,13 +337,13 @@ longitude,
 last_updated,
 name
 
-FROM location l`
+FROM coordinate c`
        return query
 }
 
 func updateQuery() string {
        query := `UPDATE
-location SET
+coordinate SET
 latitude=:latitude,
 longitude=:longitude,
 name=:name
@@ -352,7 +352,7 @@ WHERE id=:id RETURNING last_updated`
 }
 
 func insertQuery() string {
-       query := `INSERT INTO location (
+       query := `INSERT INTO coordinate (
 latitude,
 longitude,
 name) VALUES (
@@ -363,7 +363,7 @@ name) VALUES (
 }
 
 func deleteQuery() string {
-       query := `DELETE FROM location
+       query := `DELETE FROM coordinate
 WHERE id=:id`
        return query
 }
diff --git a/traffic_ops/traffic_ops_golang/location/locations_test.go 
b/traffic_ops/traffic_ops_golang/coordinate/coordinates_test.go
similarity index 78%
rename from traffic_ops/traffic_ops_golang/location/locations_test.go
rename to traffic_ops/traffic_ops_golang/coordinate/coordinates_test.go
index 4ca6291..2fe851f 100644
--- a/traffic_ops/traffic_ops_golang/location/locations_test.go
+++ b/traffic_ops/traffic_ops_golang/coordinate/coordinates_test.go
@@ -1,4 +1,4 @@
-package location
+package coordinate
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -36,30 +36,30 @@ import (
        sqlmock "gopkg.in/DATA-DOG/go-sqlmock.v1"
 )
 
-func getTestLocations() []v13.Location {
-       locs := []v13.Location{}
-       testLoc1 := v13.Location{
+func getTestCoordinates() []v13.Coordinate {
+       coords := []v13.Coordinate{}
+       testCoord1 := v13.Coordinate{
                ID:          1,
-               Name:        "location1",
+               Name:        "coordinate1",
                Latitude:    38.7,
                Longitude:   90.7,
                LastUpdated: tc.TimeNoMod{Time: time.Now()},
        }
-       locs = append(locs, testLoc1)
+       coords = append(coords, testCoord1)
 
-       testLoc2 := v13.Location{
+       testCoord2 := v13.Coordinate{
                ID:          2,
-               Name:        "location2",
+               Name:        "coordinate2",
                Latitude:    38.7,
                Longitude:   90.7,
                LastUpdated: tc.TimeNoMod{Time: time.Now()},
        }
-       locs = append(locs, testLoc2)
+       coords = append(coords, testCoord2)
 
-       return locs
+       return coords
 }
 
-func TestReadLocations(t *testing.T) {
+func TestReadCoordinates(t *testing.T) {
        mockDB, mock, err := sqlmock.New()
        if err != nil {
                t.Fatalf("an error '%s' was not expected when opening a stub 
database connection", err)
@@ -71,11 +71,11 @@ func TestReadLocations(t *testing.T) {
 
        refType := GetRefType()
 
-       testLocs := getTestLocations()
-       cols := test.ColsFromStructByTag("db", v13.Location{})
+       testCoords := getTestCoordinates()
+       cols := test.ColsFromStructByTag("db", v13.Coordinate{})
        rows := sqlmock.NewRows(cols)
 
-       for _, ts := range testLocs {
+       for _, ts := range testCoords {
                rows = rows.AddRow(
                        ts.ID,
                        ts.Name,
@@ -87,13 +87,13 @@ func TestReadLocations(t *testing.T) {
        mock.ExpectQuery("SELECT").WillReturnRows(rows)
        v := map[string]string{"id": "1"}
 
-       locations, errs, _ := refType.Read(db, v, auth.CurrentUser{})
+       coordinates, errs, _ := refType.Read(db, v, auth.CurrentUser{})
        if len(errs) > 0 {
-               t.Errorf("location.Read expected: no errors, actual: %v", errs)
+               t.Errorf("coordinate.Read expected: no errors, actual: %v", 
errs)
        }
 
-       if len(locations) != 2 {
-               t.Errorf("location.Read expected: len(locations) == 2, actual: 
%v", len(locations))
+       if len(coordinates) != 2 {
+               t.Errorf("coordinate.Read expected: len(coordinates) == 2, 
actual: %v", len(coordinates))
        }
 }
 
@@ -114,22 +114,22 @@ func TestFuncs(t *testing.T) {
 
 func TestInterfaces(t *testing.T) {
        var i interface{}
-       i = &TOLocation{}
+       i = &TOCoordinate{}
 
        if _, ok := i.(api.Creator); !ok {
-               t.Errorf("location must be creator")
+               t.Errorf("coordinate must be creator")
        }
        if _, ok := i.(api.Reader); !ok {
-               t.Errorf("location must be reader")
+               t.Errorf("coordinate must be reader")
        }
        if _, ok := i.(api.Updater); !ok {
-               t.Errorf("location must be updater")
+               t.Errorf("coordinate must be updater")
        }
        if _, ok := i.(api.Deleter); !ok {
-               t.Errorf("location must be deleter")
+               t.Errorf("coordinate must be deleter")
        }
        if _, ok := i.(api.Identifier); !ok {
-               t.Errorf("location must be Identifier")
+               t.Errorf("coordinate must be Identifier")
        }
 }
 
@@ -140,7 +140,7 @@ func TestValidate(t *testing.T) {
        la := -190.0
        lo := -190.0
        lu := tc.TimeNoMod{Time: time.Now()}
-       c := TOLocation{ID: &id,
+       c := TOCoordinate{ID: &id,
                Name:        &nm,
                Latitude:    &la,
                Longitude:   &lo,
@@ -159,10 +159,10 @@ func TestValidate(t *testing.T) {
        }
 
        //  valid name, latitude, longitude
-       nm = "This.is.2.a-Valid---Location."
+       nm = "This.is.2.a-Valid---Coordinate."
        la = 90.0
        lo = 90.0
-       c = TOLocation{ID: &id,
+       c = TOCoordinate{ID: &id,
                Name:        &nm,
                Latitude:    &la,
                Longitude:   &lo,
diff --git a/traffic_ops/traffic_ops_golang/routes.go 
b/traffic_ops/traffic_ops_golang/routes.go
index 01a830f..4ba5bee 100644
--- a/traffic_ops/traffic_ops_golang/routes.go
+++ b/traffic_ops/traffic_ops_golang/routes.go
@@ -35,13 +35,12 @@ import (
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/auth"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/cachegroup"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/cdn"
-
+       
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/coordinate"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/crconfig"
        dsrequest 
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/deliveryservice/request"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/deliveryservice/request/comment"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/division"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/hwinfo"
-       
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/location"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/parameter"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/physlocation"
        
"github.com/apache/incubator-trafficcontrol/traffic_ops/traffic_ops_golang/ping"
@@ -185,6 +184,13 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
                //About
                {1.3, http.MethodGet, `about/?(\.json)?$`, about.Handler(), 
auth.PrivLevelReadOnly, Authenticated, nil},
 
+               //Coordinates
+               {1.3, http.MethodGet, `coordinates/?(\.json)?$`, 
api.ReadHandler(coordinate.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {1.3, http.MethodGet, `coordinates/?$`, 
api.ReadHandler(coordinate.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
+               {1.3, http.MethodPut, `coordinates/?$`, 
api.UpdateHandler(coordinate.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {1.3, http.MethodPost, `coordinates/?$`, 
api.CreateHandler(coordinate.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+               {1.3, http.MethodDelete, `coordinates/?$`, 
api.DeleteHandler(coordinate.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
+
                //Delivery service request: CRUD
                {1.3, http.MethodGet, `deliveryservice_requests/?(\.json)?$`, 
api.ReadHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
                {1.3, http.MethodPut, `deliveryservice_requests/?$`, 
api.UpdateHandler(dsrequest.GetRefType(), d.DB), auth.PrivLevelPortal, 
Authenticated, nil},
@@ -207,13 +213,6 @@ func Routes(d ServerData) ([]Route, []RawRoute, 
http.Handler, error) {
                {1.3, http.MethodPut, `deliveryservices/{xmlID}/urisignkeys$`, 
saveDeliveryServiceURIKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, 
Authenticated, nil},
                {1.3, http.MethodDelete, 
`deliveryservices/{xmlID}/urisignkeys$`, 
removeDeliveryServiceURIKeysHandler(d.DB, d.Config), auth.PrivLevelAdmin, 
Authenticated, nil},
 
-               //Locations
-               {1.3, http.MethodGet, `locations/?(\.json)?$`, 
api.ReadHandler(location.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodGet, `locations/?$`, 
api.ReadHandler(location.GetRefType(), d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},
-               {1.3, http.MethodPut, `locations/?$`, 
api.UpdateHandler(location.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodPost, `locations/?$`, 
api.CreateHandler(location.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-               {1.3, http.MethodDelete, `locations/?$`, 
api.DeleteHandler(location.GetRefType(), d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
-
                //Servers
                {1.3, http.MethodPost, `servers/{id}/deliveryservices$`, 
server.AssignDeliveryServicesToServerHandler(d.DB), auth.PrivLevelOperations, 
Authenticated, nil},
                {1.3, http.MethodGet, `servers/{host_name}/update_status$`, 
server.GetServerUpdateStatusHandler(d.DB), auth.PrivLevelReadOnly, 
Authenticated, nil},

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

Reply via email to