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')
|