Support dot character in queue's name

Now Zaqar doesn't support '.' in queue name.
This feature will introduce the support for this.

Change-Id: Id698f043c0b1bc50567aba149e2235d9443bc105
Closes-Bug: #1695848
This commit is contained in:
wanghao 2017-06-05 16:17:30 +08:00
parent 0369fa3946
commit a887d78957
3 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,3 @@
---
features:
- Support dot character in queue's name, like 'service.test_queue'.

View File

@ -136,6 +136,10 @@ class TestQueueLifecycleMongoDB(base.V2Base):
headers=self.headers) headers=self.headers)
self.assertEqual(falcon.HTTP_400, self.srmock.status) self.assertEqual(falcon.HTTP_400, self.srmock.status)
self.simulate_put(self.queue_path + '/Service.test_queue',
headers=self.headers)
self.assertEqual(falcon.HTTP_201, self.srmock.status)
def test_project_id_restriction(self): def test_project_id_restriction(self):
muvluv_queue_path = self.queue_path + '/Muv-Luv' muvluv_queue_path = self.queue_path + '/Muv-Luv'

View File

@ -91,7 +91,7 @@ _TRANSPORT_LIMITS_GROUP = 'transport'
# NOTE(kgriffs): Don't use \w because it isn't guaranteed to match # NOTE(kgriffs): Don't use \w because it isn't guaranteed to match
# only ASCII characters. # only ASCII characters.
QUEUE_NAME_REGEX = re.compile('^[a-zA-Z0-9_\-]+$') QUEUE_NAME_REGEX = re.compile('^[a-zA-Z0-9_\-.]+$')
QUEUE_NAME_MAX_LEN = 64 QUEUE_NAME_MAX_LEN = 64
PROJECT_ID_MAX_LEN = 256 PROJECT_ID_MAX_LEN = 256