Add Oslo::Dbconn data type
This a custom data type that moves the regular expression pattern that we are using in oslo::db to a type so that we can use it with validate_legacy and after that explicitly as a data type for the parameters for database connection strings. Change-Id: Icbdd8f9dca5749eb9fadb8e3a5fba8dfd5f098d9
This commit is contained in:
parent
bf4076a01f
commit
e1aeb88b38
5
releasenotes/notes/oslo-db-type-50bc9f614d50689a.yaml
Normal file
5
releasenotes/notes/oslo-db-type-50bc9f614d50689a.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added new Oslo::Dbconn data type that can be used to validate
|
||||
a database connection pattern.
|
1
types/dbconn.pp
Normal file
1
types/dbconn.pp
Normal file
@ -0,0 +1 @@
|
||||
type Oslo::Dbconn = Pattern[/^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?|mongodb):\/\/(\S+:\S+@\S+\/\S+)?/]
|
Loading…
Reference in New Issue
Block a user