Added API version to URL

Closes-Bug: 1287933
Change-Id: I48781f016f47f9b626410638271ce55fac3d39db
This commit is contained in:
Jay Baugh 2014-03-06 00:04:22 +00:00
parent a0b4feb488
commit 7ed5591012
5 changed files with 7 additions and 6 deletions

View File

@ -17,7 +17,7 @@ import time
from marconiclient.queues.v1 import client
URL = 'http://localhost:8888/v1'
URL = 'http://localhost:8888'
cli = client.Client(URL)
queue = cli.queue('worker-jobs')

View File

@ -14,7 +14,7 @@
from marconiclient.queues import client
URL = 'http://localhost:8888/v1'
URL = 'http://localhost:8888'
def healthy():

View File

@ -16,7 +16,7 @@
# an upper package. It's version agnostic.
from marconiclient.queues.v1 import client
URL = 'http://localhost:8888/v1'
URL = 'http://localhost:8888'
def create_post_delete(queue_name, messages):

View File

@ -72,8 +72,9 @@ class HttpTransport(base.Transport):
ref_params[param] = value
url = '{0}/{1}'.format(request.endpoint.rstrip('/'),
ref.format(**ref_params))
url = '{0}/{1}/{2}'.format(request.endpoint.rstrip('/'),
request.api.label,
ref.format(**ref_params))
return url, schema.get('method', 'GET'), request
def send(self, request):

View File

@ -49,7 +49,7 @@ class TestHttpTransport(base.TestBase):
req._api = self.api
self.transport.send(req)
final_url = 'http://example.org/test/Test'
final_url = 'http://example.org/v1/test/Test'
final_params = {'address': 'Outer space'}
final_headers = {'content-type': 'application/json'}