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
changes/66/637066/1
Tobias Urdin 4 years ago
parent bf4076a01f
commit e1aeb88b38
  1. 5
      releasenotes/notes/oslo-db-type-50bc9f614d50689a.yaml
  2. 1
      types/dbconn.pp

@ -0,0 +1,5 @@
---
features:
- |
Added new Oslo::Dbconn data type that can be used to validate
a database connection pattern.

@ -0,0 +1 @@
type Oslo::Dbconn = Pattern[/^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?|mongodb):\/\/(\S+:\S+@\S+\/\S+)?/]
Loading…
Cancel
Save