api Package

exception Module

exception cbtestlib.membase.api.exception.AddNodeException(nodeIp='', remoteIp='', reason='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.BucketCreationException(ip='', bucket_name='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.ClusterRemoteException(nodeIp='', remoteIp='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.CompactViewFailed(design_doc_name, reason='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.DesignDocCreationException(design_doc_name, reason='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.FailoverFailedException(string='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.GetBucketInfoFailed(bucket, reason='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.InvalidArgumentException(api, parameters)

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.MembaseHttpException(message, type, parameters)

Bases: exceptions.Exception

class cbtestlib.membase.api.exception.MembaseHttpExceptionTypes

Bases: object

BUCKET_CREATION_ERROR = 1004
NODE_ALREADY_JOINED = 1002
NODE_CANT_ADD_TO_ITSELF = 1003
NOT_REACHABLE = 1001
REMOTE_CLUSTER_JOIN_FAILED = 1006
STATS_UNAVAILABLE = 1005
UNAUTHORIZED = 1000
exception cbtestlib.membase.api.exception.QueryViewException(view_name, reason='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.ReadDocumentException(doc_id, reason='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.RebalanceFailedException(string='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.ServerAlreadyJoinedException(nodeIp='', remoteIp='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.ServerSelfJoinException(nodeIp='', remoteIp='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.ServerUnavailableException(ip='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.SetViewInfoNotFound(design_doc_name, reason='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.StatsUnavailableException

Bases: cbtestlib.membase.api.exception.MembaseHttpException

exception cbtestlib.membase.api.exception.UnauthorizedException(username='', password='')

Bases: cbtestlib.membase.api.exception.MembaseHttpException

mimeTypes Module

Copyright (C) 2008 Benjamin O’Steen

This file is part of python-fedoracommons.

python-fedoracommons is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

python-fedoracommons is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with python-fedoracommons. If not, see <http://www.gnu.org/licenses/>.

class cbtestlib.membase.api.mimeTypes.mimeTypes

Bases: object

getDictionary()

rest_client Module

class cbtestlib.membase.api.rest_client.AutoFailoverSettings

Bases: object

class cbtestlib.membase.api.rest_client.Bucket(bucket_size='', name='', authType='sasl', saslPassword='', num_replicas=0, port=11211, master_id=None)

Bases: object

class cbtestlib.membase.api.rest_client.BucketStats

Bases: object

class cbtestlib.membase.api.rest_client.MembaseServerVersion(implementationVersion='', componentsVersion='')
class cbtestlib.membase.api.rest_client.Node

Bases: object

class cbtestlib.membase.api.rest_client.NodeDataStorage

Bases: object

get_data_path()
get_index_path()
class cbtestlib.membase.api.rest_client.NodeDiskStorage

Bases: object

class cbtestlib.membase.api.rest_client.NodeInfo

Bases: object

class cbtestlib.membase.api.rest_client.NodePort

Bases: object

class cbtestlib.membase.api.rest_client.OtpNode(id='', status='')

Bases: object

class cbtestlib.membase.api.rest_client.RestConnection(serverInfo)

Bases: object

active_tasks()
add_node(user='', password='', remoteIp='', port='8091')
add_remote_cluster(remoteIp, remotePort, username, password, name)
all_docs(bucket, params={}, limit=None, timeout=120)
check_compaction_status(bucket)
cluster_status()
create_bucket(bucket='', ramQuotaMB=1, authType='none', saslPassword='', replicaNumber=1, proxyPort=11211, bucketType='membase', replica_index=1)
create_ddoc(design_doc_name, bucket_name, views)
create_design_document(bucket, design_doc)
create_spatial(bucket, spatial, function)
create_view(design_doc_name, bucket_name, views)
ddoc_compaction(design_doc_id, bucket='default')
delete_bucket(bucket='default')
delete_spatial(bucket, spatial)
delete_view(bucket, view)
diag_eval(code)
disable_autofailover_alerts()
eject_node(user='', password='', otpNode=None)
enable_autofailover_alerts(recipients, sender, email_username, email_password, email_host='localhost', email_port=25, email_encrypt='false', alerts='auto_failover_node, auto_failover_maximum_reached')
fail_over(otpNode=None)
fetch_bucket_stats(bucket='default', zoom='minute')

Return deserialized buckets stats.

Keyword argument: bucket – bucket name zoom – stats zoom level (minute | hour | day | week | month | year)

fetch_system_stats()

Return deserialized system stats.

get_autofailover_settings()
get_bucket(bucket='default', num_attempt=1, timeout=1)
get_bucket_json(bucket='default')
get_bucket_stats(bucket='default')
get_bucket_stats_for_node(bucket='default', node=None)
get_buckets()
get_couch_doc(doc_id, bucket='default', timeout=120)

use couchBase uri to retrieve document from a bucket

get_database_disk_size(bucket='default')
get_ddoc(bucket, ddoc_name)
get_nodes()
get_nodes_self(timeout=120)
get_pools()
get_pools_info()
get_random_key(bucket)
get_remote_clusters()
get_replications()
get_spatial(bucket, spatial)
get_vbuckets(bucket='default')
get_view(bucket, view)
init_cluster(username='Administrator', password='password')
init_cluster_memoryQuota(username='Administrator', password='password', memoryQuota=256)
init_cluster_port(username='Administrator', password='password')
init_http_request(api)
log_client_error(post)
monitorRebalance(stop_if_loop=False)
node_statuses(timeout=120)
ns_server_tasks()
query_view(design_doc_name, view_name, bucket, query, timeout=120, invalid_query=False)
rebalance(otpNodes, ejectedNodes)
rebalance_statuses()
remove_all_remote_clusters()
remove_all_replications()
remove_remote_cluster(name)
reset_autofailover()
run_view(bucket, view, name)
set_auto_compaction(parallelDBAndVC='false', dbFragmentThreshold=None, viewFragmntThreshold=None, dbFragmentThresholdPercentage=100, viewFragmntThresholdPercentage=100, allowedTimePeriodFromHour=None, allowedTimePeriodFromMin=None, allowedTimePeriodToHour=None, allowedTimePeriodToMin=None, allowedTimePeriodAbort=None, bucket=None)

Reset compaction values to default, try with old fields (dp4 build) and then try with newer fields

set_couchdb_option(section, option, value)

Dynamic settings changes

set_data_path(data_path=None)
set_ensure_full_commit(value)

Dynamic settings changes

set_global_loglevel(loglevel='error')

Set cluster-wide logging level for core components

Possible loglevel:
– debug – info – warn – error
set_reb_cons_view(disable=True)

Enable/disable consistent view for rebalance tasks

set_view_info(bucket, design_name)

Get view diagnostic info (node specific)

spatial_compaction(bucket, design_name)
spatial_info(bucket, design_name)
spatial_results(bucket, spatial, params, limit=100)
start_replication(replicationType, fromBucket, toCluster, toBucket=None)
stop_rebalance(wait_timeout=10)
stop_replication(database, rep_id)
update_autofailover_settings(enabled, timeout)
view_results(bucket, ddoc_name, params, limit=100, timeout=120, view_name=None)
class cbtestlib.membase.api.rest_client.RestHelper(rest_connection)

Bases: object

all_nodes_replicated(debug=False)
bucket_exists(bucket)
is_cluster_healthy(timeout=120)
is_cluster_rebalanced()
is_ns_server_running(timeout_in_seconds=360)
rebalance_reached(percentage=100)
remove_nodes(knownNodes, ejectedNodes, wait_for_rebalance=True)
vbucket_map_ready(bucket, timeout_in_seconds=360)
wait_for_node_status(node, expected_status, timeout_in_seconds)
wait_for_replication(timeout_in_seconds=120)
class cbtestlib.membase.api.rest_client.RestParser

Bases: object

parse_get_bucket_json(parsed)
parse_get_bucket_response(response)
parse_get_nodes_response(parsed)
class cbtestlib.membase.api.rest_client.vBucket

Bases: object

tap Module

tap protocol client.

Copyright (c) 2010 Dustin Sallings <dustin@spy.net>

class cbtestlib.membase.api.tap.TapClient(servers, callback, opts={})

Bases: object

class cbtestlib.membase.api.tap.TapConnection(server, port, callback, clientId=None, opts={})

Bases: object

handle_close()
handle_connect()
processCommand(cmd, klen, vb, extralen, cas, data)
receive()
class cbtestlib.membase.api.tap.TapDescriptor(server)

Bases: object

id = None
port = 11210
cbtestlib.membase.api.tap.abbrev(v, maxlen=30)
cbtestlib.membase.api.tap.buildGoodSet(goodChars='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+, -./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c', badChar='?')

Build a translation table that turns all characters not in goodChars to badChar

cbtestlib.membase.api.tap.keyprint(v)

Table Of Contents

Previous topic

membase Package

Next topic

httplib2 Package

This Page