Allow default type's to contain underscores.
Fixes LP Bug #1188786. Change-Id: I2ff2b4abc88ca914220a7de1fa0ef05a6105b9c1
This commit is contained in:
parent
e76e73a61d
commit
48e6c5f40e
@ -31,6 +31,8 @@ class ValueTypeTestCase(testtools.TestCase):
|
||||
def test_default(self):
|
||||
self.assertEqual("foobar",
|
||||
value_types.ensure_type("foobar", "default"))
|
||||
self.assertEqual("x86_64",
|
||||
value_types.ensure_type("x86_64", "default"))
|
||||
|
||||
def test_default_bad(self):
|
||||
self.assertRaises(config_exception.ConfigException,
|
||||
|
@ -19,7 +19,7 @@ from config_exception import ConfigException
|
||||
|
||||
TYPES = {
|
||||
"int": "^[0-9]+$",
|
||||
"default": "^[A-Za-z0-9]*$",
|
||||
"default": "^[A-Za-z0-9_]*$",
|
||||
"netaddress": "^[A-Za-z0-9/.:-]+$",
|
||||
"raw": ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user