Return information about the Jenkins job.

    :param name: The name of the job is check if it exists.
    :return: Information about the Jenkins job.

    CLI Example:

    .. code-block:: bash

        salt '*' jenkins.get_job_info jobname
351714
def get_job_info(name=None):
    '''
    

    '''
    if not name:
        raise SaltInvocationError('Required parameter \'name\' is missing')

    server = _connect()

    if not job_exists(name):
        raise CommandExecutionError('Job \'{0}\' does not exist'.format(name))

    job_info = server.get_job_info(name)
    if job_info:
        return job_info
    return False
437843
def get_name_DID_info(self, name):
        
        db = get_db_state(self.working_dir)
        did_info = db.get_name_DID_info(name)
        if did_info is None:
            return {'error': 'No such name', 'http_status': 404}

        return did_info
771307
def info(name, root=None):
    '''
    
    '''
    if root is not None:
        getgrnam = functools.partial(_getgrnam, root=root)
    else:
        getgrnam = functools.partial(grp.getgrnam)

    try:
        grinfo = getgrnam(name)
    except KeyError:
        return {}
    else:
        return _format_info(grinfo)
1062737
def job(project_id, job_id, opts = {})
      data, _status_code, _headers = job_with_http_info(project_id, job_id, opts)
      return data
    end
863101
def getContainerName(job):
    """"""
    return '--'.join([str(job),
                      base64.b64encode(os.urandom(9), b'-_').decode('utf-8')])\
                      .replace("'", '').replace('"', '').replace('_', '')
662127
def get_job_details(self, job_id):
        
        response = requests.get(self._get_job_details_url(job_id))

        response.raise_for_status()

        return response
1042077
def get_artifact(job_name,filename)
      @artifact = job.find_artifact(job_name)
      response = make_http_request(Net::HTTP::Get.new(@artifact))
      if response.code == "200"
        File.write(File.expand_path(filename), response.body)
      else
        raise "Couldn't get the artifact"
      end
    end
318910
def job(self, name):
        
        for job in self.jobs():
            if job.data.name == name:
                return job
915162
def info(job_name_or_id):
    
    try:
        experiment = ExperimentClient().get(normalize_job_name(job_name_or_id))
    except FloydException:
        experiment = ExperimentClient().get(job_name_or_id)

    task_instance_id = get_module_task_instance_id(experiment.task_instances)
    task_instance = TaskInstanceClient().get(task_instance_id) if task_instance_id else None
    normalized_job_name = normalize_job_name(experiment.name)
    table = [["Job name", normalized_job_name],
             ["Created", experiment.created_pretty],
             ["Status", experiment.state], ["Duration(s)", experiment.duration_rounded],
             ["Instance", experiment.instance_type_trimmed],
             ["Description", experiment.description],
             ["Metrics", format_metrics(experiment.latest_metrics)]]
    if task_instance and task_instance.mode in ['jupyter', 'serving']:
        table.append(["Mode", task_instance.mode])
        table.append(["Url", experiment.service_url])
    if experiment.tensorboard_url:
        table.append(["TensorBoard", experiment.tensorboard_url])
    floyd_logger.info(tabulate(table))
1309090
def get_calls(self, job_name):
        '''
        
        '''

        config = self.file_index.get_by_name(job_name).yaml

        calls = self.get_calls_from_dict(config, from_name=job_name)

        return calls
150457
def _name_is_available(self, job_name):
        
        return (False
                if [job for job in self.jobs if job.name == job_name]
                else True)
1319536
public JobResult job(String jobname) {
        HttpGet getRequest = new HttpGet(baseUrl + "job/" + jobname);
        getRequest.addHeader("Accept", "application/xml");
        return jobResult(getRequest);
    }
646930
private static String getJobName(JobExecutionPlan jobExecutionPlan) {
    return jobExecutionPlan.getJobSpec().getConfig().getString(ConfigurationKeys.JOB_NAME_KEY);
  }
168881
def find(self, name):
        
        result = None
        for t in self.array:
            if str(t) == name:
                result = Tag(t.jobject)
                break
        return result
954423
def get_job_output(self, job_id):
        
        log.debug("GetJobOutput %r", job_id)
        path = "/%s/jobs/%s/live/out" % (self.account, job_id)
        res, content = self._request(path, "GET")
        if res["status"] != "200":
            raise errors.MantaAPIError(res, content)
        keys = content.splitlines(False)
        return keys
1179660
def get_job(project_id, job_id, opts = {})
      data, _status_code, _headers = get_job_with_http_info(project_id, job_id, opts)
      return data
    end
662820
def enable_job(name, **kwargs):
    '''
    
    '''

    ret = {'comment': [],
           'result': True}

    if not name:
        ret['comment'] = 'Job name is required.'
        ret['result'] = False

    if 'test' in __opts__ and __opts__['test']:
        ret['comment'] = 'Job: {0} would be enabled in schedule.'.format(name)
    else:
        persist = True
        if 'persist' in kwargs:
            persist = kwargs['persist']

        if name in list_(show_all=True, where='opts', return_yaml=False):
            event_data = {'name': name, 'func': 'enable_job', 'persist': persist}
        elif name in list_(show_all=True, where='pillar', return_yaml=False):
            event_data = {'name': name, 'where': 'pillar', 'func': 'enable_job', 'persist': False}
        else:
            ret['comment'] = 'Job {0} does not exist.'.format(name)
            ret['result'] = False
            return ret

        try:
            eventer = salt.utils.event.get_event('minion', opts=__opts__)
            res = __salt__['event.fire'](event_data, 'manage_schedule')
            if res:
                event_ret = eventer.get_event(tag='/salt/minion/minion_schedule_enabled_job_complete', wait=30)
                if event_ret and event_ret['complete']:
                    schedule = event_ret['schedule']
                    # check item exists in schedule and is enabled
                    if name in schedule and schedule[name]['enabled']:
                        ret['result'] = True
                        ret['comment'] = 'Enabled Job {0} in schedule.'.format(name)
                    else:
                        ret['result'] = False
                        ret['comment'] = 'Failed to enable job {0} in schedule.'.format(name)
                    return ret
        except KeyError:
            # Effectively a no-op, since we can't really return without an event system
            ret['comment'] = 'Event module not available. Schedule enable job failed.'
    return ret