Beispiel #1
0
    def do_put(self, args):

        ## here args includes everyting after the invokation command
        ## split the args starting using shlex into tokens
        line = shlex.split(args)
        ## parse the tokens using the previously defined #global parser
        tokens = put_parser.parse_args(line)

        splitChoice = str(0)
        setLease = str(0)

        if tokens.singleBlock == True:
            splitChoice = str(1)
        if tokens.setLease == True:
            setLease = str(1)

        if tokens.v == True:
            module_EdgeClientCLI_put.put(
                tokens.path, tokens.streamId, tokens.start, tokens.metadata,
                tokens.fogIp, tokens.fogPort, tokens.edgeId, tokens.clientId,
                splitChoice, setLease, tokens.duration, tokens.comp, BASE_LOG,
                True)
        else:
            module_EdgeClientCLI_put.put(
                tokens.path, tokens.streamId, tokens.start, tokens.metadata,
                tokens.fogIp, tokens.fogPort, tokens.edgeId, tokens.clientId,
                splitChoice, setLease, tokens.duration, tokens.comp, BASE_LOG)
Beispiel #2
0
def do_put(path, streamId, start, metadata, fogIp, fogPort, edgeId, clientId,
           duration, comp, erasureCode):
    splitChoice = str(1)
    setLease = str(0)
    return module_EdgeClientCLI_put.put(path, streamId, start, metadata, fogIp,
                                        fogPort, edgeId, clientId, splitChoice,
                                        setLease, erasureCode, duration, comp)