mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
Merge pull request #6386 from jbradberry/awxkit-api-endpoints
Awxkit api endpoints Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
0f7a4b384b
@ -1251,6 +1251,7 @@ class OrganizationSerializer(BaseSerializer):
|
||||
res.update(dict(
|
||||
projects = self.reverse('api:organization_projects_list', kwargs={'pk': obj.pk}),
|
||||
inventories = self.reverse('api:organization_inventories_list', kwargs={'pk': obj.pk}),
|
||||
job_templates = self.reverse('api:organization_job_templates_list', kwargs={'pk': obj.pk}),
|
||||
workflow_job_templates = self.reverse('api:organization_workflow_job_templates_list', kwargs={'pk': obj.pk}),
|
||||
users = self.reverse('api:organization_users_list', kwargs={'pk': obj.pk}),
|
||||
admins = self.reverse('api:organization_admins_list', kwargs={'pk': obj.pk}),
|
||||
|
||||
@ -366,3 +366,11 @@ page.register_page([resources.credentials,
|
||||
resources.job_extra_credentials,
|
||||
resources.job_template_extra_credentials],
|
||||
Credentials)
|
||||
|
||||
|
||||
class CredentialCopy(base.Base):
|
||||
|
||||
pass
|
||||
|
||||
|
||||
page.register_page(resources.credential_copy, CredentialCopy)
|
||||
|
||||
@ -682,3 +682,11 @@ class InventoryUpdateCancel(base.Base):
|
||||
|
||||
|
||||
page.register_page(resources.inventory_update_cancel, InventoryUpdateCancel)
|
||||
|
||||
|
||||
class InventoryCopy(base.Base):
|
||||
|
||||
pass
|
||||
|
||||
|
||||
page.register_page(resources.inventory_copy, InventoryCopy)
|
||||
|
||||
@ -244,3 +244,11 @@ class JobTemplateLaunch(base.Base):
|
||||
|
||||
|
||||
page.register_page(resources.job_template_launch, JobTemplateLaunch)
|
||||
|
||||
|
||||
class JobTemplateCopy(base.Base):
|
||||
|
||||
pass
|
||||
|
||||
|
||||
page.register_page([resources.job_template_copy], JobTemplateCopy)
|
||||
|
||||
@ -209,8 +209,10 @@ page.register_page([resources.notification_template,
|
||||
(resources.notification_templates, 'post'),
|
||||
(resources.notification_template_copy, 'post'),
|
||||
resources.notification_template_any,
|
||||
resources.notification_template_started,
|
||||
resources.notification_template_error,
|
||||
resources.notification_template_success], NotificationTemplate)
|
||||
resources.notification_template_success,
|
||||
resources.notification_template_approval], NotificationTemplate)
|
||||
|
||||
|
||||
class NotificationTemplates(page.PageList, NotificationTemplate):
|
||||
@ -219,12 +221,23 @@ class NotificationTemplates(page.PageList, NotificationTemplate):
|
||||
|
||||
|
||||
page.register_page([resources.notification_templates,
|
||||
resources.related_notification_templates,
|
||||
resources.notification_templates_any,
|
||||
resources.notification_templates_started,
|
||||
resources.notification_templates_error,
|
||||
resources.notification_templates_success],
|
||||
resources.notification_templates_success,
|
||||
resources.notification_templates_approvals],
|
||||
NotificationTemplates)
|
||||
|
||||
|
||||
class NotificationTemplateCopy(base.Base):
|
||||
|
||||
pass
|
||||
|
||||
|
||||
page.register_page(resources.notification_template_copy, NotificationTemplateCopy)
|
||||
|
||||
|
||||
class NotificationTemplateTest(base.Base):
|
||||
|
||||
pass
|
||||
|
||||
@ -202,6 +202,14 @@ class ProjectUpdateCancel(base.Base):
|
||||
page.register_page(resources.project_update_cancel, ProjectUpdateCancel)
|
||||
|
||||
|
||||
class ProjectCopy(base.Base):
|
||||
|
||||
pass
|
||||
|
||||
|
||||
page.register_page(resources.project_copy, ProjectCopy)
|
||||
|
||||
|
||||
class Playbooks(base.Base):
|
||||
|
||||
pass
|
||||
|
||||
@ -45,4 +45,5 @@ class Teams(page.PageList, Team):
|
||||
|
||||
|
||||
page.register_page([resources.teams,
|
||||
resources.credential_owner_teams,
|
||||
resources.related_teams], Teams)
|
||||
|
||||
@ -64,6 +64,7 @@ class Users(page.PageList, User):
|
||||
page.register_page([resources.users,
|
||||
resources.organization_admins,
|
||||
resources.related_users,
|
||||
resources.credential_owner_users,
|
||||
resources.user_admin_organizations], Users)
|
||||
|
||||
|
||||
|
||||
@ -99,7 +99,8 @@ class WorkflowJobTemplates(page.PageList, WorkflowJobTemplate):
|
||||
pass
|
||||
|
||||
|
||||
page.register_page([resources.workflow_job_templates], WorkflowJobTemplates)
|
||||
page.register_page([resources.workflow_job_templates,
|
||||
resources.related_workflow_job_templates], WorkflowJobTemplates)
|
||||
|
||||
|
||||
class WorkflowJobTemplateLaunch(base.Base):
|
||||
|
||||
@ -122,14 +122,18 @@ class Resources(object):
|
||||
_notification = r'notifications/\d+/'
|
||||
_notification_template = r'notification_templates/\d+/'
|
||||
_notification_template_any = r'\w+/\d+/notification_templates_any/\d+/'
|
||||
_notification_template_started = r'\w+/\d+/notification_templates_started/\d+/'
|
||||
_notification_template_copy = r'notification_templates/\d+/copy/'
|
||||
_notification_template_error = r'\w+/\d+/notification_templates_error/\d+/'
|
||||
_notification_template_success = r'\w+/\d+/notification_templates_success/\d+/'
|
||||
_notification_template_approval = r'\w+/\d+/notification_templates_approvals/\d+/'
|
||||
_notification_template_test = r'notification_templates/\d+/test/'
|
||||
_notification_templates = 'notification_templates/'
|
||||
_notification_templates_any = r'\w+/\d+/notification_templates_any/'
|
||||
_notification_templates_started = r'\w+/\d+/notification_templates_started/'
|
||||
_notification_templates_error = r'\w+/\d+/notification_templates_error/'
|
||||
_notification_templates_success = r'\w+/\d+/notification_templates_success/'
|
||||
_notification_templates_approvals = r'\w+/\d+/notification_templates_approvals/'
|
||||
_notifications = 'notifications/'
|
||||
_object_activity_stream = r'[^/]+/\d+/activity_stream/'
|
||||
_org_projects = r'organizations/\d+/projects/'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user