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

Implement pod_container_status type method for Openshift #152

Open
mshriver opened this issue Jul 11, 2017 · 0 comments
Open

Implement pod_container_status type method for Openshift #152

mshriver opened this issue Jul 11, 2017 · 0 comments

Comments

@mshriver
Copy link
Collaborator

This snippet, provided by @gshefer, demonstrates the desired data structure:

def pods_per_ready_status(self):
        """Grabing the Container Statuses Summary of the pods from API"""
        #  TODO: Add later this logic to wrapanapi
        entities_j = self.mgmt.api.get('pod')[1]['items']
        out = {}
        for entity_j in entities_j:
            out[entity_j['metadata']['name']] = {
                condition['type']: eval_strings([condition['status']]).pop()
                for condition in entity_j['status'].get('conditions', [])
            }
        return out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant