mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge branch '2017.7' into develop2
This commit is contained in:
commit
0614d1af30
@ -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,
|
||||
|
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…
Reference in New Issue
Block a user