Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-783

Python SDK: Possible mismatch between Admin class __init__ and Cluster class _authenticate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.0.0
    • None
    • None
    • None
    • 1
    • SDK13: Coll/Txn/Docs More Chip

    Description

      In the Cluster class (couchbase/cluster.py) 'connstr' is passed to Admin

          def _authenticate(self,
                            authenticator=None,  # type: CoreAuthenticator
                            username=None,  # type: str
                            password=None  # type: str
                            ):
              self._cluster.authenticate(authenticator, username, password)
              credentials = authenticator.get_credentials()
              self._clusteropts = credentials.get('options', {})
              self._clusteropts['bucket'] = "default"
              self._clusterclient=None
              auth=credentials.get('options')
              self.admin = Admin(auth.get('username'), auth.get('password'), connstr=str(self.connstr))
      

      But in the Admin class (couchbase/management/admin.py) it looks for 'connection_string'. As a result it'll enter the "if not connection_string" code path.

              connection_string = kwargs.pop('connection_string', None)
              bucket = kwargs.pop('bucket', 'default')
              if not connection_string:
                  connection_string = "http://{0}:{1}".format(host, port)
                  connection_string += "/{0}".format(bucket)
                  connection_string += "?ipv6=" + kwargs.pop('ipv6', 'disabled')
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Ellis.Breen Ellis Breen
            steve.watanabe Steve Watanabe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty