コード例 #1
0
def detect_non_primary_de_cluster(parser):
    """
	non-primary node (in this test case is backup node) delete cluster or not
	:param parser: config
	:return: True/raise exception
	"""
    cluster = parser["Cluster_name"]

    success = HAagent_info.is_cluster_exist(cluster, parser)

    if success:
        return True
    raise TA_error.Assert_Error("non primary de cluster fail")
コード例 #2
0
def detect_de_outer_cluster(parser):
    """
	outer cluster deleted or not
	:param parser: config
	:return: True/raise exception
	"""
    ssh = shell_server.get_ssh(parser["PrimaryOS_ip"], parser["PrimaryOS_usr"],
                               parser["PrimaryOS_pwd"])  #獲得ssh

    cluster = "test_c"
    success = HAagent_info.is_cluster_exist(cluster, parser)
    ssh.close()

    if success:
        return True
    raise TA_error.Assert_Error("de outer cluster fail")
コード例 #3
0
def detect_create_cluster(parser):
    """
	cluster created or not
	:param parser: config
	:return: True/raise exception
	"""
    ssh = shell_server.get_ssh(parser["PrimaryOS_ip"], parser["PrimaryOS_usr"],
                               parser["PrimaryOS_pwd"])  #獲得ssh

    cluster = parser["Cluster_name"]
    success = HAagent_info.is_cluster_exist(cluster, parser)
    ssh.close()

    if success:
        return True
    raise TA_error.Assert_Error("create cluster fail")