Skip to content

Implement pod_container_status type method for Openshift #152

@mshriver

Description

@mshriver

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions