use grains module instead of state
authorPaul Tonelli <paul.tonelli@logilab.fr>
Tue, 16 Jul 2013 19:34:50 +0200
changeset 170 98db7459001a
parent 169 1b1a148fed55
child 171 1a101aca2de0
use grains module instead of state
others/ec2_ami_parser.py
--- a/others/ec2_ami_parser.py	Tue Jul 16 18:33:32 2013 +0200
+++ b/others/ec2_ami_parser.py	Tue Jul 16 19:34:50 2013 +0200
@@ -21,8 +21,8 @@
     if isinstance(pair[1],list) and len(pair[1]) > 0:
         pair=(pair[0],pair[1][0])
     if pair[1] != '':
-        Popen(['salt-call', 'state.single', 'grains.present',
-            'name=' + pair[0], 'value=' + pair[1]]).wait()
+        Popen(['salt-call', 'grains.setval',
+            pair[0], pair[1]]).wait()
 
 class FakeSecHead(object):
    def __init__(self, fp):