本文整理汇总了Python中membase.api.rest_client.RestConnection.create_bucket方法的典型用法代码示例。如果您正苦于以下问题:Python RestConnection.create_bucket方法的具体用法?Python RestConnection.create_bucket怎么用?Python RestConnection.create_bucket使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类membase.api.rest_client.RestConnection
的用法示例。
在下文中一共展示了RestConnection.create_bucket方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _XDCR_role_test
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def _XDCR_role_test(self):
params = {}
remote_cluster_name = 'rbac_cluster'
remote_server01 = self.servers[1]
remote_server02 = self.servers[2]
read_role = '_replication_admin_read'
write_role = '_replication_admin_write'
rest_remote01 = RestConnection(remote_server01)
rest_remote01.create_bucket(bucket='default', ramQuotaMB=100)
rest_remote02 = RestConnection(remote_server02)
rest_remote02.create_bucket(bucket='default', ramQuotaMB=100)
#------ First Test the Get Requests for XDCR --------------#
#Remove all remote cluster references
self.rest.remove_all_replications()
self.rest.remove_all_remote_clusters()
#Add remote cluster reference and replications
self.rest.add_remote_cluster(remote_server01.ip,8091,'Administrator','password',remote_cluster_name)
replication_id = self.rest.start_replication('continuous','default',remote_cluster_name)
masDict,tc_status = self.rbac._iterate_role_mapping(read_role,"Administrator","password",{'replication_id':replication_id})
self.rest.remove_all_replications()
self.rest.remove_all_remote_clusters()
rest_remote01.remove_all_replications()
rest_remote01.remove_all_remote_clusters()
rest_remote02.remove_all_replications()
rest_remote02.remove_all_remote_clusters()
# ----------- Second Test for POST requests for XDCR ---------------#
self.rest.remove_all_replications()
self.rest.remove_all_remote_clusters()
rest_remote01.remove_all_replications()
rest_remote01.remove_all_remote_clusters()
rest_remote02.remove_all_replications()
rest_remote02.remove_all_remote_clusters()
self.rest.add_remote_cluster(remote_server01.ip,8091,'Administrator','password',"onetotwo")
#self.rest.add_remote_cluster(remote_server02.ip,8091,'Administrator','password','onetothree')
#rest_remote01.add_remote_cluster(remote_server02.ip,8091,'Administrator','password',"twotothree")
rest_remote01.add_remote_cluster(self.master.ip,8091,'Administrator','password','twotoone')
rest_remote02.add_remote_cluster(remote_server01.ip,8091,'Administrator','password',"threetotwo")
rest_remote02.add_remote_cluster(self.master.ip,8091,'Administrator','password','threetoone')
params['remote_cluster_name']='onetotwo'
params['remoteCluster01'] = {'username': 'Administrator', 'password': 'password', 'hostname': '192.168.46.103:8091', 'name': 'onetothree'}
params['create_replication'] = {'replicationType': 'continuous','toBucket': 'default','fromBucket': 'default','toCluster': 'twotoone','type': 'xmem'}
params['replication_id'] = rest_remote01.start_replication('continuous','default','twotoone')
masDict,tc_status = self.rbac._iterate_role_mapping('_replication_admin_write01',"Administrator","password",params)
masDict,tc_status = self.rbac._iterate_role_mapping('_replication_admin_write02',"Administrator","password",params,self.servers[1])
'''
示例2: cluster_xdcr_settings_write
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def cluster_xdcr_settings_write(self,username,password,host,port=8091,servers=None,cluster=None,httpCode=None,user_role=None):
_cluster_xdcr_settings_read = {
"replication_settings":"settings/replications;POST;{'httpConnections': 20}"
}
rest = RestConnection(servers[0])
rest.remove_all_replications()
rest.remove_all_remote_clusters()
remote_cluster_name = 'rbac_cluster'
rest = RestConnection(servers[0])
remote_server01 = servers[1]
remote_server02 = servers[2]
rest_remote01 = RestConnection(remote_server01)
rest_remote01.delete_bucket()
rest_remote01.create_bucket(bucket='default', ramQuotaMB=100)
rest_remote02 = RestConnection(remote_server02)
rest_remote02.delete_bucket()
remote_id = rest.add_remote_cluster(remote_server01.ip,8091,'Administrator','password',remote_cluster_name)
time.sleep(20)
replication_id = rest.start_replication('continuous','default',remote_cluster_name)
result = self._return_http_code(_cluster_xdcr_settings_read,username,password,host=host,port=port, httpCode=httpCode, user_role=user_role)
rest.remove_all_replications()
rest.remove_all_remote_clusters()
rest_remote01.delete_bucket()
示例3: test_basic_xdcr_with_cert_regenerate
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def test_basic_xdcr_with_cert_regenerate(self):
cluster1 = self.servers[0:2]
cluster2 = self.servers[2:4]
remote_cluster_name = 'sslcluster'
restCluster1 = RestConnection(cluster1[0])
restCluster2 = RestConnection(cluster2[0])
try:
#Setup cluster1
x509main(cluster1[0]).setup_master()
x509main(cluster1[1])._setup_node_certificates(reload_cert=False)
restCluster1.add_node('Administrator','password',cluster1[1].ip)
known_nodes = ['[email protected]'+cluster1[0].ip,'[email protected]' + cluster1[1].ip]
restCluster1.rebalance(known_nodes)
self.assertTrue(self.check_rebalance_complete(restCluster1),"Issue with rebalance")
restCluster1.create_bucket(bucket='default', ramQuotaMB=100)
restCluster1.remove_all_replications()
restCluster1.remove_all_remote_clusters()
#Setup cluster2
x509main(cluster2[0]).setup_master()
x509main(cluster2[1])._setup_node_certificates(reload_cert=False)
restCluster2.add_node('Administrator','password',cluster2[1].ip)
known_nodes = ['[email protected]'+cluster2[0].ip,'[email protected]' + cluster2[1].ip]
restCluster2.rebalance(known_nodes)
self.assertTrue(self.check_rebalance_complete(restCluster2),"Issue with rebalance")
restCluster2.create_bucket(bucket='default', ramQuotaMB=100)
test = x509main.CACERTFILEPATH + x509main.CACERTFILE
data = open(test, 'rb').read()
restCluster1.add_remote_cluster(cluster2[0].ip,cluster2[0].port,'Administrator','password',remote_cluster_name,certificate=data)
replication_id = restCluster1.start_replication('continuous','default',remote_cluster_name)
#restCluster1.set_xdcr_param('default','default','pauseRequested',True)
x509main(self.master)._delete_inbox_folder()
x509main(self.master)._generate_cert(self.servers,root_cn="CB\ Authority")
self.log.info ("Setting up the first cluster for new certificate")
x509main(cluster1[0]).setup_master()
x509main(cluster1[1])._setup_node_certificates(reload_cert=False)
self.log.info ("Setting up the second cluster for new certificate")
x509main(cluster2[0]).setup_master()
x509main(cluster2[1])._setup_node_certificates(reload_cert=False)
status = restCluster1.is_replication_paused('default','default')
if not status:
restCluster1.set_xdcr_param('default','default','pauseRequested',False)
restCluster1.set_xdcr_param('default','default','pauseRequested',True)
status = restCluster1.is_replication_paused('default','default')
self.assertTrue(status,"Replication has not started after certificate upgrade")
finally:
known_nodes = ['[email protected]'+cluster2[0].ip,'[email protected]'+cluster2[1].ip]
restCluster2.rebalance(known_nodes,['[email protected]' + cluster2[1].ip])
self.assertTrue(self.check_rebalance_complete(restCluster2),"Issue with rebalance")
restCluster2.delete_bucket()
示例4: _cluster_setup
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def _cluster_setup(self):
replicas = self.input.param("replicas", 1)
keys_count = self.input.param("keys-count", 0)
num_buckets = self.input.param("num-buckets", 1)
bucket_name = "default"
master = self.servers[0]
credentials = self.input.membase_settings
rest = RestConnection(self.master)
info = rest.get_nodes_self()
rest.init_cluster(username=self.master.rest_username,
password=self.master.rest_password)
rest.init_cluster_memoryQuota(memoryQuota=info.mcdMemoryReserved)
rest.reset_autofailover()
ClusterOperationHelper.add_and_rebalance(self.servers, True)
if num_buckets == 1:
bucket_ram = info.memoryQuota * 2 / 3
rest.create_bucket(bucket=bucket_name,
ramQuotaMB=bucket_ram,
replicaNumber=replicas,
proxyPort=info.moxi)
else:
created = BucketOperationHelper.create_multiple_buckets(self.master, replicas, howmany=num_buckets)
self.assertTrue(created, "unable to create multiple buckets")
buckets = rest.get_buckets()
for bucket in buckets:
ready = BucketOperationHelper.wait_for_memcached(self.master, bucket.name)
self.assertTrue(ready, msg="wait_for_memcached failed")
for bucket in buckets:
inserted_keys_cnt = self.load_data(self.master, bucket.name, keys_count)
log.info('inserted {0} keys'.format(inserted_keys_cnt))
示例5: test_default_moxi
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def test_default_moxi(self):
name = 'default'
for serverInfo in self.servers:
rest = RestConnection(serverInfo)
replicaNumber = 1
proxyPort = rest.get_nodes_self().moxi
rest.create_bucket(bucket=name,
ramQuotaMB=200,
replicaNumber=replicaNumber,
proxyPort=proxyPort)
msg = 'create_bucket succeeded but bucket {0} does not exist'.format(name)
self.assertTrue(BucketOperationHelper.wait_for_bucket_creation(name, rest), msg=msg)
ready = BucketOperationHelper.wait_for_memcached(serverInfo, name)
self.assertTrue(ready, "wait_for_memcached failed")
inserted_keys = BucketOperationHelper.load_some_data(serverInfo, 1, name)
self.assertTrue(inserted_keys, 'unable to insert any key to memcached')
verified = BucketOperationHelper.verify_data(serverInfo, inserted_keys, True, False, self, bucket=name)
self.assertTrue(verified, msg='verified all the keys stored')
#verify keys
rest.delete_bucket(name)
msg = 'bucket "{0}" was not deleted even after waiting for two minutes'.format(name)
self.assertTrue(BucketOperationHelper.wait_for_bucket_deletion(name, rest, timeout_in_seconds=60), msg=msg)
rest.create_bucket(bucket=name,
ramQuotaMB=200,
replicaNumber=replicaNumber,
proxyPort=proxyPort)
msg = 'create_bucket succeeded but bucket {0} does not exist'.format(name)
self.assertTrue(BucketOperationHelper.wait_for_bucket_creation(name, rest), msg=msg)
BucketOperationHelper.wait_for_memcached(serverInfo, name)
#now let's recreate the bucket
self.log.info('recreated the default bucket...')
#loop over the keys make sure they dont exist
self.assertTrue(BucketOperationHelper.keys_dont_exist(serverInfo, inserted_keys, name),
msg='at least one key found in the bucket')
示例6: test_max_buckets
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def test_max_buckets(self):
log = logger.Logger.get_logger()
serverInfo = self.servers[0]
log.info('picking server : {0} as the master'.format(serverInfo))
rest = RestConnection(serverInfo)
proxyPort = rest.get_nodes_self().moxi
info = rest.get_nodes_self()
rest.init_cluster(username=serverInfo.rest_username,
password=serverInfo.rest_password)
rest.init_cluster_memoryQuota(memoryQuota=info.mcdMemoryReserved)
bucket_ram = 100
bucket_count = info.mcdMemoryReserved / bucket_ram
for i in range(bucket_count):
bucket_name = 'max_buckets-{0}'.format(uuid.uuid4())
rest.create_bucket(bucket=bucket_name,
ramQuotaMB=bucket_ram,
authType='sasl', proxyPort=proxyPort)
ready = BucketOperationHelper.wait_for_memcached(serverInfo, bucket_name)
self.assertTrue(ready, "wait_for_memcached failed")
buckets = []
try:
buckets = rest.get_buckets()
except Exception:
log.info('15 seconds sleep before calling get_buckets again...')
time.sleep(15)
buckets = rest.get_buckets()
if len(buckets) != bucket_count:
msg = 'tried to create {0} buckets, only created {1}'.format(bucket_count, len(buckets))
log.error(msg)
self.fail(msg=msg)
示例7: execute
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def execute(self, task_manager):
rest = RestConnection(self.server)
if self.size <= 0:
info = rest.get_nodes_self()
self.size = info.memoryQuota * 2 / 3
authType = 'none' if self.password is None else 'sasl'
try:
rest.create_bucket(bucket=self.bucket,
ramQuotaMB=self.size,
replicaNumber=self.replicas,
proxyPort=self.port,
authType=authType,
saslPassword=self.password)
self.state = CHECKING
task_manager.schedule(self)
except BucketCreationException as e:
self.state = FINISHED
self.set_exception(e)
#catch and set all unexpected exceptions
except Exception as e:
self.state = FINISHED
self.log.info("Unexpected Exception Caught")
self.set_exception(e)
示例8: _create_buckets
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def _create_buckets(self, nodes):
master_node = nodes[0]
num_buckets = 0
if self._default_bucket:
num_buckets += 1
num_buckets += self._sasl_buckets + self._standard_buckets
bucket_size = self._get_bucket_size(master_node, nodes, self._mem_quota_int, num_buckets)
rest = RestConnection(master_node)
master_id = rest.get_nodes_self().id
if self._default_bucket:
if self._default_quota != 0:
bucket_size = self._default_quota
rest = RestConnection(nodes[0])
rest.create_bucket(
bucket=self.default_bucket_name,
ramQuotaMB=bucket_size,
replicaNumber=self._num_replicas,
proxyPort=11211,
authType="none",
saslPassword=None,
)
self._buckets.append(self.default_bucket_name)
if self._sasl_buckets > 0:
if self._sasl_quota != 0:
bucket_size = self._sasl_quota
self._create_sasl_buckets(master_node, master_id, bucket_size, password="password")
if self._standard_buckets > 0:
if self._standard_quota != 0:
bucket_size = self._standard_quota
self._create_standard_buckets(master_node, master_id, bucket_size)
示例9: cluster_bucket_xdcr_read
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def cluster_bucket_xdcr_read(self,username,password,host,port=8091,servers=None,cluster=None,httpCode=None,user_role=None):
_cluster_bucket_xdcr_read = {
"replication_settings":"settings/replications/<id>;GET"
}
rest = RestConnection(servers[0])
rest.remove_all_replications()
rest.remove_all_remote_clusters()
remote_cluster_name = 'rbac_cluster'
rest = RestConnection(servers[0])
remote_server01 = servers[1]
remote_server02 = servers[2]
rest_remote01 = RestConnection(remote_server01)
rest_remote01.delete_bucket()
rest_remote01.create_bucket(bucket='default', ramQuotaMB=100)
rest_remote02 = RestConnection(remote_server02)
remote_id = rest.add_remote_cluster(remote_server01.ip,8091,'Administrator','password',remote_cluster_name)
replication_id = rest.start_replication('continuous','default',remote_cluster_name)
replication_id = replication_id.replace("/","%2F")
bucket_xdcr_read = {"replication_settings":"settings/replications/" + replication_id + ";GET"}
result = self._return_http_code(bucket_xdcr_read,username,password,host=host,port=port, httpCode=httpCode, user_role=user_role)
rest.remove_all_replications()
rest.remove_all_remote_clusters()
rest_remote01.delete_bucket()
示例10: test_add_remove_graceful_add_back_node_with_cert
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def test_add_remove_graceful_add_back_node_with_cert(self,recovery_type=None):
recovery_type = self.input.param('recovery_type')
rest = RestConnection(self.master)
known_nodes = ['[email protected]'+self.master.ip]
progress = None
count = 0
servs_inout = self.servers[1:]
serv_out = '[email protected]' + servs_inout[1].ip
rest.create_bucket(bucket='default', ramQuotaMB=100)
x509main(self.master).setup_master()
x509main().setup_cluster_nodes_ssl(servs_inout)
for server in servs_inout:
rest.add_node('Administrator','password',server.ip)
known_nodes.append('[email protected]' + server.ip)
rest.rebalance(known_nodes)
self.assertTrue(self.check_rebalance_complete(rest),"Issue with rebalance")
for server in servs_inout:
status = x509main(server)._validate_ssl_login()
self.assertEqual(status,200,"Not able to login via SSL code")
rest.fail_over(serv_out,graceful=True)
self.assertTrue(self.check_rebalance_complete(rest),"Issue with rebalance")
rest.set_recovery_type(serv_out,recovery_type)
rest.add_back_node(serv_out)
rest.rebalance(known_nodes)
self.assertTrue(self.check_rebalance_complete(rest),"Issue with rebalance")
for server in servs_inout:
status = x509main(server)._validate_ssl_login()
self.assertEqual(status,200,"Not able to login via SSL code")
示例11: create_bucket
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def create_bucket(serverInfo, name='default', replica=1, port=11210, test_case=None, bucket_ram=-1, password=None):
log = logger.Logger.get_logger()
rest = RestConnection(serverInfo)
if bucket_ram < 0:
info = rest.get_nodes_self()
bucket_ram = info.memoryQuota * 2 / 3
if password == None:
authType = "sasl"
else:
authType = "none"
rest.create_bucket(bucket=name,
ramQuotaMB=bucket_ram,
replicaNumber=replica,
proxyPort=port,
authType=authType,
saslPassword=password)
msg = 'create_bucket succeeded but bucket "{0}" does not exist'
bucket_created = BucketOperationHelper.wait_for_bucket_creation(name, rest)
if not bucket_created:
log.error(msg)
if test_case:
test_case.fail(msg=msg.format(name))
return bucket_created
示例12: setUp
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def setUp(self):
super(RbacTestMemcached, self).setUp()
rest = RestConnection(self.master)
self.auth_type = self.input.param('auth_type','builtin')
self.user_id = self.input.param("user_id",None)
self.user_role = self.input.param("user_role",None)
self.bucket_name = self.input.param("bucket_name",None)
rest.create_bucket(bucket=self.bucket_name, ramQuotaMB=100,lww=True)
self.role_map = self.input.param("role_map",None)
self.incorrect_bucket = self.input.param("incorrect_bucket",False)
self.new_role = self.input.param("new_role",None)
self.new_role_map = self.input.param("new_role_map",None)
self.no_bucket_access = self.input.param("no_bucket_access",False)
self.no_access_bucket_name = self.input.param("no_access_bucket_name","noaccess")
self.all_buckets = self.input.param("all_buckets",None)
self.ldap_users = rbacmain().returnUserList(self.user_id)
if self.no_bucket_access:
rest.create_bucket(bucket=self.no_access_bucket_name, ramQuotaMB=100, lww=True)
if self.auth_type == 'ldap':
rbacmain(self.master, 'builtin')._delete_user('cbadminbucket')
if self.auth_type == 'ldap':
rbacmain().setup_auth_mechanism(self.servers,'ldap',rest)
for user in self.ldap_users:
testuser = [{'id': user[0], 'name': user[0], 'password': user[1]}]
RbacBase().create_user_source(testuser, 'ldap', self.master)
self.sleep(10)
elif self.auth_type == "pam":
rbacmain().setup_auth_mechanism(self.servers,'pam', rest)
rbacmain().add_remove_local_user(self.servers, self.ldap_users, 'deluser')
rbacmain().add_remove_local_user(self.servers, self.ldap_users,'adduser')
elif self.auth_type == "builtin":
for user in self.ldap_users:
testuser = [{'id': user[0], 'name': user[0], 'password': user[1]}]
RbacBase().create_user_source(testuser, 'builtin', self.master)
self.sleep(10)
示例13: test_default_case_sensitive_dedicated
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def test_default_case_sensitive_dedicated(self):
name = 'Default'
for serverInfo in self.servers:
rest = RestConnection(serverInfo)
proxyPort = rest.get_nodes_self().moxi
rest.create_bucket(bucket=name,
ramQuotaMB=200,
authType='sasl',
saslPassword='test_non_default',
proxyPort=proxyPort)
msg = 'create_bucket succeeded but bucket {0} does not exist'.format(name)
self.assertTrue(BucketOperationHelper.wait_for_bucket_creation(name, rest), msg=msg)
name = 'default'
try:
rest.create_bucket(bucket=name,
ramQuotaMB=200,
proxyPort=11221,
authType='sasl',
saslPassword='test_non_default')
msg = "create_bucket created two buckets in different case : {0},{1}".format('default', 'Default')
self.fail(msg)
except BucketCreationException as ex:
#check if 'default' and 'Default' buckets exist
self.log.info('BucketCreationException was thrown as expected')
self.log.info(ex.message)
示例14: setUp
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def setUp(self):
self.log = logger.Logger.get_logger()
self.master = TestInputSingleton.input.servers[0]
ClusterOperationHelper.cleanup_cluster([self.master])
BucketOperationHelper.delete_all_buckets_or_assert([self.master], self)
self._bucket_name = 'default'
serverInfo = self.master
rest = RestConnection(serverInfo)
info = rest.get_nodes_self()
self._bucket_port = info.moxi
rest.init_cluster(username=serverInfo.rest_username,
password=serverInfo.rest_password)
rest.init_cluster_memoryQuota(memoryQuota=info.mcdMemoryReserved)
bucket_ram = info.memoryQuota * 2 / 3
# Add built-in user
testuser = [{'id': 'cbadminbucket', 'name': 'cbadminbucket', 'password': 'password'}]
RbacBase().create_user_source(testuser, 'builtin', self.master)
time.sleep(10)
# Assign user to role
role_list = [{'id': 'cbadminbucket', 'name': 'cbadminbucket', 'roles': 'admin'}]
RbacBase().add_user_role(role_list, RestConnection(self.master), 'builtin')
time.sleep(10)
rest.create_bucket(bucket=self._bucket_name,
ramQuotaMB=bucket_ram,
proxyPort=info.memcached)
msg = 'create_bucket succeeded but bucket "default" does not exist'
self.assertTrue(BucketOperationHelper.wait_for_bucket_creation(self._bucket_name, rest), msg=msg)
ready = BucketOperationHelper.wait_for_memcached(serverInfo, self._bucket_name)
self.assertTrue(ready, "wait_for_memcached failed")
self._log_start()
示例15: test_add_remove_autofailover
# 需要导入模块: from membase.api.rest_client import RestConnection [as 别名]
# 或者: from membase.api.rest_client.RestConnection import create_bucket [as 别名]
def test_add_remove_autofailover(self):
rest = RestConnection(self.master)
serv_out = self.servers[3]
shell = RemoteMachineShellConnection(serv_out)
known_nodes = ['[email protected]'+self.master.ip]
rest.create_bucket(bucket='default', ramQuotaMB=100)
rest.update_autofailover_settings(True,30)
x509main(self.master).setup_master()
x509main().setup_cluster_nodes_ssl(self.servers[1:4])
for server in self.servers[1:4]:
rest.add_node('Administrator','password',server.ip)
known_nodes.append('[email protected]'+server.ip)
rest.rebalance(known_nodes)
self.assertTrue(self.check_rebalance_complete(rest),"Issue with rebalance")
shell.stop_server()
self.sleep(60)
shell.start_server()
self.sleep(30)
for server in self.servers:
status = x509main(server)._validate_ssl_login()
self.assertEqual(status,200,"Not able to login via SSL code")