def get_pending_domain_join():
 vname = '(Default)'
 base_key = 'SYSTEM\\CurrentControlSet\\Services\\Netlogon'
 avoid_key = '{0}\\AvoidSpnSet'.format(base_key)
 join_key = '{0}\\JoinDomain'.format(base_key)
 avoid_reg_ret = __salt__['reg.read_value']('HKLM', avoid_key, vname)
 if avoid_reg_ret['success']:
  log.debug('Found key: %s', avoid_key)
  return True
 else:
  log.debug('Unable to access key: %s', avoid_key)
 join_reg_ret = __salt__['reg.read_value']('HKLM', join_key, vname)
 if join_reg_ret['success']:
  log.debug('Found key: %s', join_key)
  return True
 else:
  log.debug('Unable to access key: %s', join_key)
 return False

def get_pending_domain_join ( ) : vname = '(Default)' base_key = 'SYSTEM\\CurrentControlSet\\Services\\Netlogon' avoid_key = '{0}\\AvoidSpnSet' . format ( base_key ) join_key = '{0}\\JoinDomain' . format ( base_key ) avoid_reg_ret = __salt__ [ 'reg.read_value' ] ( 'HKLM' , avoid_key , vname ) if avoid_reg_ret [ 'success' ] : log . debug ( 'Found key: %s' , avoid_key ) return True else : log . debug ( 'Unable to access key: %s' , avoid_key ) join_reg_ret = __salt__ [ 'reg.read_value' ] ( 'HKLM' , join_key , vname ) if join_reg_ret [ 'success' ] : log . debug ( 'Found key: %s' , join_key ) return True else : log . debug ( 'Unable to access key: %s' , join_key ) return False
determine whether there is a pending domain join action that requires a reboot .