Returns a sw_workaround object with a specific id
508475
def sw_workarounds(options = {})
      options = {
        id: nil
      }.update(options)
      return nil if @_sw_workarounds.nil?
      return nil if @_sw_workarounds.empty?

      sw_workarounds_found = Hash.new do |h, k|
        h[k] = {}
      end

      # filter on id
      filter_hash(@_sw_workarounds, options[:id]).each do |id, workarounds|
        sw_workarounds_found[id] = workarounds
      end
      if sw_workarounds_found.empty?
        return nil
      elsif sw_workarounds_found.size == 1
        sw_workarounds_found.values.first # .values.first
      else
        return sw_workarounds_found
      end
    end
604142
def wait_for_subworkflows(self, workflow_results):
        ''''''
        wf_ids = sum([x['pending_workflows'] for x in workflow_results], [])
        for wf_id in wf_ids:
            # here we did not check if workflow ids match
            yield self.socket
            res = self.socket.recv_pyobj()
            if res is None:
                sys.exit(0)
            elif isinstance(res, Exception):
                raise res
526083
def wf_maintenance_window_id?(id)
      id = id.to_s if id.is_a?(Numeric)
      return true if id.is_a?(String) && id =~ /^\d{13}$/

      raise Wavefront::Exception::InvalidMaintenanceWindowId
    end
68010
def get_task_result(self, task_id):
        
        data = {
            'action': 'get_result',
            'id': task_id
        }
        self.__send_pyobj(data)
        task = self.__recv_pyobj()
        return task
1054220
def get(self, sid):
        
        return WorkflowContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, )
1090994
function verifyProjectIdDoesNotExist(req, res, next) {
  var projectId = req.body.id;
  var dataStore = req.app.dataStore;

  // Check for an existing project REST resource - /projects/{projectId}
  var resource = new swagger.Resource('/projects', projectId, null);
  dataStore.get(resource, function(err, resource) {
    if (resource) {
      // The ID already exists, so send an HTTP 409 (Conflict)
      res.sendStatus(409);
    }
    else {
      next();
    }
  });
}
285802
def get_dashboard(self, id, **kwargs):
        "
        resp = self._get_object_by_name(self._DASHBOARD_ENDPOINT_SUFFIX, id,
                                        **kwargs)
        return resp
774591
function (id, ds) {
      this.ds = ds;
      this.errorData = [];
      var result = this._getMockOfDatatypeId(id);
      return {
        json: result,
        error: this.errorData
      };
    }
644951
function (config, cb) {

        var o = {}, k;
        o.domain = this.baseConfig.domain;
        //o.execution = this.workflowId;

        for (k in config) {
            if (config.hasOwnProperty(k)) {
                o[k] = config[k];
            }
        }

        this.swfClient.getWorkflowExecutionHistory(o, cb);
    }
436889
def _get_anchor(repo, id_prefix):
    
    result = None
    for anchor_id, anchor in repo.items():
        if anchor_id.startswith(id_prefix):
            if result is not None:
                raise ExitError(
                    ExitCode.DATA_ERR,
                    'Ambiguous ID specification')

            result = (anchor_id, anchor)

    if result is None:
        raise ExitError(
            ExitCode.DATA_ERR,
            'No anchor matching ID specification')

    return result
860810
def find_workflow(workflow_name, custom_id)
      params = { ATTR_ID => custom_id, ATTR_NAME => workflow_name }
      params[ATTR_PROG] = PROG
      data = @http.get(instance_website_url(params))['data']
      data && @properties.object_from(
        data['name'],
        @serializer.decode(data['properties'])
      )
    rescue Zenaton::InternalError => exception
      return nil if exception.message =~ /No workflow instance found/
      raise exception
    end
265391
def get(self, request, *args, **kwargs):
        """"""
        try:
            context = self.get_context_data(**kwargs)
        except exceptions.NotAvailable:
            exceptions.handle(request)
        self.set_workflow_step_errors(context)
        return self.render_to_response(context)
357908
def works(self, prefix_id):
        
        context = '%s/%s' % (self.ENDPOINT, str(prefix_id))
        return Works(context=context)
991754
def get_es_action_item(data_item, action_settings, es_type, id_field=None):
    '''  '''

    action_item = dict.copy(action_settings)
    if id_field is not None:
        id_val = first(list(get_dict_key(data_item, id_field)))
        if id_val is not None:
            action_item['_id'] = id_val
    elif data_item.get('id'):
        if data_item['id'].startswith("%s/" % action_settings['_index']):
            action_item['_id'] = "/".join(data_item['id'].split("/")[2:])
        else:
            action_item['_id'] = data_item['id']
    if data_item.get('data'):
        action_item['_source'] = data_item['data']
    else:
        action_item['_source'] = data_item
    action_item['_type'] = es_type
    return action_item
1155069
def ServiceWorker_stopWorker(self, versionId):
		
		assert isinstance(versionId, (str,)
		    ), "Argument 'versionId' must be of type '['str']'. Received type: '%s'" % type(
		    versionId)
		subdom_funcs = self.synchronous_command('ServiceWorker.stopWorker',
		    versionId=versionId)
		return subdom_funcs
1277785
def GetWSAActionFault(operation, name):
    
    attr = operation.faults[name].action
    if attr is not None:
        return attr
    return WSA.FAULT
601325
function getProjectPathFromHubID(id) {
		var query = sharedProject.findOne({hubid: id}, 'location');
		return query.exec()
		.then(function(doc) {
			return doc ? doc.location : undefined;
		});
	}