def monitored(name, **params):

    ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''}
    if __salt__['uptime.check_exists'](name=name):
        ret['result'] = True
        ret['comment'] = 'URL {0} is already monitored'.format(name)
        ret['changes'] = {}
        return ret
    if not __opts__['test']:
        url_monitored = __salt__['uptime.create'](name, **params)
        if url_monitored:
            ret['result'] = True
            msg = 'Successfully added the URL {0} to uptime'
            ret['comment'] = msg.format(name)
            ret['changes'] = {'url_monitored': url_monitored}
        else:
            ret['result'] = False
            ret['comment'] = 'Failed to add {0} to uptime'.format(name)
            ret['changes'] = {}
    else:
        msg = 'URL {0} is going to be added to uptime'
        ret.update(result=None,
                   comment=msg.format(name))
    return ret
Get a single project repository branch.
dataset/ETHPy150Open saltstack/salt/salt/states/uptime.py/monitored--crossover with--dataset/ETHPy150Open pyapi-gitlab/pyapi-gitlab/gitlab/__init__.py/Gitlab.getrepositorybranch