Exemplo n.º 1
0
def get_nested_view_from_url(url):
    """
    Returns View based on provided URL. Convenient for nested views.
    """
    matched = constants.RE_SPLIT_VIEW_URL.search(url)
    if not matched:
        raise BadURL("Cannot parse URL %s" % url)
    jenkinsci = Jenkins(matched.group(0))
    return jenkinsci.get_view_by_url(url)
Exemplo n.º 2
0
def get_view_from_url(url):
    """
    Factory method
    """
    matched = constants.RE_SPLIT_VIEW_URL.search(url)
    if not matched:
        raise BadURL("Cannot parse URL %s" % url)
    jenkinsurl, view_name = matched.groups()
    jenkinsci = Jenkins(jenkinsurl)
    return jenkinsci.views[view_name]
Exemplo n.º 3
0
def get_view_from_url(url, username=None, password=None, ssl_verify=True):
    """
    Factory method
    """
    matched = constants.RE_SPLIT_VIEW_URL.search(url)
    if not matched:
        raise BadURL("Cannot parse URL %s" % url)
    jenkinsurl, view_name = matched.groups()
    jenkinsci = Jenkins(jenkinsurl,
                        username=username,
                        password=password,
                        ssl_verify=ssl_verify)
    return jenkinsci.views[view_name]
Exemplo n.º 4
0
def get_nested_view_from_url(url,
                             username=None,
                             password=None,
                             ssl_verify=True):
    """
    Returns View based on provided URL. Convenient for nested views.
    """
    matched = constants.RE_SPLIT_VIEW_URL.search(url)
    if not matched:
        raise BadURL("Cannot parse URL %s" % url)
    jenkinsci = Jenkins(matched.group(0),
                        username=username,
                        password=password,
                        ssl_verify=ssl_verify)
    return jenkinsci.get_view_by_url(url)