Skip to content
Closed
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
3 changes: 3 additions & 0 deletions ocp_resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ class Phase:
INSTALL_READY = "InstallReady"
SUCCEEDED = "Succeeded"

class restartCount:
Copy link
Contributor

Choose a reason for hiding this comment

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

Not every resource has the restartCount field, so it doesn't look like this suppose to be here

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's more than one resource, it is OK to have it here (the other option is to have duplicates on multiple resources).

@Ahmad-Hafe which resources have restartCount ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think only pods/containers have restartCount. @Ahmad-Hafe is there any other resources?

Copy link
Contributor

Choose a reason for hiding this comment

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

and DataVolumes

Copy link
Collaborator

Choose a reason for hiding this comment

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

iiuc what you need, to get instance.status.restartCount should be a property and not a class

restartCount = "restartCount"

class Reason:
ALL_REQUIREMENTS_MET = "AllRequirementsMet"
INSTALL_SUCCEEDED = "InstallSucceeded"
Expand Down