mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #42805 from rallytime/bp-42552
Back-port #42552 to 2016.11
This commit is contained in:
commit
b3e2ae3c58
1 changed files with 6 additions and 1 deletions
|
@ -1972,6 +1972,8 @@ def acl_create(consul_url=None, **kwargs):
|
|||
Create a new ACL token.
|
||||
|
||||
:param consul_url: The Consul server URL.
|
||||
:param id: Unique identifier for the ACL to create
|
||||
leave it blank to let consul server generate one
|
||||
:param name: Meaningful indicator of the ACL's purpose.
|
||||
:param type: Type is either client or management. A management
|
||||
token is comparable to a root user and has the
|
||||
|
@ -2002,6 +2004,9 @@ def acl_create(consul_url=None, **kwargs):
|
|||
else:
|
||||
raise SaltInvocationError('Required argument "name" is missing.')
|
||||
|
||||
if 'id' in kwargs:
|
||||
data['ID'] = kwargs['id']
|
||||
|
||||
if 'type' in kwargs:
|
||||
data['Type'] = kwargs['type']
|
||||
|
||||
|
@ -2120,7 +2125,7 @@ def acl_delete(consul_url=None, **kwargs):
|
|||
ret['res'] = False
|
||||
return ret
|
||||
|
||||
function = 'acl/delete/{0}'.format(kwargs['id'])
|
||||
function = 'acl/destroy/{0}'.format(kwargs['id'])
|
||||
res = _query(consul_url=consul_url,
|
||||
data=data,
|
||||
method='PUT',
|
||||
|
|
Loading…
Add table
Reference in a new issue