You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/04/10 18:22:12 UTC

[incubator-trafficcontrol] 06/07: added parameter creation to the API test for profiles

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

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

commit 1479db504380c519057ece761f809387619d1074
Author: Dewayne Richardson <de...@apache.org>
AuthorDate: Fri Apr 6 13:28:20 2018 -0600

    added parameter creation to the API test for profiles
---
 lib/go-tc/v13/profiles.go                    | 17 ++++++++++-------
 traffic_ops/client/v13/profile.go            |  2 +-
 traffic_ops/testing/api/v13/profiles_test.go |  2 ++
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/lib/go-tc/v13/profiles.go b/lib/go-tc/v13/profiles.go
index 098e331..71587df 100644
--- a/lib/go-tc/v13/profiles.go
+++ b/lib/go-tc/v13/profiles.go
@@ -42,12 +42,13 @@ type Profile struct {
 	//
 	LastUpdated tc.TimeNoMod `json:"lastUpdated" db:"last_updated"`
 
-	Name            string `json:"name"`
-	Description     string `json:"description"`
-	CDNName         string `json:"cdnName"`
-	CDNID           int    `json:"cdn"`
-	RoutingDisabled bool   `json:"routingDisabled"`
-	Type            string `json:"type"`
+	Name            string              `json:"name"`
+	Description     string              `json:"description"`
+	CDNName         string              `json:"cdnName"`
+	CDNID           int                 `json:"cdn"`
+	RoutingDisabled bool                `json:"routingDisabled"`
+	Type            string              `json:"type"`
+	Parameters      []ParameterNullable `json:"params,omitempty"`
 }
 
 // ProfileNullable ...
@@ -85,5 +86,7 @@ type ProfileNullable struct {
 	//
 	Type *string `json:"type" db:"type"`
 
-	Parameters []ParameterNullable `json:"params"`
+	// Parameters associated to the profile
+	//
+	Parameters []ParameterNullable `json:"params,omitempty"`
 }
diff --git a/traffic_ops/client/v13/profile.go b/traffic_ops/client/v13/profile.go
index 0eb9b66..bbcc799 100644
--- a/traffic_ops/client/v13/profile.go
+++ b/traffic_ops/client/v13/profile.go
@@ -26,7 +26,7 @@ import (
 )
 
 const (
-	API_v13_Profiles = "/api/1.3/profiles-wip"
+	API_v13_Profiles = "/api/1.3/profiles"
 )
 
 // Create a Profile
diff --git a/traffic_ops/testing/api/v13/profiles_test.go b/traffic_ops/testing/api/v13/profiles_test.go
index c7fa48b..50ee4ab 100644
--- a/traffic_ops/testing/api/v13/profiles_test.go
+++ b/traffic_ops/testing/api/v13/profiles_test.go
@@ -27,8 +27,10 @@ func TestProfiles(t *testing.T) {
 	CreateTestCDNs(t)
 	CreateTestTypes(t)
 	CreateTestProfiles(t)
+	CreateTestParameters(t)
 	UpdateTestProfiles(t)
 	GetTestProfiles(t)
+	DeleteTestParameters(t)
 	DeleteTestProfiles(t)
 	DeleteTestTypes(t)
 	DeleteTestCDNs(t)

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