You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/04/11 16:52:00 UTC

[GitHub] mitchell852 closed pull request #2115: Created API tests for /phys_locations

mitchell852 closed pull request #2115: Created API tests for /phys_locations
URL: https://github.com/apache/incubator-trafficcontrol/pull/2115
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/client/v13/phys_location.go b/traffic_ops/client/v13/phys_location.go
index 1083b1871..259af3086 100644
--- a/traffic_ops/client/v13/phys_location.go
+++ b/traffic_ops/client/v13/phys_location.go
@@ -25,7 +25,7 @@ import (
 )
 
 const (
-	API_v13_PhysLocations = "/api/1.3/physlocations"
+	API_v13_PhysLocations = "/api/1.3/phys_locations"
 )
 
 // Create a PhysLocation
@@ -101,7 +101,7 @@ func (to *Session) GetPhysLocationByID(id int) ([]tc.PhysLocation, ReqInf, error
 
 // GET a PhysLocation by the PhysLocation name
 func (to *Session) GetPhysLocationByName(name string) ([]tc.PhysLocation, ReqInf, error) {
-	url := fmt.Sprintf("%s/name/%s", API_v13_PhysLocations, name)
+	url := fmt.Sprintf("%s?name=%s", API_v13_PhysLocations, name)
 	resp, remoteAddr, err := to.request(http.MethodGet, url, nil)
 	reqInf := ReqInf{CacheHitStatus: CacheHitStatusMiss, RemoteAddr: remoteAddr}
 	if err != nil {
diff --git a/traffic_ops/testing/api/v13/phys_locations_test.go b/traffic_ops/testing/api/v13/phys_locations_test.go
new file mode 100644
index 000000000..6ef1e9987
--- /dev/null
+++ b/traffic_ops/testing/api/v13/phys_locations_test.go
@@ -0,0 +1,124 @@
+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 TestPhysLocations(t *testing.T) {
+
+	CreateTestCDNs(t)
+	CreateTestDivisions(t)
+	CreateTestRegions(t)
+	CreateTestPhysLocations(t)
+	UpdateTestPhysLocations(t)
+	GetTestPhysLocations(t)
+	DeleteTestPhysLocations(t)
+
+}
+
+func CreateTestPhysLocations(t *testing.T) {
+
+	// Attach CDNs
+	region := testData.Regions[0]
+	resp, _, err := TOSession.GetRegionByName(region.Name)
+	if err != nil {
+		t.Errorf("cannot GET region by name: %v - %v\n", region.Name, err)
+	}
+	respRegion := resp[0]
+
+	for _, pl := range testData.PhysLocations {
+
+		pl.RegionID = respRegion.ID
+		resp, _, err := TOSession.CreatePhysLocation(pl)
+		log.Debugln("Response: ", resp)
+		if err != nil {
+			t.Errorf("could not CREATE cdns: %v\n", err)
+		}
+	}
+
+}
+
+func UpdateTestPhysLocations(t *testing.T) {
+
+	firstPhysLocation := testData.PhysLocations[0]
+	// Retrieve the PhysLocation by name so we can get the id for the Update
+	resp, _, err := TOSession.GetPhysLocationByName(firstPhysLocation.Name)
+	if err != nil {
+		t.Errorf("cannot GET PhysLocation by name: '%s', %v\n", firstPhysLocation.Name, err)
+	}
+	remotePhysLocation := resp[0]
+	expectedPhysLocationCity := "city1"
+	remotePhysLocation.City = expectedPhysLocationCity
+	var alert tc.Alerts
+	alert, _, err = TOSession.UpdatePhysLocationByID(remotePhysLocation.ID, remotePhysLocation)
+	if err != nil {
+		t.Errorf("cannot UPDATE PhysLocation by id: %v - %v\n", err, alert)
+	}
+
+	// Retrieve the PhysLocation to check PhysLocation name got updated
+	resp, _, err = TOSession.GetPhysLocationByID(remotePhysLocation.ID)
+	if err != nil {
+		t.Errorf("cannot GET PhysLocation by name: '$%s', %v\n", firstPhysLocation.Name, err)
+	}
+	respPhysLocation := resp[0]
+	if respPhysLocation.City != expectedPhysLocationCity {
+		t.Errorf("results do not match actual: %s, expected: %s\n", respPhysLocation.City, expectedPhysLocationCity)
+	}
+
+}
+
+func GetTestPhysLocations(t *testing.T) {
+
+	for _, cdn := range testData.PhysLocations {
+		resp, _, err := TOSession.GetPhysLocationByName(cdn.Name)
+		if err != nil {
+			t.Errorf("cannot GET PhysLocation by name: %v - %v\n", err, resp)
+		}
+	}
+}
+
+func DeleteTestPhysLocations(t *testing.T) {
+
+	for _, cdn := range testData.PhysLocations {
+		// Retrieve the PhysLocation by name so we can get the id for the Update
+		resp, _, err := TOSession.GetPhysLocationByName(cdn.Name)
+		if err != nil {
+			t.Errorf("cannot GET PhysLocation by name: %v - %v\n", cdn.Name, err)
+		}
+		if len(resp) > 0 {
+			respPhysLocation := resp[0]
+
+			_, _, err := TOSession.DeletePhysLocationByID(respPhysLocation.ID)
+			if err != nil {
+				t.Errorf("cannot DELETE PhysLocation by name: '%s' %v\n", respPhysLocation.Name, err)
+			}
+
+			// Retrieve the PhysLocation to see if it got deleted
+			cdns, _, err := TOSession.GetPhysLocationByName(cdn.Name)
+			if err != nil {
+				t.Errorf("error deleting PhysLocation name: %s\n", err.Error())
+			}
+			if len(cdns) > 0 {
+				t.Errorf("expected PhysLocation name: %s to be deleted\n", cdn.Name)
+			}
+		}
+	}
+}
diff --git a/traffic_ops/testing/api/v13/todb.go b/traffic_ops/testing/api/v13/todb.go
index 53e2fa6f3..a1963a871 100644
--- a/traffic_ops/testing/api/v13/todb.go
+++ b/traffic_ops/testing/api/v13/todb.go
@@ -67,105 +67,6 @@ func SetupTestData(*sql.DB) error {
 		os.Exit(1)
 	}
 
-	err = SetupStatuses(db)
-	if err != nil {
-		fmt.Printf("\nError setting up status %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-		os.Exit(1)
-	}
-
-	err = SetupDivisions(db)
-	if err != nil {
-		fmt.Printf("\nError setting up division %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-		os.Exit(1)
-	}
-
-	err = SetupRegions(db)
-	if err != nil {
-		fmt.Printf("\nError setting up region %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-		os.Exit(1)
-	}
-
-	/*
-		err = SetupProfileParameters(db)
-		if err != nil {
-			fmt.Printf("\nError setting up parameter %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupCacheGroups(db)
-		if err != nil {
-			fmt.Printf("\nError setting up cachegroup %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-
-		err = SetupPhysLocations(db)
-		if err != nil {
-			fmt.Printf("\nError setting up phys_location %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupServers(db)
-		if err != nil {
-			fmt.Printf("\nError setting up server %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupAsns(db)
-		if err != nil {
-			fmt.Printf("\nError setting up asn %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupDeliveryServices(db)
-		if err != nil {
-			fmt.Printf("\nError setting up deliveryservice %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupRegexes(db)
-		if err != nil {
-			fmt.Printf("\nError setting up regex %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupDeliveryServiceRegexes(db)
-		if err != nil {
-			fmt.Printf("\nError setting up deliveryservice_regex %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupDeliveryServiceTmUsers(db)
-		if err != nil {
-			fmt.Printf("\nError setting up deliveryservice_tmuser %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupDeliveryServiceServers(db)
-		if err != nil {
-			fmt.Printf("\nError setting up deliveryservice_server %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupJobStatuses(db)
-		if err != nil {
-			fmt.Printf("\nError setting up job_status %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupJobAgents(db)
-		if err != nil {
-			fmt.Printf("\nError setting up job_agent %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-
-		err = SetupJobs(db)
-		if err != nil {
-			fmt.Printf("\nError setting up job %s - %s, %v\n", Config.TrafficOps.URL, Config.TrafficOps.Users.Admin, err)
-			os.Exit(1)
-		}
-	*/
-
 	return err
 }
 
@@ -228,252 +129,6 @@ INSERT INTO tenant (id, name, active, parent_id, last_updated) VALUES (4, 'child
 	return nil
 }
 
-// SetupStatuses ...
-func SetupStatuses(db *sql.DB) error {
-
-	sqlStmt := `
-INSERT INTO status (id, name, description, last_updated) VALUES (1, 'OFFLINE', 'Edge: Puts server in CCR config file in this state, but CCR will never route traffic to it. Mid: Server will not be included in parent.config files for its edge caches', '2018-01-19 19:01:21.388399');
-INSERT INTO status (id, name, description, last_updated) VALUES (2, 'ONLINE', 'Edge: Puts server in CCR config file in this state, and CCR will always route traffic to it. Mid: Server will be included in parent.config files for its edges', '2018-01-19 19:01:21.384459');
-INSERT INTO status (id, name, description, last_updated) VALUES (3, 'REPORTED', 'Edge: Puts server in CCR config file in this state, and CCR will adhere to the health protocol. Mid: N/A for now', '2018-01-19 19:01:21.379811');
-INSERT INTO status (id, name, description, last_updated) VALUES (4, 'ADMIN_DOWN', 'Temporary down. Edge: XMPP client will send status OFFLINE to CCR, otherwise similar to REPORTED. Mid: Server will not be included in parent.config files for its edge caches', '2018-01-19 19:01:21.385798');
-INSERT INTO status (id, name, description, last_updated) VALUES (5, 'CCR_IGNORE', 'Edge: 12M will not include caches in this state in CCR config files. Mid: N/A for now', '2018-01-19 19:01:21.383085');
-INSERT INTO status (id, name, description, last_updated) VALUES (6, 'PRE_PROD', 'Pre Production. Not active in any configuration.', '2018-01-19 19:01:21.387146');
-`
-	err := execSQL(db, sqlStmt, "status")
-	if err != nil {
-		return fmt.Errorf("exec failed %v", err)
-	}
-	return nil
-}
-
-// SetupCacheGroups ...
-func SetupCacheGroups(db *sql.DB) error {
-
-	sqlStmt := `
-INSERT INTO cachegroup (id, name, short_name, latitude, longitude, parent_cachegroup_id, secondary_parent_cachegroup_id, type, last_updated) VALUES (100, 'mid-northeast-group', 'ne', 120, 120, null, null, 2, '2018-01-19 21:19:32.041913');
-INSERT INTO cachegroup (id, name, short_name, latitude, longitude, parent_cachegroup_id, secondary_parent_cachegroup_id, type, last_updated) VALUES (200, 'mid-northwest-group', 'nw', 100, 100, 100, null, 2, '2018-01-19 21:19:32.052005');
-INSERT INTO cachegroup (id, name, short_name, latitude, longitude, parent_cachegroup_id, secondary_parent_cachegroup_id, type, last_updated) VALUES (800, 'mid_cg3', 'mid_cg3', 100, 100, null, null, 6, '2018-01-19 21:19:32.056908');
-INSERT INTO cachegroup (id, name, short_name, latitude, longitude, parent_cachegroup_id, secondary_parent_cachegroup_id, type, last_updated) VALUES (900, 'edge_cg4', 'edge_cg4', 100, 100, 800, null, 5, '2018-01-19 21:19:32.059077');
-INSERT INTO cachegroup (id, name, short_name, latitude, longitude, parent_cachegroup_id, secondary_parent_cachegroup_id, type, last_updated) VALUES (300, 'edge_atl_group', 'atl', 120, 120, 100, 200, 5, '2018-01-19 21:19:32.063375');
-`
-	err := execSQL(db, sqlStmt, "cachegroup")
-	if err != nil {
-		return fmt.Errorf("exec failed %v", err)
-	}
-	return nil
-}
-
-// SetupPhysLocations ...
-func SetupPhysLocations(db *sql.DB) error {
-
-	sqlStmt := `
-INSERT INTO phys_location (id, name, short_name, address, city, state, zip, poc, phone, email, comments, region, last_updated) VALUES (100, 'Denver', 'denver', '1234 mile high circle', 'Denver', 'CO', '80202', null, '303-111-1111', null, null, 100, '2018-01-19 21:19:32.081465');
-INSERT INTO phys_location (id, name, short_name, address, city, state, zip, poc, phone, email, comments, region, last_updated) VALUES (200, 'Boulder', 'boulder', '1234 green way', 'Boulder', 'CO', '80301', null, '303-222-2222', null, null, 100, '2018-01-19 21:19:32.086195');
-INSERT INTO phys_location (id, name, short_name, address, city, state, zip, poc, phone, email, comments, region, last_updated) VALUES (300, 'HotAtlanta', 'atlanta', '1234 southern way', 'Atlanta', 'GA', '30301', null, '404-222-2222', null, null, 100, '2018-01-19 21:19:32.089538');
-`
-	err := execSQL(db, sqlStmt, "phys_location")
-	if err != nil {
-		return fmt.Errorf("exec failed %v", err)
-	}
-	return nil
-}
-
-// SetupServers ...
-func SetupServers(db *sql.DB) error {
-
-	sqlStmt := `
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (100, 'atlanta-edge-01', 'ga.atlanta.kabletown.net', 80, 'atlanta-edge-01\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.1', '255.255.255.252', '127.0.0.1', '2345:1234:12:8::2/64', '2345:1234:12:8::1', 9000, 100, 'RR 119.02', 300, 1, 2, null, false, 100, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.094746', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (1000, 'influxdb02', 'kabletown.net', 8086, '', '', 'eth1', '127.0.0.11', '255.255.252.0', '127.0.0.11', '127.0.0.11', '127.0.0.11', 1500, 300, 'RR 119.02', 100, 32, 2, null, false, 500, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.115164', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (1100, 'atlanta-router-01', 'ga.atlanta.kabletown.net', 80, 'atlanta-router-01\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.12', '255.255.255.252', '127.0.0.1', '2345:1234:12:8::10/64', '2345:1234:12:8::1', 9000, 100, 'RR 119.02', 300, 4, 2, null, false, 100, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.125603', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (1200, 'atlanta-edge-03', 'ga.atlanta.kabletown.net', 80, 'atlanta-edge-03\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.13', '255.255.255.252', '127.0.0.1', '2345:1234:12:2::2/64', '2345:1234:12:8::1', 9000, 100, 'RR 119.02', 300, 1, 3, null, false, 100, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.135422', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (1300, 'atlanta-edge-14', 'ga.atlanta.kabletown.net', 80, 'atlanta-edge-14\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.14', '255.255.255.252', '127.0.0.1', '2345:1234:12:8::14/64', '2345:1234:12:8::1', 9000, 100, 'RR 119.02', 900, 1, 2, null, false, 100, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.145252', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (1400, 'atlanta-edge-15', 'ga.atlanta.kabletown.net', 80, 'atlanta-edge-15\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.15', '255.255.255.252', '127.0.0.7', '2345:1234:12:d::15/64', '2345:1234:12:d::1', 9000, 100, 'RR 119.02', 900, 1, 2, null, false, 100, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.155043', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (1500, 'atlanta-mid-16', 'ga.atlanta.kabletown.net', 80, 'atlanta-mid-16\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.16', '255.255.255.252', '127.0.0.7', '2345:1234:12:d::16/64', '2345:1234:12:d::1', 9000, 100, 'RR 119.02', 800, 2, 2, null, false, 100, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.164825', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (1600, 'atlanta-org-1', 'ga.atlanta.kabletown.net', 80, 'atlanta-org-1\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.17', '255.255.255.252', '127.0.0.17', '2345:1234:12:d::17/64', '2345:1234:12:d::1', 9000, 100, 'RR 119.02', 800, 3, 2, null, false, 100, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.167782', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (1700, 'atlanta-org-2', 'ga.atlanta.kabletown.net', 80, 'atlanta-org-1\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.18', '255.255.255.252', '127.0.0.18', '2345:1234:12:d::18/64', '2345:1234:12:d::1', 9000, 100, 'RR 119.02', 800, 3, 2, null, false, 900, 200, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.170592', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (200, 'atlanta-mid-01', 'ga.atlanta.kabletown.net', 80, 'atlanta-mid-01\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.2', '255.255.255.252', '127.0.0.2', '2345:1234:12:9::2/64', '2345:1234:12:9::1', 9000, 100, 'RR 119.02', 100, 2, 2, null, false, 200, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.173304', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (300, 'rascal01', 'kabletown.net', 81, 'rascal\@kabletown.net', 'X', 'bond0', '127.0.0.4', '255.255.255.252', '127.0.0.4', '2345:1234:12:b::2/64', '2345:1234:12:b::1', 9000, 100, 'RR 119.02', 100, 4, 2, null, false, 300, 200, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.176375', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (400, 'riak01', 'kabletown.net', 8088, '', '', 'eth1', '127.0.0.5', '255.255.252.0', '127.0.0.5', '', '', 1500, 100, 'RR 119.02', 100, 31, 2, null, false, 500, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.180698', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (500, 'rascal02', 'kabletown.net', 81, 'rascal\@kabletown.net', 'X', 'bond0', '127.0.0.6', '255.255.255.252', '127.0.0.6', '2345:1234:12:c::2/64', '2345:1234:12:c::1', 9000, 100, 'RR 119.05', 100, 4, 2, null, false, 300, 200, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.184322', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (600, 'atlanta-edge-02', 'ga.atlanta.kabletown.net', 80, 'atlanta-edge-02\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.7', '255.255.255.252', '127.0.0.7', '2345:1234:12:d::2/64', '2345:1234:12:d::1', 9000, 100, 'RR 119.02', 300, 1, 2, null, false, 100, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.187856', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (700, 'atlanta-mid-02', 'ga.atlanta.kabletown.net', 80, 'atlanta-mid-02\@ocdn.kabletown.net', 'X', 'bond0', '127.0.0.8', '255.255.255.252', '127.0.0.8', '2345:1234:12:e::2/64', '2345:1234:12:e::1', 9000, 200, 'RR 119.02', 200, 2, 2, null, false, 200, 200, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.191292', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (800, 'riak02', 'kabletown.net', 8088, '', '', 'eth1', '127.0.0.9', '255.255.252.0', '127.0.0.9', '2345:1234:12:f::2/64', '2345:1234:12:f::1', 1500, 200, 'RR 119.02', 100, 31, 2, null, false, 500, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.194538', null, false);
-INSERT INTO server (id, host_name, domain_name, tcp_port, xmpp_id, xmpp_passwd, interface_name, ip_address, ip_netmask, ip_gateway, ip6_address, ip6_gateway, interface_mtu, phys_location, rack, cachegroup, type, status, offline_reason, upd_pending, profile, cdn_id, mgmt_ip_address, mgmt_ip_netmask, mgmt_ip_gateway, ilo_ip_address, ilo_ip_netmask, ilo_ip_gateway, ilo_username, ilo_password, router_host_name, router_port_name, guid, last_updated, https_port, reval_pending) VALUES (900, 'influxdb01', 'kabletown.net', 8086, '', '', 'eth1', '127.0.0.10', '255.255.252.0', '127.0.0.10', '127.0.0.10', '127.0.0.10', 1500, 300, 'RR 119.02', 100, 32, 2, null, false, 500, 100, '', '', '', '', '', '', '', '', '', '', null, '2018-01-19 21:19:32.197808', null, false);
-`
-	err := execSQL(db, sqlStmt, "servers")
-	if err != nil {
-		return fmt.Errorf("exec failed %v", err)
-	}
-	return nil
-}
-
-// SetupProfileParameters ...
-func SetupProfileParameters(db *sql.DB) error {
-
-	sqlStmt := `
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 43, '2018-01-19 19:01:21.556526');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 19, '2018-01-19 19:01:21.566442');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 35, '2018-01-19 19:01:21.571364');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 49, '2018-01-19 19:01:21.575178');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 61, '2018-01-19 19:01:21.578744');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 9, '2018-01-19 19:01:21.582534');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 46, '2018-01-19 19:01:21.586388');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 35, '2018-01-19 19:01:21.588145');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 16, '2018-01-19 19:01:21.589542');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 57, '2018-01-19 19:01:21.591061');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 48, '2018-01-19 19:01:21.592700');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 60, '2018-01-19 19:01:21.594185');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 31, '2018-01-19 19:01:21.595700');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 49, '2018-01-19 19:01:21.597212');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 4, '2018-01-19 19:01:21.598744');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 36, '2018-01-19 19:01:21.600582');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 27, '2018-01-19 19:01:21.602214');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 41, '2018-01-19 19:01:21.604015');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 16, '2018-01-19 19:01:21.605612');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 17, '2018-01-19 19:01:21.607234');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 21, '2018-01-19 19:01:21.609358');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 41, '2018-01-19 19:01:21.611101');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 32, '2018-01-19 19:01:21.613078');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 32, '2018-01-19 19:01:21.614943');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 28, '2018-01-19 19:01:21.616641');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 6, '2018-01-19 19:01:21.618677');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 66, '2018-01-19 19:01:21.620617');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 58, '2018-01-19 19:01:21.622399');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 28, '2018-01-19 19:01:21.623955');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 56, '2018-01-19 19:01:21.625664');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 23, '2018-01-19 19:01:21.627471');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 11, '2018-01-19 19:01:21.629284');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 30, '2018-01-19 19:01:21.630989');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 22, '2018-01-19 19:01:21.632523');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 23, '2018-01-19 19:01:21.634278');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 37, '2018-01-19 19:01:21.635945');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 25, '2018-01-19 19:01:21.637627');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 38, '2018-01-19 19:01:21.639252');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 52, '2018-01-19 19:01:21.640775');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 29, '2018-01-19 19:01:21.642278');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 12, '2018-01-19 19:01:21.644071');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 45, '2018-01-19 19:01:21.645614');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 60, '2018-01-19 19:01:21.647126');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 26, '2018-01-19 19:01:21.648787');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 57, '2018-01-19 19:01:21.650507');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 13, '2018-01-19 19:01:21.652142');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 27, '2018-01-19 19:01:21.653714');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 26, '2018-01-19 19:01:21.655383');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 39, '2018-01-19 19:01:21.657078');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 12, '2018-01-19 19:01:21.658901');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 25, '2018-01-19 19:01:21.661010');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 21, '2018-01-19 19:01:21.662865');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 33, '2018-01-19 19:01:21.664561');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 38, '2018-01-19 19:01:21.666336');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 34, '2018-01-19 19:01:21.668286');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 58, '2018-01-19 19:01:21.670053');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 24, '2018-01-19 19:01:21.671744');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 43, '2018-01-19 19:01:21.673493');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 5, '2018-01-19 19:01:21.675218');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 37, '2018-01-19 19:01:21.676721');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 51, '2018-01-19 19:01:21.678334');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 19, '2018-01-19 19:01:21.679937');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 6, '2018-01-19 19:01:21.681398');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 18, '2018-01-19 19:01:21.682983');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 42, '2018-01-19 19:01:21.684568');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 7, '2018-01-19 19:01:21.686083');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 56, '2018-01-19 19:01:21.687549');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 13, '2018-01-19 19:01:21.689131');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 22, '2018-01-19 19:01:21.690719');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 36, '2018-01-19 19:01:21.692254');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 53, '2018-01-19 19:01:21.693745');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 40, '2018-01-19 19:01:21.695556');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 51, '2018-01-19 19:01:21.697784');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 46, '2018-01-19 19:01:21.699385');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 11, '2018-01-19 19:01:21.701103');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 54, '2018-01-19 19:01:21.702727');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 17, '2018-01-19 19:01:21.704304');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 53, '2018-01-19 19:01:21.705942');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 10, '2018-01-19 19:01:21.707676');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 8, '2018-01-19 19:01:21.709391');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 39, '2018-01-19 19:01:21.711213');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 40, '2018-01-19 19:01:21.713199');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 29, '2018-01-19 19:01:21.715051');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 59, '2018-01-19 19:01:21.716817');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 47, '2018-01-19 19:01:21.718642');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 44, '2018-01-19 19:01:21.720315');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 9, '2018-01-19 19:01:21.722063');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 8, '2018-01-19 19:01:21.723607');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 20, '2018-01-19 19:01:21.725403');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 48, '2018-01-19 19:01:21.727060');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 55, '2018-01-19 19:01:21.728640');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 10, '2018-01-19 19:01:21.730182');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 45, '2018-01-19 19:01:21.731780');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 15, '2018-01-19 19:01:21.733368');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 33, '2018-01-19 19:01:21.734950');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 50, '2018-01-19 19:01:21.736646');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 52, '2018-01-19 19:01:21.738319');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 14, '2018-01-19 19:01:21.739900');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 14, '2018-01-19 19:01:21.741450');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 18, '2018-01-19 19:01:21.743105');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 61, '2018-01-19 19:01:21.744826');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 44, '2018-01-19 19:01:21.746391');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 55, '2018-01-19 19:01:21.747999');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 59, '2018-01-19 19:01:21.749519');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 34, '2018-01-19 19:01:21.751253');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 24, '2018-01-19 19:01:21.753005');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 7, '2018-01-19 19:01:21.754576');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 15, '2018-01-19 19:01:21.757250');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 47, '2018-01-19 19:01:21.759781');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 54, '2018-01-19 19:01:21.761829');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 42, '2018-01-19 19:01:21.763902');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 50, '2018-01-19 19:01:21.765912');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (100, 31, '2018-01-19 19:01:21.767998');
-INSERT INTO profile_parameter (profile, parameter, last_updated) VALUES (200, 20, '2018-01-19 19:01:21.769919');
-`
-	err := execSQL(db, sqlStmt, "profile_parameter")
-	if err != nil {
-		return fmt.Errorf("exec failed %v", err)
-	}
-	return nil
-}
-
-// SetupDivisions ...
-func SetupDivisions(db *sql.DB) error {
-
-	sqlStmt := `
-INSERT INTO division (id, name, last_updated) VALUES (100, 'mountain', '2018-01-19 19:01:21.851102');
-`
-	err := execSQL(db, sqlStmt, "division")
-	if err != nil {
-		return fmt.Errorf("exec failed %v", err)
-	}
-	return nil
-}
-
-// SetupRegions ...
-func SetupRegions(db *sql.DB) error {
-
-	sqlStmt := `
-INSERT INTO region (id, name, division, last_updated) VALUES (100, 'Denver Region', 100, '2018-01-19 19:01:21.859430');
-INSERT INTO region (id, name, division, last_updated) VALUES (200, 'Boulder Region', 100, '2018-01-19 19:01:21.854509');
-`
-	err := execSQL(db, sqlStmt, "region")
-	if err != nil {
-		return fmt.Errorf("exec failed %v", err)
-	}
-	return nil
-}
-
-// SetupAsns ...
-func SetupAsns(db *sql.DB) error {
-
-	sqlStmt := `
-INSERT INTO asn (id, asn, cachegroup, last_updated) VALUES (100, 9939, 100, '2018-01-19 19:01:21.995075');
-INSERT INTO asn (id, asn, cachegroup, last_updated) VALUES (200, 9940, 200, '2018-01-19 19:01:22.005683');
-`
-	err := execSQL(db, sqlStmt, "asn")
-	if err != nil {
-		return fmt.Errorf("exec failed %v", err)
-	}
-	return nil
-}
-
 // SetupDeliveryServices ...
 func SetupDeliveryServices(db *sql.DB) error {
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services