コード例 #1
0
ファイル: scale_noobaa_lib.py プロジェクト: keesturam/ocs-ci
def get_endpoint_pod_count(namespace):
    """
    Function to query number of endpoint running in the cluster.

    Args:
        namespace (str): Namespace where endpoint is running

    Returns:
        endpoint_count (int): Number of endpoint pods

    """
    endpoint_count = pod.get_pod_count(
        label=constants.NOOBAA_ENDPOINT_POD_LABEL, namespace=namespace)
    log.info(f"Number of noobaa-endpoint pod(s) are running: {endpoint_count}")
    return endpoint_count
コード例 #2
0
 def test_add_capacity(self):
     """
     Testing adding capacity to the cluster while IOs running
     """
     dt = config.ENV_DATA['deployment_type']
     if dt == 'ipi':
         osd_count = pod.get_pod_count(label=constants.OSD_APP_LABEL)
         storage_cluster = machine_utils.get_storage_cluster(
             namespace=defaults.ROOK_CLUSTER_NAMESPACE)
         machine_utils.add_capacity(storagecluster_name=storage_cluster,
                                    count=osd_count + 3)
         pod_obj = ocp.OCP(kind=constants.POD,
                           namespace=defaults.ROOK_CLUSTER_NAMESPACE)
         assert pod_obj.wait_for_resource(
             condition=constants.STATUS_RUNNING,
             selector=constants.OSD_APP_LABEL,
             resource_count=osd_count + 3,
             timeout=600), "OSD pods failed to reach RUNNING state"
     else:
         pytest.skip("UPI not yet supported")