def _fmadm_action_fmri(action, fmri):
 ret = {}
 fmadm = _check_fmadm()
 cmd = '{cmd} {action} {fmri}'.format(cmd=fmadm, action=action, fmri=fmri)
 res = __salt__['cmd.run_all'](cmd)
 retcode = res['retcode']
 result = {}
 if (retcode != 0):
  result['Error'] = res['stderr']
 else:
  result = True
 return result

def _fmadm_action_fmri ( action , fmri ) : ret = { } fmadm = _check_fmadm ( ) cmd = '{cmd} {action} {fmri}' . format ( cmd = fmadm , action = action , fmri = fmri ) res = __salt__ [ 'cmd.run_all' ] ( cmd ) retcode = res [ 'retcode' ] result = { } if ( retcode != 0 ) : result [ 'Error' ] = res [ 'stderr' ] else : result = True return result
internal function for fmadm .