Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-1008

LIbcloud is not able to authenticate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 0.13.3
    • None
    • Core, Libcloud REST
    • None

    Description

      LIbcloud is not able to authenticate. This is a simple script i am trying. let me know if need more info.

      Version:  apache_libcloud-2.2.1

      from pprint import pprint

      from libcloud.compute.providers import get_driver
      from libcloud.compute.types import Provider
      import libcloud.security

      libcloud.security.VERIFY_SSL_CERT = False

      Openstack = get_driver(Provider.OPENSTACK)
      openstack_ip="10.48.1.99"
      con = Openstack(
      'justuser', 'justpp',
      ex_force_auth_url="http://{openstack_ip}:5000/".format(openstack_ip=openstack_ip),
      ex_force_auth_version='2.0_password',
      ex_tenant_name='harmonyqa',secure=False)

      #pprint(con.list_locations())
      #pprint(con.list_images())
      pprint(con.list_nodes())

       

      /usr/local/bin/python3.6 /Users/sushantgupta/code/libcloud/a.py
      Traceback (most recent call last):
      File "/Users/sushantgupta/code/libcloud/a.py", line 19, in <module>
      pprint(con.list_nodes())
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/libcloud/compute/drivers/openstack.py", line 175, in list_nodes
      self.connection.request('/servers/detail', params=params).object)
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/libcloud/common/openstack.py", line 223, in request
      raw=raw)
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/libcloud/common/base.py", line 535, in request
      action = self.morph_action_hook(action)
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/libcloud/common/openstack.py", line 290, in morph_action_hook
      self._populate_hosts_and_request_paths()
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/libcloud/common/openstack.py", line 324, in _populate_hosts_and_request_paths
      osa = osa.authenticate(**kwargs) # may throw InvalidCreds
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/libcloud/common/openstack_identity.py", line 855, in authenticate
      return self._authenticate_2_0_with_password()
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/libcloud/common/openstack_identity.py", line 880, in _authenticate_2_0_with_password
      return self._authenticate_2_0_with_body(reqbody)
      File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/libcloud/common/openstack_identity.py", line 893, in _authenticate_2_0_with_body
      driver=self.driver)
      libcloud.common.types.MalformedResponseError: <MalformedResponseException in <libcloud.compute.drivers.openstack.OpenStack_1_1_NodeDriver object at 0x100dbd7b8> 'Malformed response'>: 'code: 300 body: {"versions": {"values": [{"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [

      {"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}

      ], "id": "v3.4", "links": [\{"href": "http://10.48.1.99:5000/v3/", "rel": "self"}]}, {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [

      {"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}

      ], "id": "v2.0", "links": [\{"href": "http://10.48.1.99:5000/v2.0/", "rel": "self"}, \{"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}]}}'

      Process finished with exit code 1

       

       

       

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            sushantg Sushant Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: