checks if requirements are met from the requires params
 creates an instance of the interaction
 calls run on the instance
764501
def run(**options)
      @options = options
      fail RequirementsNotMet.new("#{self} requires the following parameters #{requirements}") unless requirements_met?
      new(@options).tap do |interaction|
        interaction.__send__(:run)
      end
    end
183929
def has_required_params(self):
        '''
        
        '''
        return self.consumer_key and\
                self.consumer_secret and\
                self.resource_link_id and\
                self.launch_url
332466
def _construct_params(params, required_keys, opt_keys=None):
        
        try:
            params_list = [params.pop(key) for key in required_keys]
        except KeyError as e:
            raise MissingParameter(
                'Missing expected request parameter: %s' % e)
        if opt_keys:
            params_list.extend([params.pop(key)
                                for key in opt_keys if key in params])
        return '/'.join(str(p) for p in params_list)
1252972
def is_valid(self, context):
        
        if self.requires:
            for r in self.requires:
                if not r in context.executed_actions:
                    raise RequirementMissingError("Action '%s' requires '%s'" % (self.name, r))
        return True
1074555
def check_requisite(self, low, running, chunks, pre=False):
        '''
        
        '''
        disabled_reqs = self.opts.get('disabled_requisites', [])
        if not isinstance(disabled_reqs, list):
            disabled_reqs = [disabled_reqs]
        present = False
        # If mod_watch is not available make it a require
        if 'watch' in low:
            if '{0}.mod_watch'.format(low['state']) not in self.states:
                if 'require' in low:
                    low['require'].extend(low.pop('watch'))
                else:
                    low['require'] = low.pop('watch')
            else:
                present = True
        if 'watch_any' in low:
            if '{0}.mod_watch'.format(low['state']) not in self.states:
                if 'require_any' in low:
                    low['require_any'].extend(low.pop('watch_any'))
                else:
                    low['require_any'] = low.pop('watch_any')
            else:
                present = True
        if 'require' in low:
            present = True
        if 'require_any' in low:
            present = True
        if 'prerequired' in low:
            present = True
        if 'prereq' in low:
            present = True
        if 'onfail' in low:
            present = True
        if 'onfail_any' in low:
            present = True
        if 'onfail_all' in low:
            present = True
        if 'onchanges' in low:
            present = True
        if 'onchanges_any' in low:
            present = True
        if not present:
            return 'met', ()
        self.reconcile_procs(running)
        reqs = {
                'require': [],
                'require_any': [],
                'watch': [],
                'watch_any': [],
                'prereq': [],
                'onfail': [],
                'onfail_any': [],
                'onfail_all': [],
                'onchanges': [],
                'onchanges_any': []}
        if pre:
            reqs['prerequired'] = []
        for r_state in reqs:
            if r_state in low and low[r_state] is not None:
                if r_state in disabled_reqs:
                    log.warning('The %s requisite has been disabled, Ignoring.', r_state)
                    continue
                for req in low[r_state]:
                    if isinstance(req, six.string_types):
                        req = {'id': req}
                    req = trim_req(req)
                    found = False
                    for chunk in chunks:
                        req_key = next(iter(req))
                        req_val = req[req_key]
                        if req_val is None:
                            continue
                        if req_key == 'sls':
                            # Allow requisite tracking of entire sls files
                            if fnmatch.fnmatch(chunk['__sls__'], req_val):
                                found = True
                                reqs[r_state].append(chunk)
                            continue
                        try:
                            if isinstance(req_val, six.string_types):
                                if (fnmatch.fnmatch(chunk['name'], req_val) or
                                    fnmatch.fnmatch(chunk['__id__'], req_val)):
                                    if req_key == 'id' or chunk['state'] == req_key:
                                        found = True
                                        reqs[r_state].append(chunk)
                            else:
                                raise KeyError
                        except KeyError as exc:
                            raise SaltRenderError(
                                'Could not locate requisite of [{0}] present in state with name [{1}]'.format(
                                    req_key, chunk['name']))
                        except TypeError:
                            # On Python 2, the above req_val, being an OrderedDict, will raise a KeyError,
                            # however on Python 3 it will raise a TypeError
                            # This was found when running tests.unit.test_state.StateCompilerTestCase.test_render_error_on_invalid_requisite
                            raise SaltRenderError(
                                'Could not locate requisite of [{0}] present in state with name [{1}]'.format(
                                    req_key, chunk['name']))
                    if not found:
                        return 'unmet', ()
        fun_stats = set()
        for r_state, chunks in six.iteritems(reqs):
            req_stats = set()
            if r_state.startswith('prereq') and not r_state.startswith('prerequired'):
                run_dict = self.pre
            else:
                run_dict = running

            while True:
                if self.reconcile_procs(run_dict):
                    break
                time.sleep(0.01)

            for chunk in chunks:
                tag = _gen_tag(chunk)
                if tag not in run_dict:
                    req_stats.add('unmet')
                    continue
                if r_state.startswith('onfail'):
                    if run_dict[tag]['result'] is True:
                        req_stats.add('onfail')  # At least one state is OK
                        continue
                else:
                    if run_dict[tag]['result'] is False:
                        req_stats.add('fail')
                        continue
                if r_state.startswith('onchanges'):
                    if not run_dict[tag]['changes']:
                        req_stats.add('onchanges')
                    else:
                        req_stats.add('onchangesmet')
                    continue
                if r_state.startswith('watch') and run_dict[tag]['changes']:
                    req_stats.add('change')
                    continue
                if r_state.startswith('prereq') and run_dict[tag]['result'] is None:
                    if not r_state.startswith('prerequired'):
                        req_stats.add('premet')
                if r_state.startswith('prereq') and not run_dict[tag]['result'] is None:
                    if not r_state.startswith('prerequired'):
                        req_stats.add('pre')
                else:
                    if run_dict[tag].get('__state_ran__', True):
                        req_stats.add('met')
            if r_state.endswith('_any') or r_state == 'onfail':
                if 'met' in req_stats or 'change' in req_stats:
                    if 'fail' in req_stats:
                        req_stats.remove('fail')
                if 'onchangesmet' in req_stats:
                    if 'onchanges' in req_stats:
                        req_stats.remove('onchanges')
                    if 'fail' in req_stats:
                        req_stats.remove('fail')
                if 'onfail' in req_stats:
                    # a met requisite in this case implies a success
                    if 'met' in req_stats:
                        req_stats.remove('onfail')
            if r_state.endswith('_all'):
                if 'onfail' in req_stats:
                    # a met requisite in this case implies a failure
                    if 'met' in req_stats:
                        req_stats.remove('met')
            fun_stats.update(req_stats)

        if 'unmet' in fun_stats:
            status = 'unmet'
        elif 'fail' in fun_stats:
            status = 'fail'
        elif 'pre' in fun_stats:
            if 'premet' in fun_stats:
                status = 'met'
            else:
                status = 'pre'
        elif 'onfail' in fun_stats and 'onchangesmet' not in fun_stats:
            status = 'onfail'
        elif 'onchanges' in fun_stats and 'onchangesmet' not in fun_stats:
            status = 'onchanges'
        elif 'change' in fun_stats:
            status = 'change'
        else:
            status = 'met'

        return status, reqs
