How to use the awxkit.utils.suppress function in awxkit

To help you get started, we’ve selected a few awxkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ansible / awx / awxkit / awxkit / api / pages / job_templates.py View on Github external
def add_credential(self, credential):
        with suppress(exc.NoContent):
            self.related.credentials.post(
                dict(id=credential.id, associate=True))
github ansible / awx / awxkit / awxkit / api / pages / job_templates.py View on Github external
def remove_extra_credential(self, credential):
        with suppress(exc.NoContent):
            self.related.extra_credentials.post(
                dict(id=credential.id, disassociate=True))
github ansible / awx / awxkit / awxkit / api / pages / workflow_job_template_nodes.py View on Github external
def remove_all_credentials(self):
        for cred in self.related.credentials.get().results:
            with suppress(exc.NoContent):
                self.related.credentials.post(
                    dict(id=cred.id, disassociate=True))
github ansible / awx / awxkit / awxkit / api / pages / job_templates.py View on Github external
def remove_credential(self, credential):
        with suppress(exc.NoContent):
            self.related.credentials.post(
                dict(id=credential.id, disassociate=True))