mirror of
https://github.com/ansible/awx.git
synced 2026-07-29 17:09:55 -02:30
awxkit: allow to modify api base url (#14835)
Signed-off-by: Julen Landa Alustiza <jlanda@redhat.com>
This commit is contained in:
committed by
GitHub
parent
8a902debd5
commit
8c9c02c975
@@ -4,6 +4,7 @@ import json
|
||||
from .stdout import monitor, monitor_workflow
|
||||
from .utils import CustomRegistryMeta, color_enabled
|
||||
from awxkit import api
|
||||
from awxkit.config import config
|
||||
from awxkit.exceptions import NoContent
|
||||
|
||||
|
||||
@@ -479,7 +480,7 @@ class RoleMixin(object):
|
||||
options = ', '.join(RoleMixin.roles[flag])
|
||||
raise ValueError("invalid choice: '{}' must be one of {}".format(role, options))
|
||||
value = kwargs[flag]
|
||||
target = '/api/v2/{}/{}'.format(resource, value)
|
||||
target = '{}v2/{}/{}'.format(config.api_base_path, resource, value)
|
||||
detail = self.page.__class__(target, self.page.connection).get()
|
||||
object_roles = detail['summary_fields']['object_roles']
|
||||
actual_role = object_roles[role + '_role']
|
||||
|
||||
Reference in New Issue
Block a user