mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Remove deprecated runas in postgre_database
This commit is contained in:
parent
3dd213f5c3
commit
d7521fbfe6
@ -30,7 +30,6 @@ def present(name,
|
||||
lc_ctype=None,
|
||||
owner=None,
|
||||
template=None,
|
||||
runas=None,
|
||||
user=None,
|
||||
maintenance_db=None,
|
||||
db_password=None,
|
||||
@ -62,11 +61,6 @@ def present(name,
|
||||
template
|
||||
The template database from which to build this database
|
||||
|
||||
runas
|
||||
System user all operations should be performed on behalf of
|
||||
|
||||
.. deprecated:: 0.17.0
|
||||
|
||||
user
|
||||
System user all operations should be performed on behalf of
|
||||
|
||||
@ -95,23 +89,6 @@ def present(name,
|
||||
'added in 0.17.0',
|
||||
_dont_call_warnings=True
|
||||
)
|
||||
if runas:
|
||||
# Warn users about the deprecation
|
||||
ret.setdefault('warnings', []).append(
|
||||
'The \'runas\' argument is being deprecated in favor of \'user\', '
|
||||
'please update your state files.'
|
||||
)
|
||||
if user is not None and runas is not None:
|
||||
# user wins over runas but let warn about the deprecation.
|
||||
ret.setdefault('warnings', []).append(
|
||||
'Passed both the \'runas\' and \'user\' arguments. Please don\'t. '
|
||||
'\'runas\' is being ignored in favor of \'user\'.'
|
||||
)
|
||||
runas = None
|
||||
elif runas is not None:
|
||||
# Support old runas usage
|
||||
user = runas
|
||||
runas = None
|
||||
|
||||
db_args = {
|
||||
'maintenance_db': maintenance_db,
|
||||
@ -188,7 +165,6 @@ def present(name,
|
||||
|
||||
|
||||
def absent(name,
|
||||
runas=None,
|
||||
user=None,
|
||||
maintenance_db=None,
|
||||
db_password=None,
|
||||
@ -213,11 +189,6 @@ def absent(name,
|
||||
db_port
|
||||
Database port if different from config or default
|
||||
|
||||
runas
|
||||
System user all operations should be performed on behalf of
|
||||
|
||||
.. deprecated:: 0.17.0
|
||||
|
||||
user
|
||||
System user all operations should be performed on behalf of
|
||||
|
||||
@ -227,29 +198,6 @@ def absent(name,
|
||||
'changes': {},
|
||||
'result': True,
|
||||
'comment': ''}
|
||||
salt.utils.warn_until(
|
||||
'Lithium',
|
||||
'Please remove \'runas\' support at this stage. \'user\' support was '
|
||||
'added in 0.17.0',
|
||||
_dont_call_warnings=True
|
||||
)
|
||||
if runas:
|
||||
# Warn users about the deprecation
|
||||
ret.setdefault('warnings', []).append(
|
||||
'The \'runas\' argument is being deprecated in favor of \'user\', '
|
||||
'please update your state files.'
|
||||
)
|
||||
if user is not None and runas is not None:
|
||||
# user wins over runas but let warn about the deprecation.
|
||||
ret.setdefault('warnings', []).append(
|
||||
'Passed both the \'runas\' and \'user\' arguments. Please don\'t. '
|
||||
'\'runas\' is being ignored in favor of \'user\'.'
|
||||
)
|
||||
runas = None
|
||||
elif runas is not None:
|
||||
# Support old runas usage
|
||||
user = runas
|
||||
runas = None
|
||||
|
||||
db_args = {
|
||||
'maintenance_db': maintenance_db,
|
||||
|
Loading…
Reference in New Issue
Block a user