Skip to content

Commit 757a1ec

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Fix problem about location header in Zaqar resource2"
2 parents 3634c86 + 32aece6 commit 757a1ec

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

openstack/message/v2/claim.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818

1919
class Claim(resource2.Resource):
20+
# FIXME(anyone): The name string of `location` field of Zaqar API response
21+
# is lower case. That is inconsistent with the guide from API-WG. This is
22+
# a workaround for this issue.
23+
location = resource2.Header("location")
24+
2025
resources_key = 'claims'
2126
base_path = '/queues/%(queue_name)s/claims'
2227
service = message_service.MessageService()

openstack/message/v2/message.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818

1919
class Message(resource2.Resource):
20+
# FIXME(anyone): The name string of `location` field of Zaqar API response
21+
# is lower case. That is inconsistent with the guide from API-WG. This is
22+
# a workaround for this issue.
23+
location = resource2.Header("location")
24+
2025
resources_key = 'messages'
2126
base_path = '/queues/%(queue_name)s/messages'
2227
service = message_service.MessageService()

openstack/message/v2/queue.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818

1919
class Queue(resource2.Resource):
20+
# FIXME(anyone): The name string of `location` field of Zaqar API response
21+
# is lower case. That is inconsistent with the guide from API-WG. This is
22+
# a workaround for this issue.
23+
location = resource2.Header("location")
24+
2025
resources_key = "queues"
2126
base_path = "/queues"
2227
service = message_service.MessageService()

openstack/message/v2/subscription.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818

1919
class Subscription(resource2.Resource):
20+
# FIXME(anyone): The name string of `location` field of Zaqar API response
21+
# is lower case. That is inconsistent with the guide from API-WG. This is
22+
# a workaround for this issue.
23+
location = resource2.Header("location")
24+
2025
resources_key = 'subscriptions'
2126
base_path = '/queues/%(queue_name)s/subscriptions'
2227
service = message_service.MessageService()

0 commit comments

Comments
 (0)