galaxy_importer/ansible_test/runners/openshift_job.py
def cleanup(self):
        """Deletes job and any pods associated to it."""
        requests.delete(self.job_name_url, headers=self.auth_header, verify=self.ca_path)
        self.log.debug(f'Deleted job {self.name}')

        for pod in self.get_pods():
            pod_name = self.get_pod_name(pod)
            requests.delete(
                f'{self.pods_url}/{pod_name}', headers=self.auth_header, verify=self.ca_path)
            self.log.debug(f'Deleted pod {pod_name}')

            status = pod['status']['phase']
            if status == 'Failed':
                reason = pod['status']['containerStatuses'][0]['state']['terminated']['reason']
                raise exceptions.AnsibleTestError(
                    f'Pod terminated with status: "{status}" and reason: "{reason}"')
Deletes job and any pods associated to it.
Deletes job and any pods associated to it.
Deletes job and any pods associated to it .
def cleanup(self):
        requests.delete(self.job_name_url, headers=self.auth_header, verify=self.ca_path)
        self.log.debug(f'Deleted job {self.name}')
        for pod in self.get_pods():
            pod_name = self.get_pod_name(pod)
            requests.delete(
                f'{self.pods_url}/{pod_name}', headers=self.auth_header, verify=self.ca_path)
            self.log.debug(f'Deleted pod {pod_name}')
            status = pod['status']['phase']
            if status == 'Failed':
                reason = pod['status']['containerStatuses'][0]['state']['terminated']['reason']
                raise exceptions.AnsibleTestError(
                    f'Pod terminated with status: "{status}" and reason: "{reason}"')
def cleanup ( self ) : requests . delete ( self . job_name_url , headers = self . auth_header , verify = self . ca_path ) self . log . debug ( f'Deleted job {self.name}' ) for pod in self . get_pods ( ) : pod_name = self . get_pod_name ( pod ) requests . delete ( f'{self.pods_url}/{pod_name}' , headers = self . auth_header , verify = self . ca_path ) self . log . debug ( f'Deleted pod {pod_name}' ) status = pod [ 'status' ] [ 'phase' ] if status == 'Failed' : reason = pod [ 'status' ] [ 'containerStatuses' ] [ 0 ] [ 'state' ] [ 'terminated' ] [ 'reason' ] raise exceptions . AnsibleTestError ( f'Pod terminated with status: "{status}" and reason: "{reason}"' )
Deletes job and any pods associated to it.
Deletes job and any pods associated to it .
"""Deletes job and any pods associated to it."""
self