mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 21:49:27 -02:30
Update awxkit credential creation
Does not have an organization by default. Let `create_payload` decide if it should be automatically created or not. This will avoid having more than one owner when either user or team is passed to `create`.
This commit is contained in:
@@ -310,7 +310,7 @@ class Credential(HasCopy, HasCreate, base.Base):
|
|||||||
credential_type=CredentialType,
|
credential_type=CredentialType,
|
||||||
user=None,
|
user=None,
|
||||||
team=None,
|
team=None,
|
||||||
organization=Organization,
|
organization=None,
|
||||||
inputs=None,
|
inputs=None,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
payload = self.create_payload(
|
payload = self.create_payload(
|
||||||
@@ -323,7 +323,7 @@ class Credential(HasCopy, HasCreate, base.Base):
|
|||||||
return self.update_identity(
|
return self.update_identity(
|
||||||
Credentials(
|
Credentials(
|
||||||
self.connection)).post(payload)
|
self.connection)).post(payload)
|
||||||
|
|
||||||
def test(self, data):
|
def test(self, data):
|
||||||
"""Test the credential endpoint."""
|
"""Test the credential endpoint."""
|
||||||
response = self.connection.post(urljoin(str(self.url), 'test/'), data)
|
response = self.connection.post(urljoin(str(self.url), 'test/'), data)
|
||||||
|
|||||||
Reference in New Issue
Block a user