mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2017.7' into jid_queue
This commit is contained in:
commit
facef2227d
4 changed files with 60 additions and 15 deletions
|
@ -122,6 +122,7 @@ def present(
|
|||
kernel_id=None,
|
||||
ramdisk_id=None,
|
||||
block_device_mappings=None,
|
||||
delete_on_termination=None,
|
||||
instance_monitoring=False,
|
||||
spot_price=None,
|
||||
instance_profile_name=None,
|
||||
|
@ -186,8 +187,10 @@ def present(
|
|||
Default is standard.
|
||||
|
||||
delete_on_termination
|
||||
Indicates whether to delete the volume on instance termination (true) or
|
||||
not (false).
|
||||
Whether the volume should be explicitly marked for deletion when its instance is
|
||||
terminated (True), or left around (False). If not provided, or None is explicitly passed,
|
||||
the default AWS behaviour is used, which is True for ROOT volumes of instances, and
|
||||
False for all others.
|
||||
|
||||
iops
|
||||
For Provisioned IOPS (SSD) volumes only. The number of I/O operations per
|
||||
|
@ -268,6 +271,7 @@ def present(
|
|||
kernel_id=kernel_id,
|
||||
ramdisk_id=ramdisk_id,
|
||||
block_device_mappings=block_device_mappings,
|
||||
delete_on_termination=delete_on_termination,
|
||||
instance_monitoring=instance_monitoring,
|
||||
spot_price=spot_price,
|
||||
instance_profile_name=instance_profile_name,
|
||||
|
|
|
@ -33,7 +33,7 @@ Ensure an ACL does not exist
|
|||
|
||||
.. code-block:: yaml
|
||||
|
||||
removeAcl:
|
||||
removeAcl:
|
||||
win_dacl.absent:
|
||||
- name: HKEY_LOCAL_MACHINE\\SOFTWARE\\mykey
|
||||
- objectType: Registry
|
||||
|
@ -50,11 +50,11 @@ Ensure an object is inheriting permissions
|
|||
|
||||
.. code-block:: yaml
|
||||
|
||||
eInherit:
|
||||
win_dacl.enableinheritance:
|
||||
- name: HKEY_LOCAL_MACHINE\\SOFTWARE\\mykey
|
||||
- objectType: Registry
|
||||
- clear_existing_acl: True
|
||||
eInherit:
|
||||
win_dacl.enableinheritance:
|
||||
- name: HKEY_LOCAL_MACHINE\\SOFTWARE\\mykey
|
||||
- objectType: Registry
|
||||
- clear_existing_acl: True
|
||||
|
||||
Ensure an object is not inheriting permissions
|
||||
parameters:
|
||||
|
@ -62,13 +62,13 @@ Ensure an object is not inheriting permissions
|
|||
objectType - Registry/File/Directory
|
||||
copy_inherited_acl - True/False - if inheritance is enabled, should the inherited permissions be copied to the ACL when inheritance is disabled
|
||||
|
||||
.. code-block:: yaml
|
||||
.. code-block:: yaml
|
||||
|
||||
dInherit:
|
||||
win_dacl.disableinheritance:
|
||||
- name: HKEY_LOCAL_MACHINE\\SOFTWARE\\mykey
|
||||
- objectType: Registry
|
||||
- copy_inherited_acl: False
|
||||
dInherit:
|
||||
win_dacl.disableinheritance:
|
||||
- name: HKEY_LOCAL_MACHINE\\SOFTWARE\\mykey
|
||||
- objectType: Registry
|
||||
- copy_inherited_acl: False
|
||||
'''
|
||||
|
||||
|
||||
|
@ -119,7 +119,7 @@ def present(name, objectType, user, permission, acetype, propagation):
|
|||
|
||||
def absent(name, objectType, user, permission, acetype, propagation):
|
||||
'''
|
||||
Ensure a Linux ACL does not exist
|
||||
Ensure an ACL does not exist
|
||||
'''
|
||||
ret = {'name': name,
|
||||
'result': True,
|
||||
|
|
31
tests/integration/shell/test_spm.py
Normal file
31
tests/integration/shell/test_spm.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.case import ShellCase
|
||||
|
||||
|
||||
class SPMTest(ShellCase):
|
||||
'''
|
||||
Test spm script
|
||||
'''
|
||||
|
||||
def test_spm_help(self):
|
||||
'''
|
||||
test --help argument for spm
|
||||
'''
|
||||
expected_args = ['--version', '--assume-yes', '--help']
|
||||
output = self.run_spm('--help')
|
||||
for arg in expected_args:
|
||||
self.assertIn(arg, ''.join(output))
|
||||
|
||||
def test_spm_bad_arg(self):
|
||||
'''
|
||||
test correct output when bad argument passed
|
||||
'''
|
||||
expected_args = ['--version', '--assume-yes', '--help']
|
||||
output = self.run_spm('doesnotexist')
|
||||
for arg in expected_args:
|
||||
self.assertIn(arg, ''.join(output))
|
|
@ -442,6 +442,16 @@ class ShellCase(ShellTestCase, AdaptedConfigurationTestCaseMixin, ScriptPathMixi
|
|||
catch_stderr=catch_stderr,
|
||||
timeout=timeout)
|
||||
|
||||
def run_spm(self, arg_str, with_retcode=False, catch_stderr=False, timeout=60): # pylint: disable=W0221
|
||||
'''
|
||||
Execute spm
|
||||
'''
|
||||
return self.run_script('spm',
|
||||
arg_str,
|
||||
with_retcode=with_retcode,
|
||||
catch_stderr=catch_stderr,
|
||||
timeout=timeout)
|
||||
|
||||
def run_ssh(self, arg_str, with_retcode=False, catch_stderr=False, timeout=60): # pylint: disable=W0221
|
||||
'''
|
||||
Execute salt-ssh
|
||||
|
|
Loading…
Add table
Reference in a new issue