예제 #1
0
파일: __init__.py 프로젝트: gidiko/gridapp
def info(attr):
    """ Information about the certificate and the proxy"""
    gr = Grid()
    if attr == "cert":
        gr.getInfo().certificate()
    elif attr == "proxy":
        gr.getProxy().info()
예제 #2
0
파일: __init__.py 프로젝트: gidiko/gridapp
def login(vo, addr = None, keypath = " "):
    """ Connect to Grid and create a new proxy."""
    if is_ui() == 1:
        gr = Grid()
    else:
        remhost = RemoteHost(addr, keypath)
        gr = Grid(rhost = remhost)

    creategridtemp(gr.getExecutor())
    gr.setVo(vo)
    gr.newProxy()
    gr.getData().chdir("/grid/"+vo)
    Jobs(gr.getExecutor())
예제 #3
0
파일: __init__.py 프로젝트: gidiko/gridapp
def ces(index = None):
    """ Print CEs or return the name of the CE on index"""
    gr = Grid()
    if index is None:
        gr.getInfo().getCEs()
    else:
        if gr.getInfo().CEs == []:
            gr.getInfo().collectCEInfo();
        return gr.getInfo().CEs[index-1].CE
예제 #4
0
파일: __init__.py 프로젝트: gidiko/gridapp
def ses(index = None):
    """ Print SEs or return the name of the SE on index"""
    gr = Grid()
    if index is None:
        gr.getInfo().getSEs()
    else:
        if gr.getInfo().SEs == []:
            gr.getInfo().collectSEInfo()
        return gr.getInfo().SEs[index-1].SE
예제 #5
0
파일: __init__.py 프로젝트: gidiko/gridapp
def chdir(_dir):
    """ Change default lfn directory """
    gr = Grid()
    return gr.getData().chdir(_dir)
예제 #6
0
파일: __init__.py 프로젝트: gidiko/gridapp
def mkdir(_dir):
    """ Create a new directory """
    gr = Grid()
    return gr.getData().mkdir(_dir)
예제 #7
0
파일: __init__.py 프로젝트: gidiko/gridapp
def lsdir(_dir = None):
    """ List files of a directory """
    gr = Grid()
    return gr.getData().lsdir(_dir)
예제 #8
0
파일: __init__.py 프로젝트: gidiko/gridapp
def remove(gridfile, se = None):
    """ Remove a file from a storage element """
    gr = Grid()
    return gr.getData().remove(gridfile, gr.getVo(), se)
예제 #9
0
파일: __init__.py 프로젝트: gidiko/gridapp
def replicate(gridfile, se):
    """ Replicate (Copy) a file to the storage element """
    gr = Grid()
    return gr.getData().replicate(gridfile, se, gr.getVo())
예제 #10
0
파일: __init__.py 프로젝트: gidiko/gridapp
def download(gridfile, localfile):
    """ Doenload a file from a storage element """
    gr = Grid()
    return gr.getData().download(gridfile, localfile, gr.getVo())
예제 #11
0
파일: __init__.py 프로젝트: gidiko/gridapp
def upload(localfile, gridfile, se):
    """ Upload a file to a storage element """
    gr = Grid()
    return gr.getData().upload(localfile, gridfile, gr.getVo(), se)
예제 #12
0
파일: __init__.py 프로젝트: gidiko/gridapp
def logout():
    """ Logout from Grid """
    gr = Grid()
    gr.terminate()
예제 #13
0
파일: __init__.py 프로젝트: gidiko/gridapp
def rmdir(_dir):
    """ Remove a directory """
    gr = Grid()
    return gr.getData().rmdir(_dir)