发起问题

scrop 的档案 - activity

2019-04-19 01:24:40 -0500 获得奖牌  著名问题 (source)
2019-03-26 02:07:58 -0500 获得奖牌  热门的问题 (source)
2018-06-18 01:06:43 -0500 获得奖牌  受欢迎的问题 (source)
2018-04-25 09:27:15 -0500 获得奖牌  粉丝
2018-02-26 06:03:21 -0500 问了问题 Unable to list glance images using python api

As per the documentation https://docs.openstack.org/newton/user-guide/sdk-manage-images.html (https://docs.openstack.org/newton/use...) , I wrote the following code:

#

from os import environ as env
import os_client_config
nova = os_client_config.make_client('compute',auth_url=env['OS_AUTH_URL'],username=env['OS_USERNAME'],password=env['OS_PASSWORD'], project_name=env['OS_PROJECT_NAME'], user_domain_name=env['OS_USER_DOMAIN_NAME'])
import glanceclient.v2.client as glclient
glance = glclient.Client('2',auth_url=env['OS_AUTH_URL'],username=env['OS_USERNAME'],password=env['OS_PASSWORD'], project_name=env['OS_PROJECT_NAME'], user_domain_name=env['OS_USER_DOMAIN_NAME'])
images = glance.images.list()
images list(images)

#

The following error is shown:
Traceback (most recent call last): File "auth.py", line 10, in <module> list(images) File "/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 524, in next return self._next() File "/usr/lib/python2.7/site-packages/glanceclient/common/utils.py", line 517, in _next obj, resp = next(self._self_wrapped) File "/usr/lib/python2.7/site-packages/glanceclient/v2/images.py", line 183, in list for image, resp in paginate(url, page_size, limit): File "/usr/lib/python2.7/site-packages/glanceclient/v2/images.py", line 110, in paginate resp, body = self.http_client.get(next_url, headers=req_id_hdr) File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 286, in get return self._request('GET', url, **kwargs) File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 262, in _request raise exc.CommunicationError(message=message) glanceclient.exc.CommunicationError: Error communicating with 2 Invalid URL '2/v2/images?limit=20': No schema supplied. Perhaps you meant http://2/v2/images?limit=20? </module>

I have been trying running this past few days. Any help would be appreciated.
(Note : I am a beginner and need guidance.)