Example #1
0
#!/usr/bin/env python3.5
import argparse
import json

from serverAPI import serverAPI
from clientenv import clientenv

#########################################################################
#############################  BEGIN  ###################################

envDict = clientenv(outputDict=True)  # Will need 'server' only

parser = argparse.ArgumentParser()

parser.add_argument(
    "-S",
    "--server",
    type=str,
    default=envDict['server'],
    help=
    "the server address, defaults to $P3S_SERVER or if unset to http://localhost:8000/"
)

parser.add_argument(
    "-P",
    "--print",
    action='store_true',
    help="when set, prints a p3s summary in human-readable text format")

parser.add_argument("-p",
                    "--pilotsActive",
Example #2
0
# within a certain time limit, as "timed-out".                #
#                                                             #
# b) to erase from the DB jobs which are in the running state #
# but beyond their assigned time limit so presumed dead       #
#                                                             #
###############################################################

import argparse
import json
import os
import socket

from serverAPI import serverAPI
from clientenv import clientenv

envDict = clientenv(outputDict=True)  # Will need ('server', 'verb'):

myhost = socket.gethostname()

parser = argparse.ArgumentParser()

parser.add_argument("-t",
                    "--timeout",
                    type=int,
                    default=0,
                    help="pilot timeout in seconds, default 600")

parser.add_argument("-S",
                    "--server",
                    type=str,
                    default=envDict['server'],
Example #3
0
File: dataset.py Project: DUNE/p3s
                 state='',
                 comment='',
                 datatype='',
                 wf='',
                 wfuuid=''):
        self['uuid'] = uuid.uuid1()
        self['name'] = name
        self['state'] = state
        self['comment'] = comment
        self['datatype'] = datatype
        self['wf'] = wf
        self['wfuuid'] = wfuuid


#########################################################################
envDict = clientenv(outputDict=True)
#exit(0)

parser = argparse.ArgumentParser()

parser.add_argument("-U",
                    "--usage",
                    help="print usage notes and exit",
                    action='store_true')
parser.add_argument("-t",
                    "--test",
                    help="print, do not contact the server",
                    action='store_true')

parser.add_argument("-S",
                    "--server",