Merge pull request #36235 from rallytime/merge-2016.3

[2016.3] Merge forward from 2015.8 to 2016.3
This commit is contained in:
Nicole Thomas 2016-09-12 11:40:42 -06:00 committed by GitHub
commit fcbebb40c3
3 changed files with 59 additions and 35 deletions

View File

@ -146,7 +146,11 @@ def _prior_running_states(jid):
ret = []
active = __salt__['saltutil.is_running']('state.*')
for data in active:
if int(data['jid']) < int(jid):
try:
data_jid = int(data['jid'])
except ValueError:
continue
if data_jid < int(jid):
ret.append(data)
return ret

View File

@ -38,12 +38,14 @@ def present(name,
from_version=None,
user=None,
maintenance_db=None,
db_user=None,
db_password=None,
db_host=None,
db_port=None,
db_user=None):
db_port=None):
'''
Ensure that the named extension is present with the specified privileges
Ensure that the named extension is present.
For more information about all of these options see `CREATE EXTENSION` SQL
command reference in the PostgreSQL documentation.
name
The name of the extension to manage
@ -54,12 +56,12 @@ def present(name,
schema
Schema to install the extension into
from_version
Old extension version if already installed
ext_version
version to install
from_version
Old extension version if already installed
user
System user all operations should be performed on behalf of
@ -146,31 +148,31 @@ def absent(name,
cascade=None,
user=None,
maintenance_db=None,
db_user=None,
db_password=None,
db_host=None,
db_port=None,
db_user=None):
db_port=None):
'''
Ensure that the named extension is absent
Ensure that the named extension is absent.
name
Extension name of the extension to remove
cascade
Drop on cascade
if_exists
Add if exist slug
restrict
Add restrict slug
maintenance_db
Database to act on
cascade
Drop on cascade
user
System user all operations should be performed on behalf of
maintenance_db
Database to act on
db_user
database username if different from config or default

View File

@ -37,31 +37,41 @@ def present(name,
db_user=None):
'''
Ensure that the named tablespace is present with the specified properties.
For more information about all of these options see man create_tablespace(1).
For more information about all of these options see man `create_tablespace`(7).
name
The name of the tablespace to create/manage.
directory
The directory where the tablespace will be located, must already exist.
The directory where the tablespace will be located, must already exist
options
A dictionary of options to specify for the table.
Currently, the only tablespace options supported are
seq_page_cost - float; default=1.0
random_page_cost - float; default=4.0
owner
The database user that will be the owner of the tablespace
Defaults to the user executing the command (i.e. the `user` option)
db_user
database username if different from config or default
db_password
user password if any password for a specified user
db_host
Database host if different from config or default
db_port
Database port if different from config or default
user
System user all operations should be performed on behalf of
maintenance_db
Database to act on
db_user
database username if different from config or default
db_password
user password if any password for a specified user
db_host
Database host if different from config or default
db_port
Database port if different from config or default
'''
ret = {'name': name,
'changes': {},
@ -130,25 +140,33 @@ def present(name,
def absent(name,
user=None,
maintenance_db=None,
db_user=None,
db_password=None,
db_host=None,
db_port=None,
db_user=None):
db_port=None):
'''
Ensure that the named database is absent.
name
The name of the database to remove
db_user
database username if different from config or defaul
db_password
user password if any password for a specified user
db_host
Database host if different from config or default
db_port
Database port if different from config or default
user
System user all operations should be performed on behalf of
maintenance_db
Database to act on
db_user
database username if different from config or defaul
db_password
user password if any password for a specified user
db_host
Database host if different from config or default
db_port
Database port if different from config or default
'''
ret = {'name': name,
'changes': {},