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

Make oscap profile configurable in settings file #14535

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions conf/oscap.yaml.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
OSCAP:
CONTENT_PATH: /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml
# see: robottelo/constants/__init__.py OSCAP_PROFILE
PROFILE: security7
dosas marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion pytest_fixtures/component/oscap.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def scap_content(import_ansible_roles, module_target_sat):
scap_profile_id = [
profile['id']
for profile in scap_info.scap_content_profiles
if OSCAP_PROFILE['security7'] in profile['title']
if OSCAP_PROFILE[settings.oscap.profile] in profile['title']
][0]
return {
"title": title,
Expand Down
7 changes: 6 additions & 1 deletion robottelo/config/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@
Validator(
'oscap.content_path',
must_exist=True,
)
),
Validator(
'oscap.profile',
default='security7',
dosas marked this conversation as resolved.
Show resolved Hide resolved
must_exist=True,
),
],
osp=[
Validator(
Expand Down
Loading