diff --git a/chronograf.go b/chronograf.go index 0f336994e..bdc9d5fc9 100644 --- a/chronograf.go +++ b/chronograf.go @@ -236,6 +236,7 @@ type Source struct { Telegraf string `json:"telegraf"` // Telegraf is the db telegraf is written to. By default it is "telegraf" Organization string `json:"organization"` // Organization is the organization ID that resource belongs to Role string `json:"role,omitempty"` // Not Currently Used. Role is the name of the minimum role that a user must possess to access the resource. + DefaultRP string `json:"defaultRP"` // DefaultRP is the default retention policy used in database queries to this source } // SourcesStore stores connection information for a `TimeSeries` diff --git a/server/sources_test.go b/server/sources_test.go index ed42c4de7..2ce4160d6 100644 --- a/server/sources_test.go +++ b/server/sources_test.go @@ -440,7 +440,8 @@ func TestService_SourcesID(t *testing.T) { ID: "1", wantStatusCode: 200, wantContentType: "application/json", - wantBody: `{"id":"1","name":"","url":"","default":false,"telegraf":"telegraf","organization":"","links":{"self":"/chronograf/v1/sources/1","kapacitors":"/chronograf/v1/sources/1/kapacitors","proxy":"/chronograf/v1/sources/1/proxy","queries":"/chronograf/v1/sources/1/queries","write":"/chronograf/v1/sources/1/write","permissions":"/chronograf/v1/sources/1/permissions","users":"/chronograf/v1/sources/1/users","databases":"/chronograf/v1/sources/1/dbs","annotations":"/chronograf/v1/sources/1/annotations","health":"/chronograf/v1/sources/1/health"}, "defaultRP":""}`, + wantBody: `{"id":"1","name":"","url":"","default":false,"telegraf":"telegraf","organization":"","defaultRP":"","links":{"self":"/chronograf/v1/sources/1","kapacitors":"/chronograf/v1/sources/1/kapacitors","proxy":"/chronograf/v1/sources/1/proxy","queries":"/chronograf/v1/sources/1/queries","write":"/chronograf/v1/sources/1/write","permissions":"/chronograf/v1/sources/1/permissions","users":"/chronograf/v1/sources/1/users","databases":"/chronograf/v1/sources/1/dbs","annotations":"/chronograf/v1/sources/1/annotations","health":"/chronograf/v1/sources/1/health"}} +`, }, } for _, tt := range tests {