-
Notifications
You must be signed in to change notification settings - Fork 170
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
adding --config-file param functionality to deployment #10724
adding --config-file param functionality to deployment #10724
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: shivamdurgbuns The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
84d29b8
to
fea5ff5
Compare
1d3b77f
to
7a41e2d
Compare
params (str): Parameter to pass to exporter script | ||
|
||
Returns: | ||
str: absolute path to config.ini gile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
str: absolute path to config.ini gile | |
str: absolute path to config.ini file |
cmd = f"{python_version} {script_path} {params}" | ||
ocs_version = version.get_semantic_ocs_version_from_config() | ||
# if condition is for the new feature introduced in | ||
# 4.17 in OCSQE-2249 where the this covers the test case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 4.17 in OCSQE-2249 where the this covers the test case | |
# 4.17 in OCSQE-2249 where this covers the test case |
ocs_ci/utility/utils.py
Outdated
params (str): Parameter to pass to be converted into config.ini file. | ||
|
||
Returns: | ||
config_ini_file.name (str): Path to the config.ini file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave blank line after this
ocs_ci/utility/utils.py
Outdated
config_ini_file.name (str): Path to the config.ini file. | ||
""" | ||
data = "[Configurations]\n" | ||
import re |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to import section at the beginning of file
ocs_ci/utility/utils.py
Outdated
) | ||
with open(config_ini_file.name, "w") as fd: | ||
fd.write(data) | ||
log.info(f"config.ini fike for cluster is located at {config_ini_file.name}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.info(f"config.ini fike for cluster is located at {config_ini_file.name}") | |
log.info(f"config.ini file for cluster is located at {config_ini_file.name}") |
ocs_ci/utility/utils.py
Outdated
params (str): Parameter to pass to be converted into config.ini file. | ||
|
||
Returns: | ||
config_ini_file.name (str): Path to the config.ini file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config_ini_file.name (str): Path to the config.ini file. | |
str: Path to the config.ini file. |
ocs_ci/utility/utils.py
Outdated
@@ -5198,3 +5199,38 @@ def extract_image_urls(string_data): | |||
# Find all URLs that start with 'registry.redhat.io' | |||
image_urls = re.findall(r'registry\.redhat\.io[^\s"]+', string_data) | |||
return image_urls | |||
|
|||
|
|||
def params_to_configini_file(params): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename the function which resembles the work of function. In this case it creates config ini file. ( e.g: create_config_ini_file()
7a41e2d
to
6e8fa66
Compare
Signed-off-by: Shivam Durgbuns <[email protected]>
Signed-off-by: Shivam Durgbuns <[email protected]>
Signed-off-by: Shivam Durgbuns <[email protected]>
Signed-off-by: Shivam Durgbuns <[email protected]>
6e8fa66
to
a1a9ec7
Compare
a1a9ec7
to
f3498b2
Compare
Signed-off-by: Shivam Durgbuns <[email protected]>
f3498b2
to
38f8965
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR validation
Cluster Name:
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/
Additional Test Params:
OCP VERSION: 4.16-ga
OCS VERSION: 4.16
tested against branch: master
Job FAILED (installation failed, tests not executed).
@@ -0,0 +1,3 @@ | |||
--- | |||
ENV_DATA: | |||
use_config_file: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name here is too generic doesn't tell anything about this use_confi_file.
As it's config file for exporter script to external RHCS cluster, more reasonable sounds something like:
rhcs_external_use_config_file
Also, please document this value in:
https://github.com/red-hat-storage/ocs-ci/blob/master/conf/README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR validation
Cluster Name:
Cluster Configuration:
PR Test Suite: tier1
PR Test Path: tests/
Additional Test Params:
OCP VERSION: 4.16-ga
OCS VERSION: 4.16
tested against branch: master
Job FAILED (installation failed, tests not executed).
Reopening this PR here #11160 |
This is to enable feature https://issues.redhat.com/browse/OCSQE-2249