1198975
function Request(args) {
  if (false === (this instanceof Request)) throw new Error('new operator required');
  if (typeof args == 'string') {
    var quickType = args;
    args = {};
    args.type = quickType;
  }
  args = args || {};
  this.type = args.type || null;
  if (args.value) // todo spec as optional param
    this.value = args.value;
  if (!this.type || typeof this.type != 'string') throw new Error('Request type required');
  switch (this.type) {
    case 'Command':
      this.command = args.command || null;
      if (!(this.command instanceof Command)) throw new Error('command object required');
      break;
  }
}
736179
def check_parameters
      errors = ""
      @url.scan(/:(\w*)/).flatten.map(&:to_sym).each do |arg|
        errors += "<li><p>parameter '#{arg.to_s}' is required</p></li>" unless @attributes.has_key?(arg)
      end
      errors.empty? ? "" : "<ul>#{errors}</ul>"
    end
179753
def builddepends
    # Handle the requires
    self.class.relationship_params.collect do |klass|
      if param = @parameters[klass.name]
        param.to_edges
      end
    end.flatten.reject { |r| r.nil? }
  end
1125836
def check_required_params(self):
        
        for param in self.REQUIRED_FIELDS:
            if param not in self.params:
                raise ValidationError("Missing parameter: {} for {}".format(
                    param, self.__class__.path
                ))

        for child in self.TASKS:
            for param in child.REQUIRED_FIELDS:
                if param not in self.params:
                    raise ValidationError(
                        "Missing parameter: {} for {}".format(param, child.path)
                    )
112218
def required_params(data, *r_params):
    

    if not reduce(lambda still_valid, param: still_valid and param in data,
                  r_params, True):
        raise RequestException(msg_err_missing_params(*r_params))
313529
def request(params={})
      normalize_parameters params
      raise UnmetRequirementsError, "Required parameters: #{requirements}" \
        unless meets_requirements? params
      credentials = pull_credentials params
      pairs = pull_url_pairs params
      request = construct_request expand_url(pairs), params, credentials
      yield request if block_given?
      request
    end
176092
def validate_paramified_params
      self.class.paramify_methods.each do |method|
        params = send(method)
        transfer_errors_from(params, TermMapper.scope(params.group)) if !params.valid?
      end
    end
848616
def _has_requirements(self):
        
        self._closed()

        return any([self.has_workflow_step, self.has_scatter_requirement,
                   self.has_multiple_inputs])
365564
def run!(**options)
      interaction = run(options)
      raise error_class.new(interaction.error) unless interaction.success?
      interaction.result
    end
778383
def check_required_params(self):
        
        for param in self.REQUIRED_FIELDS:
            if param not in self.params:
                raise ValidationError("Missing parameter: {}".format(param))
1352864
def validate_required_params!(params, *required)
      required.flatten.each do |param|
        if !params.key?(param) || params[param].to_s.empty?
          raise ArgumentError, "Missing required parameter: #{param}."
        end
      end
    end
47384
def check_exists(required, input)
      required.inject(true) do |result, key|
        input[key] && result
      end
    end