-
Notifications
You must be signed in to change notification settings - Fork 52
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 openshift_container_images #23
Adding openshift_container_images #23
Conversation
4f18efe
to
4410d13
Compare
4410d13
to
f04f0e1
Compare
6c2aa9f
to
dfacf0e
Compare
@@ -0,0 +1,13 @@ | |||
class ManageIQ::Providers::Openshift::ContainerImage < ContainerImage |
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.
class ManageIQ::Providers::Openshift::ContainerManager::ContainerImage < ContainerImage
Also change path
b935586
to
7119e22
Compare
@moolitayer done |
@@ -8,6 +8,8 @@ class ManageIQ::Providers::Openshift::ContainerManager < ManageIQ::Providers::Co | |||
require_nested :RefreshWorker | |||
require_nested :Refresher | |||
|
|||
has_many :openshift_container_images, :foreign_key => :ems_id, :dependent => :destroy |
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.
We don't need this now right?
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.
No, it is just nice to have (I need to add ":class_name => ..." there though) do you want me to remove this?
7119e22
to
cdad41e
Compare
@@ -8,6 +8,9 @@ class ManageIQ::Providers::Openshift::ContainerManager < ManageIQ::Providers::Co | |||
require_nested :RefreshWorker | |||
require_nested :Refresher | |||
|
|||
has_many :openshift_container_images, :foreign_key => :ems_id, :dependent => :destroy, | |||
:class_name => 'ManageIQ::Providers::Openshift::ContainerManager::ContainerImage' |
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.
Yes please remove unless you have a solid use case
cdad41e
to
6488d0f
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.
LTGM 👍
This will require test restart after the base PR ManageIQ/manageiq#15386 is merged |
6488d0f
to
630b14f
Compare
@@ -0,0 +1,13 @@ | |||
class ManageIQ::Providers::Openshift::ContainerManager::ContainerImage < ContainerImage | |||
acts_as_miq_taggable | |||
include NewWithTypeStiMixin |
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.
These two lines should not be here. They both belong in the base ContainerImage.
ManageIQ/manageiq#15386 is merged, so rekicking travis |
@@ -175,6 +175,9 @@ def parse_openshift_image(openshift_image) | |||
ref = "#{ContainerImage::DOCKER_PULLABLE_PREFIX}#{id}" | |||
new_result = parse_container_image(id, ref) | |||
|
|||
#new_result[:ems_ref] = openshift_image.metadata.uid |
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.
@enoodle do we need this comment?
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.
@simon3z No, I commented this out because of ManageIQ/manageiq-schema#21 (comment)
Do you think we should remove this column or put the digest there? Anything else we can do?
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.
what do you use the ems_ref for?
dc8a1d9
to
6a848e3
Compare
I removed the processing of |
@moolitayer @simon3z |
@enoodle I didn't understand. On what is ManageIQ/manageiq#15519 dependent? |
@moolitayer The tests in ManageIQ/manageiq#15519 are red because they need the container image class definition from this PR. |
Note: AR queries on ContainerImage ( with
|
This is also fixing error about missing `ManageIQ::Providers::Openshift::ContainerManager::ContainerImage` ManageIQ/manageiq-providers-openshift#23 (comment)
@@ -0,0 +1,12 @@ | |||
class ManageIQ::Providers::Openshift::ContainerManager::ContainerImage < ContainerImage | |||
acts_as_miq_taggable |
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.
Having this in the base class is not enough?
digest, | ||
"security.manageiq.org/failed-policy" => causing_policy, | ||
"images.openshift.io/deny-execution" => "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.
We need a PR removing this method from manageiq/manageiq
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.
ManageIQ/manageiq#15386 it is already merged.
6a848e3
to
ad5ac8a
Compare
Checked commit enoodle@ad5ac8a with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@Fryguy you requested changes here. Can you check if it's OK now and update your review status? Thanks! |
Thanks @Fryguy ! |
Addes openshift_container_images to the openshift provider.
Adding parsing for
ems_ref
for images originating from Openshift.based on: ManageIQ/manageiq#15386