How to use the awxkit.awxkit.api.pages.page.register_page 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
self.related.credentials.post(
                dict(id=credential.id, associate=True))

    def remove_credential(self, credential):
        with suppress(exc.NoContent):
            self.related.credentials.post(
                dict(id=credential.id, disassociate=True))

    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))


page.register_page([resources.job_template,
                    (resources.job_templates, 'post'),
                    (resources.job_template_copy, 'post')], JobTemplate)


class JobTemplates(page.PageList, JobTemplate):

    pass


page.register_page([resources.job_templates,
                    resources.related_job_templates], JobTemplates)


class JobTemplateCallback(base.Base):

    pass
github ansible / awx / awxkit / awxkit / api / pages / workflow_job_templates.py View on Github external
class WorkflowJobTemplates(page.PageList, WorkflowJobTemplate):

    pass


page.register_page([resources.workflow_job_templates], WorkflowJobTemplates)


class WorkflowJobTemplateLaunch(base.Base):

    pass


page.register_page(resources.workflow_job_template_launch, WorkflowJobTemplateLaunch)


class WorkflowJobTemplateCopy(base.Base):

    pass


page.register_page([resources.workflow_job_template_copy], WorkflowJobTemplateCopy)
github ansible / awx / awxkit / awxkit / api / pages / notification_templates.py View on Github external
page.register_page([resources.notification_template,
                    (resources.notification_templates, 'post'),
                    (resources.notification_template_copy, 'post'),
                    resources.notification_template_any,
                    resources.notification_template_error,
                    resources.notification_template_success], NotificationTemplate)


class NotificationTemplates(page.PageList, NotificationTemplate):

    pass


page.register_page([resources.notification_templates,
                    resources.notification_templates_any,
                    resources.notification_templates_error,
                    resources.notification_templates_success],
                   NotificationTemplates)


class NotificationTemplateTest(base.Base):

    pass


page.register_page(
    resources.notification_template_test,
    NotificationTemplateTest)
github ansible / awx / awxkit / awxkit / api / pages / workflow_job_templates.py View on Github external
class WorkflowJobTemplateLaunch(base.Base):

    pass


page.register_page(resources.workflow_job_template_launch, WorkflowJobTemplateLaunch)


class WorkflowJobTemplateCopy(base.Base):

    pass


page.register_page([resources.workflow_job_template_copy], WorkflowJobTemplateCopy)