Deleting deprecated function and switch test to 2017.7
The patch deletes deprecated cmd.run function which actually
was defined in salt 2016 as alias for cmd.shell therefore this
change supports backward compatibility.
Change-Id: I47eae0b8ee45ca1a1a9b3e8e544c893614573fda
Related-PROD: 17056
diff --git a/.kitchen.yml b/.kitchen.yml
index 379123c..fe8de71 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -8,7 +8,7 @@
name: salt_solo
salt_install: bootstrap
salt_bootstrap_url: https://bootstrap.saltstack.com
- salt_version: latest
+ salt_version: <%=ENV['SALT_VERSION'] || 'latest'%>
salt_minion_id: salt.ci.local
require_chef: false
log_level: error
diff --git a/.travis.yml b/.travis.yml
index f10a26c..cdba2b5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,17 @@
env:
+ - PLATFORM=trevorj/salty-whales:trusty-2017.7 SUITE=control-default
+ - PLATFORM=trevorj/salty-whales:trusty-2017.7 SUITE=master-default
+ - PLATFORM=trevorj/salty-whales:trusty-2017.7 SUITE=minion-default
+ - PLATFORM=trevorj/salty-whales:trusty-2017.7 SUITE=minion-multi-master-failover
+ - PLATFORM=trevorj/salty-whales:xenial-2017.7 SUITE=control-default
+ - PLATFORM=trevorj/salty-whales:xenial-2017.7 SUITE=master-default
+ - PLATFORM=trevorj/salty-whales:xenial-2017.7 SUITE=minion-default
+ - PLATFORM=trevorj/salty-whales:xenial-2017.7 SUITE=minion-multi-master-failover
+# TODO, once 18.04 LTS Bionic Beaver is released, rename trusty to bionic
+ - PLATFORM=trevorj/salty-whales:bionic-2017.7 SUITE=master-default
+ - PLATFORM=trevorj/salty-whales:bionic-2017.7 SUITE=minion-default
- PLATFORM=trevorj/salty-whales:trusty SUITE=control-default
- PLATFORM=trevorj/salty-whales:trusty SUITE=master-default
- PLATFORM=trevorj/salty-whales:trusty SUITE=minion-default
diff --git a/_modules/virtng.py b/_modules/virtng.py
index 6f180b0..304a6bb 100644
--- a/_modules/virtng.py
+++ b/_modules/virtng.py
@@ -313,7 +313,7 @@
Detect information for the image at path
'''
ret = {}
- out = __salt__['cmd.run']('qemu-img info {0}'.format(path))
+ out = __salt__['cmd.shell']('qemu-img info {0}'.format(path))
match_map = {'size': r'virtual size: \w+ \((\d+) byte[s]?\)',
'format': r'file format: (\w+)'}
@@ -332,7 +332,7 @@
'''
Detect what driver needs to be used for the given image
'''
- out = __salt__['cmd.run']('qemu-img info {0}'.format(vda))
+ out = __salt__['cmd.shell']('qemu-img info {0}'.format(vda))
if 'file format: qcow2' in out:
return 'qcow2'
else:
@@ -1599,7 +1599,7 @@
except IOError:
# No /proc/modules? Are we on Windows? Or Solaris?
return False
- return 'libvirtd' in __salt__['cmd.run'](__grains__['ps'])
+ return 'libvirtd' in __salt__['cmd.shell'](__grains__['ps'])
def is_xen_hyper():
@@ -1624,7 +1624,7 @@
except IOError:
# No /proc/modules? Are we on Windows? Or Solaris?
return False
- return 'libvirtd' in __salt__['cmd.run'](__grains__['ps'])
+ return 'libvirtd' in __salt__['cmd.shell'](__grains__['ps'])
def is_hyper():
diff --git a/salt/files/orchestrate.sls b/salt/files/orchestrate.sls
index dde20cb..378d570 100644
--- a/salt/files/orchestrate.sls
+++ b/salt/files/orchestrate.sls
@@ -30,7 +30,7 @@
{%- if salt['file.directory_exists']('/srv/salt/env/'+environment_name+'/'+formula.0+'/orchestrate') and formula|length > 1 and salt['file.file_exists']('/srv/salt/env/'+environment_name+'/'+formula.0+'/orchestrate/'+formula.1+'.sls') %}
-{{ salt['cmd.run']('cat /srv/salt/env/'+environment_name+'/'+formula.0+'/orchestrate/'+formula.1+'.sls') }}
+{{ salt['cmd.shell']('cat /srv/salt/env/'+environment_name+'/'+formula.0+'/orchestrate/'+formula.1+'.sls') }}
{%- else %}
{%- if args[ state.0 ] is defined %}