Add 'database' to the datasource schema

The database option is supported by influxdb type
but missing in the schema

Change-Id: Id993a8e31e6df4d6374ecccd16dfb6c70ea54c45
This commit is contained in:
Enrique Llorente 2018-05-23 13:54:38 +02:00
parent 2da2da1a9a
commit abbef4e6b5
3 changed files with 18 additions and 0 deletions

View File

@ -26,5 +26,6 @@ class Datasource(object):
'influxdb'),
v.Required('url'): v.All(str, v.Length(min=1)),
v.Optional('orgId'): int,
v.Optional('database'): v.All(str, v.Length(min=1)),
}
return datasource

View File

@ -0,0 +1,12 @@
{
"datasource": {
"new-datasource": {
"access": "direct",
"database": "foodb",
"isDefault": false,
"name": "New datasource",
"type": "influxdb",
"url": "http://example.org"
}
}
}

View File

@ -0,0 +1,5 @@
datasource:
name: New datasource
url: http://example.org
type: influxdb
database: foodb