mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
29 lines
632 B
Python
29 lines
632 B
Python
from awxkit.api.pages import UnifiedJob
|
|
from awxkit.api.resources import resources
|
|
from . import page
|
|
from awxkit import exceptions
|
|
|
|
|
|
class WorkflowApproval(UnifiedJob):
|
|
def approve(self):
|
|
try:
|
|
self.related.approve.post()
|
|
except exceptions.NoContent:
|
|
pass
|
|
|
|
def deny(self):
|
|
try:
|
|
self.related.deny.post()
|
|
except exceptions.NoContent:
|
|
pass
|
|
|
|
|
|
page.register_page(resources.workflow_approval, WorkflowApproval)
|
|
|
|
|
|
class WorkflowApprovals(page.PageList, WorkflowApproval):
|
|
pass
|
|
|
|
|
|
page.register_page(resources.workflow_approvals, WorkflowApprovals)
|