def succeed_with_changes(name):
 ret = {'name': name, 'changes': {}, 'result': True, 'comment': 'Success!'}
 ret['changes'] = {'testing': {'old': 'Unchanged', 'new': 'Something pretended to change'}}
 if __opts__['test']:
  ret['result'] = None
  ret['comment'] = "If we weren't testing, this would be successful with changes"
 return ret

def succeed_with_changes ( name ) : ret = { 'name' : name , 'changes' : { } , 'result' : True , 'comment' : 'Success!' } ret [ 'changes' ] = { 'testing' : { 'old' : 'Unchanged' , 'new' : 'Something pretended to change' } } if __opts__ [ 'test' ] : ret [ 'result' ] = None ret [ 'comment' ] = "If we weren't testing, this would be successful with changes" return ret
returns successful and changes is not empty .