Fix problem about location header in Zaqar resource2
The name string of location header of Zaqar API response is lower case. This is inconsistent with the guide from API-WG and thus make sdk unable to parse location header correctly. This patch provides a workaround for this issue. Change-Id: I77a474b17aed55b215eb93a3666d444728ded1e9
This commit is contained in:
		| @@ -17,6 +17,11 @@ from openstack import resource2 | ||||
|  | ||||
|  | ||||
| class Claim(resource2.Resource): | ||||
|     # FIXME(anyone): The name string of `location` field of Zaqar API response | ||||
|     # is lower case. That is inconsistent with the guide from API-WG. This is | ||||
|     # a workaround for this issue. | ||||
|     location = resource2.Header("location") | ||||
|  | ||||
|     resources_key = 'claims' | ||||
|     base_path = '/queues/%(queue_name)s/claims' | ||||
|     service = message_service.MessageService() | ||||
|   | ||||
| @@ -17,6 +17,11 @@ from openstack import resource2 | ||||
|  | ||||
|  | ||||
| class Message(resource2.Resource): | ||||
|     # FIXME(anyone): The name string of `location` field of Zaqar API response | ||||
|     # is lower case. That is inconsistent with the guide from API-WG. This is | ||||
|     # a workaround for this issue. | ||||
|     location = resource2.Header("location") | ||||
|  | ||||
|     resources_key = 'messages' | ||||
|     base_path = '/queues/%(queue_name)s/messages' | ||||
|     service = message_service.MessageService() | ||||
|   | ||||
| @@ -17,6 +17,11 @@ from openstack import resource2 | ||||
|  | ||||
|  | ||||
| class Queue(resource2.Resource): | ||||
|     # FIXME(anyone): The name string of `location` field of Zaqar API response | ||||
|     # is lower case. That is inconsistent with the guide from API-WG. This is | ||||
|     # a workaround for this issue. | ||||
|     location = resource2.Header("location") | ||||
|  | ||||
|     resources_key = "queues" | ||||
|     base_path = "/queues" | ||||
|     service = message_service.MessageService() | ||||
|   | ||||
| @@ -17,6 +17,11 @@ from openstack import resource2 | ||||
|  | ||||
|  | ||||
| class Subscription(resource2.Resource): | ||||
|     # FIXME(anyone): The name string of `location` field of Zaqar API response | ||||
|     # is lower case. That is inconsistent with the guide from API-WG. This is | ||||
|     # a workaround for this issue. | ||||
|     location = resource2.Header("location") | ||||
|  | ||||
|     resources_key = 'subscriptions' | ||||
|     base_path = '/queues/%(queue_name)s/subscriptions' | ||||
|     service = message_service.MessageService() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 yanyanhu
					yanyanhu