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

Add Resource to OpenSCAP results #42

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

aufi
Copy link
Member

@aufi aufi commented Jul 17, 2017

Adding resource_id and resource_type fields to openscap_results table
to allow assigning OpenSCAPResult to OpenStack VMs and later also
other inventory.

Existing container_id association is not touched in this PR, but it could
be migrated to the polymorphic resource association in future.

class AddSubjectToOpenScapResult < ActiveRecord::Migration[5.0]
def change
add_column :openscap_results, :subject_id, :bigint
add_column :openscap_results, :subject_type, :string
Copy link
Member

@Fryguy Fryguy Jul 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a polymorphic reference, prefer :resource_id, :resource_type for consistency with other models (We use resource as opposed to subject in the models...also subject is kind of a keyword in RSpec which could be confusing)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fryguy Thanks for comment and info behind, updated.

Adding resource_id and resource_type fields to openscap_results table
to allow assigning OpenSCAPResult to OpenStack VMs and later also
other inventory.

Existing container_id association is not touched in this PR, but it could
be migrated to polymorphic the resource association in future.
@aufi aufi force-pushed the add_subject_to_openscap_results branch from b2fd722 to 277fbcc Compare July 18, 2017 09:06
@aufi aufi changed the title Add Subject to OpenSCAP results Add Resource to OpenSCAP results Jul 18, 2017
@miq-bot
Copy link
Member

miq-bot commented Jul 18, 2017

Checked commit aufi@277fbcc with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants