← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1333161] [NEW] delete image url in glanceclient v2

 

Public bug reported:

I notice the delete image method in v2/images.py has no slash(/) in
front of "v2", but others have:

def delete(self, image_id):
    self.http_client.json_request('DELETE', 'v2/images/%s' % image_id)

def get(self, image_id):
    url = '/v2/images/%s' % image_id

And the log like follows:

curl -i -X DELETE -H 'X-Auth-Token: ***' -H 'Content-Type:
application/json' -H 'User-Agent: python-glanceclient'
http://127.0.0.1:9292v2/images/ad44c714-d4f3-4568-b5fc-d4f2dbbe1f89

There is no slash between port and path_info, this may causes some
problems if there is nginx in front of glance-api

** Affects: glance
     Importance: Undecided
         Status: New

** Description changed:

  I notice the delete image method in v2/images.py has no slash(/) in
  front of "v2", but others have:
  
  def delete(self, image_id):
-     self.http_client.json_request('DELETE', 'v2/images/%s' % image_id)
+     self.http_client.json_request('DELETE', 'v2/images/%s' % image_id)
  
- def get(self, image_id):   
-     url = '/v2/images/%s' % image_id
+ def get(self, image_id):
+     url = '/v2/images/%s' % image_id
  
- And when the log like follows:
+ And the log like follows:
  
  curl -i -X DELETE -H 'X-Auth-Token: ***' -H 'Content-Type:
  application/json' -H 'User-Agent: python-glanceclient'
  http://127.0.0.1:9292v2/images/ad44c714-d4f3-4568-b5fc-d4f2dbbe1f89
  
  There is no slash between port and path_info

** Description changed:

  I notice the delete image method in v2/images.py has no slash(/) in
  front of "v2", but others have:
  
  def delete(self, image_id):
      self.http_client.json_request('DELETE', 'v2/images/%s' % image_id)
  
  def get(self, image_id):
      url = '/v2/images/%s' % image_id
  
  And the log like follows:
  
  curl -i -X DELETE -H 'X-Auth-Token: ***' -H 'Content-Type:
  application/json' -H 'User-Agent: python-glanceclient'
  http://127.0.0.1:9292v2/images/ad44c714-d4f3-4568-b5fc-d4f2dbbe1f89
  
- There is no slash between port and path_info
+ There is no slash between port and path_info, this may causes some
+ problems if there is nginx in front of glance-api

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1333161

Title:
  delete image url in glanceclient v2

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  I notice the delete image method in v2/images.py has no slash(/) in
  front of "v2", but others have:

  def delete(self, image_id):
      self.http_client.json_request('DELETE', 'v2/images/%s' % image_id)

  def get(self, image_id):
      url = '/v2/images/%s' % image_id

  And the log like follows:

  curl -i -X DELETE -H 'X-Auth-Token: ***' -H 'Content-Type:
  application/json' -H 'User-Agent: python-glanceclient'
  http://127.0.0.1:9292v2/images/ad44c714-d4f3-4568-b5fc-d4f2dbbe1f89

  There is no slash between port and path_info, this may causes some
  problems if there is nginx in front of glance-api

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1333161/+subscriptions


Follow ups

References