Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push the smallfile test results into elasticsearch server. #1984

Merged
merged 19 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions ocs_ci/ocs/ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,78 @@ def get_logs(
return output


def get_provider():
vasukulkarni marked this conversation as resolved.
Show resolved Hide resolved
"""
Return the OCP Provider (Platform)

Returns:
str: The Provider that the OCP is running on
vasukulkarni marked this conversation as resolved.
Show resolved Hide resolved
"""

ocp_cluster = OCP(kind='', resource_name='nodes')
return ocp_cluster.get('nodes')['items'][0]['spec']['providerID'].split(':')[0]


def get_clustername():
"""
Return the name (DNS short name) of the cluster

Returns:
str: the short DNS name of the cluster

"""

ocp_cluster = OCP(
namespace='openshift-console', kind='',
resource_name='route')
return ocp_cluster.get()['items'][0]['spec']['host'].split('.')[2]


def get_ocs_version():
"""
Return the OCS Version

Returns:
str: The version of the OCS

"""

ocp_cluster = OCP(
namespace=config.ENV_DATA['cluster_namespace'],
kind='', resource_name='csv')
return ocp_cluster.get()['items'][0]['spec']['version']


def get_build():
"""
Return the OCP Build Version

Returns:
str: The build version of the OCP

"""

ocp_cluster = OCP(
namespace=config.ENV_DATA['cluster_namespace'],
kind='', resource_name='clusterversion')
return ocp_cluster.get()['items'][0]['status']['desired']['version']


def get_ocp_channel():
"""
Return the OCP Channel

Returns:
str: The channel of the OCP

"""

ocp_cluster = OCP(
namespace=config.ENV_DATA['cluster_namespace'],
kind='', resource_name='clusterversion')
return ocp_cluster.get()['items'][0]['spec']['channel']


def switch_to_project(project_name):
"""
Switch to another project
Expand Down
11 changes: 7 additions & 4 deletions ocs_ci/templates/workloads/smallfile/SmallFile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ metadata:
namespace: my-ripsaw
spec:
test_user: homer_simpson
clustername: aws-dec26-2019
clustername: place-holder
elasticsearch:
es: es_server
es_port: 9090
es_index: smallfile
#server: 10.0.144.152 <- debuging server
server: 10.0.78.167
port: 9200
es_index: ripsaw-smallfile
metadata_collection: true
index_data: true
workload:
name: smallfile
args:
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
-e .
elasticsearch
numpy
Loading