mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
grains state: changes comment more accurate
This commit is contained in:
parent
563fd2b56c
commit
1c5cd4c82d
@ -66,7 +66,7 @@ def present(name, value, delimiter=DEFAULT_TARGET_DELIM, force=False):
|
||||
ret['changes'] = {'new': name}
|
||||
else:
|
||||
ret['comment'] = 'Grain {0} is set to be changed'.format(name)
|
||||
ret['changes'] = {'new': name}
|
||||
ret['changes'] = {'changed': {name: value}}
|
||||
return ret
|
||||
ret = __salt__['grains.set'](name, value, force=force)
|
||||
if ret['result'] is True and ret['changes'] != {}:
|
||||
|
@ -325,7 +325,7 @@ class GrainsTestCase(TestCase):
|
||||
name='foo',
|
||||
value='newbar')
|
||||
self.assertEqual(ret['result'], None)
|
||||
self.assertEqual(ret['changes'], {'new': 'foo'})
|
||||
self.assertEqual(ret['changes'], {'changed': {'foo': 'newbar'}})
|
||||
self.assertEqual(
|
||||
grains.__grains__,
|
||||
{'a': 'aval', 'foo': 'bar'})
|
||||
|
Loading…
Reference in New Issue
Block a user