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):
|
def test_default(self):
|
||||||
self.assertEqual("foobar",
|
self.assertEqual("foobar",
|
||||||
value_types.ensure_type("foobar", "default"))
|
value_types.ensure_type("foobar", "default"))
|
||||||
|
self.assertEqual("x86_64",
|
||||||
|
value_types.ensure_type("x86_64", "default"))
|
||||||
|
|
||||||
def test_default_bad(self):
|
def test_default_bad(self):
|
||||||
self.assertRaises(config_exception.ConfigException,
|
self.assertRaises(config_exception.ConfigException,
|
||||||
|
|
|
@ -19,7 +19,7 @@ from config_exception import ConfigException
|
||||||
|
|
||||||
TYPES = {
|
TYPES = {
|
||||||
"int": "^[0-9]+$",
|
"int": "^[0-9]+$",
|
||||||
"default": "^[A-Za-z0-9]*$",
|
"default": "^[A-Za-z0-9_]*$",
|
||||||
"netaddress": "^[A-Za-z0-9/.:-]+$",
|
"netaddress": "^[A-Za-z0-9/.:-]+$",
|
||||||
"raw": ""
|
"raw": ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue