build arguments for command.
425996
def _build_arguments(self):
        
        # TODO: add tests to confirm deployments
        self._parser.add_argument(
            '-t', '--tag',
            required=False,
            type=six.text_type,
            default=None,
            help='This tag will override image tag provided in the configuration file.'
        )

        self._parser.add_argument(
            '-e', '--env',
            required=False,
            type=six.text_type,
            action='append',
            default=None,
            help='environment variables to create in the container at run time.'
        )
126561
def add_arguments(self, parser):
        
        super(Command, self).add_arguments(parser)

        parser.add_argument('--badges',
                            action='store',
                            dest='badges',
                            type=str)

        parser.add_argument('--db-read',
                            action='store',
                            dest='db_read',
                            type=str)

        parser.add_argument('--disable-signals',
                            action='store_true',
                            dest='disable_signals')

        parser.add_argument('--batch-size',
                            action='store',
                            dest='batch_size',
                            type=int)

        parser.add_argument('--update',
                            action='store_true',
                            dest='update')

        parser.add_argument('--exclude-badges',
                            action='store',
                            dest='exclude_badges',
                            type=str)
1361186
def commandlineargs(self):
        """"""
        commandlineargs = []
        for parametergroup, parameters in self.parameters: #pylint: disable=unused-variable
            for parameter in parameters:
                p = parameter.compilearg()
                if p:
                    commandlineargs.append(p)
        return " ".join(commandlineargs)
956166
private function buildCallsArguments()
    {
        if ($this->serviceConfig->keyExists('Calls')) {
            $calls = $this->serviceConfig->key('Calls');
            foreach ($calls as $callKey => $call) {
                if ($this->isArray($call[1])) {
                    $newArguments = [];
                    foreach ($call[1] as $arg) {
                        $newArguments[] = new Argument($arg);
                    }
                    $calls[$callKey][1] = $newArguments;
                }
            }
            $this->serviceConfig->key('Calls', $calls);
        }
    }
254595
def buildCommand(self,fileName,count,args):
        
        # Escape all placeholders in the file path:
	fileNameWithPath = self.escapePlaceholders(fileName)

        # The command is split into 'parts', which are separated by blank spaces:
        commandParts = args.command.split(' ')
        processedParts = []
        # Each part of the command is processed separately:
        for part in commandParts:
            processedParts.append(self.buildPart(part,fileNameWithPath,count,args))
        # The parts are put together at the end and the new command is returned:
        return self.unescapePlaceholders(' '.join(processedParts))
679494
def _expand_args(command):
    """"""

    # Prepare arguments.
    if isinstance(command, STR_TYPES):
        if sys.version_info[0] == 2:
            splitter = shlex.shlex(command.encode("utf-8"))
        elif sys.version_info[0] == 3:
            splitter = shlex.shlex(command)
        else:
            splitter = shlex.shlex(command.encode("utf-8"))
        splitter.whitespace = "|"
        splitter.whitespace_split = True
        command = []

        while True:
            token = splitter.get_token()
            if token:
                command.append(token)
            else:
                break

        command = list(map(shlex.split, command))

    return command
533578
def do_args(self, modargs, send, nick, target, source, name, msgtype):
        """"""
        realargs = {}
        args = {
            'nick': nick,
            'handler': self,
            'db': None,
            'config': self.config,
            'source': source,
            'name': name,
            'type': msgtype,
            'botnick': self.connection.real_nickname,
            'target': target if target[0] == "#" else "private",
            'do_kick': lambda target, nick, msg: self.do_kick(send, target, nick, msg),
            'is_admin': lambda nick: self.is_admin(send, nick),
            'abuse': lambda nick, limit, cmd: self.abusecheck(send, nick, target, limit, cmd)
        }
        for arg in modargs:
            if arg in args:
                realargs[arg] = args[arg]
            else:
                raise Exception("Invalid Argument: %s" % arg)
        return realargs
1054930
def _execute_command(self, command, *args):
        """"""
        try:
            command(*args)
        except libvirt.libvirtError as error:
            raise RuntimeError("Unable to execute command. %s" % error)
1271777
def _build_arguments(self):
        
        self._parser.add_argument(
            '--attach',
            type=bool,
            required=False,
            default=False,
            help="Attach to containers output?"
        )

        self._parser.add_argument(
            '--clean',
            type=bool,
            required=False,
            default=False,
            help="clean up everything that was created by freight forwarder at the end."
        )

        self._parser.add_argument(
            '--configs',
            type=bool,
            required=False,
            default=False,
            help="Would you like to inject configuration files?"
        )

        self._parser.add_argument(
            '-e', '--env',
            required=False,
            type=str,
            action='append',
            default=None,
            help='environment variables to create in the container at run time.'
        )

        self._parser.add_argument(
            '--test',
            type=bool,
            required=False,
            default=False,
            help="Run tests."
        )

        self._parser.add_argument(
            '--use-cache',
            required=False,
            action='store_true',
            default=False,
            help='Allow build to use cached image layers.'
        )
888951
public <K, V> void build(CommandArgs<K, V> args) {

        // PAUSE <queue-name> [option option ... option]

        if (bcast != null) {
            args.add(CommandKeyword.BCAST.getBytes());
        }

        if (state != null) {
            args.add(CommandKeyword.STATE.getBytes());
        }

        if (option != null) {
            args.add(option);
        }
    }
638124
def args(self, args):
        '''
        '''
        self._args = args
        self._logger.log('debug', 'Args set to {}'.format(args))
288024
def _build_arguments(self):
        
        self._parser.add_argument(
            '-a', '--alias',
            required=False,
            default='default',
            type=str,
            help='registry alias created in freight-forwarder.yml. Example: tune_dev'
        )
1188130
def command(self, *args, **kwargs):
        """"""
        if len(args) == 1 and isinstance(args[0], collections.Callable):
            return self._generate_command(args[0])
        else:
            def _command(func):
                return self._generate_command(func, *args, **kwargs)
            return _command
685454
def command_with_options(self):
        """"""
        if 'args' in self.config:
            return ' '.join((self.command, self.config['args']))
        return self.command
1151868
def build_command(self):
        ''''''
        # if defined in settings, run the function or return the string
        if self.options['command']:
            return self.options['command'](self) if callable(self.options['command']) else self.options['command']
        # build the default
        return self.build_default_command()
413093
def add_command(self, cmd_name, *args):
        """"""
        self.__commands.append(Command(cmd_name, args))
388213
def getArgs():
    """"""
    try:
        nb_to_launch = int(sys.argv[1])
    except:
        nb_to_launch = 0

    if nb_to_launch == 0:
        nb_to_launch = getCPUcount()

    try:
        verbosity = int(sys.argv[2])
    except:
        verbosity = 3

    return nb_to_launch, verbosity, sys.argv[3:]