Module Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias identifier ImportFrom alias alias ImportFrom alias alias alias alias alias alias alias Import alias identifier Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr IfExp CompareIs NameLoad NameLoad Dict NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If BoolOpAnd CompareIn NameLoad AttributeLoad NameLoad attr CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str orelse If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str orelse If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Dict Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Raise Call NameLoad BinOpAdd Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str NameLoad body With Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body Expr Call NameLoad Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad Expr Call NameLoad Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Raise Call NameLoad BinOpAdd Str NameLoad Assign NameStore NameLoad If CompareIn Str NameLoad body Assign NameStore NameLoad If CompareNotIn Str NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Str NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore NameLoad handlers ExceptHandler body Raise Call NameLoad BinOpAdd Str NameLoad orelse Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Str NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler body Raise Call NameLoad BinOpAdd Str NameLoad Assign NameStore NameLoad TryFinally body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad With Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler body Raise Call NameLoad BinOpAdd Str NameLoad finalbody Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpOr Call AttributeLoad NameLoad attr Str NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad body If NameLoad body Expr Call NameLoad Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad NameLoad Call AttributeLoad Str attr NameLoad orelse If NameLoad body Expr Call NameLoad Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad NameLoad Call AttributeLoad Str attr NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Raise Call NameLoad BinOpAdd NameLoad Str Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad keyword Call AttributeLoad Str attr NameLoad keyword NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad If CompareIsNot Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Raise Call NameLoad BinOpAdd Str NameLoad Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Dict With Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body Expr Call NameLoad NameLoad NameLoad keyword Str keyword NameLoad keyword Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad If CompareIs AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad body Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Raise Call NameLoad Call AttributeLoad Str attr NameLoad If Call AttributeLoad NameLoad attr Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Dict If CompareIsNot NameLoad NameLoad body Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr With Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body Expr Call NameLoad Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad NameLoad keyword Call AttributeLoad Str attr NameLoad keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str ListLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str ListLoad If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body For NameStore NameLoad body Expr Call NameLoad Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Num If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr orelse Return AttributeLoad NameLoad attr If CompareIs AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad body Return AttributeLoad NameLoad attr If CompareIsNot AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad body With Call NameLoad NameLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr orelse If CompareIn Str Call AttributeLoad NameLoad attr body With Call NameLoad NameLoad SubscriptLoad NameLoad Index Str keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr If CompareIsNot AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Dict With Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call NameLoad NameLoad NameLoad keyword Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad While CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Return NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Return AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Raise Call NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr Str NameLoad body For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A logging N/A os N/A tarfile N/A time N/A zipfile N/A urllib subprocess call N/A zopkio.constants constants zopkio.deployer Deployer Process zopkio.remote_host_helper better_exec_command DeploymentError get_sftp_client get_ssh_client open_remote_file log_output exec_with_env N/A zopkio.runtime runtime N/A logger N/A N/A logging getLogger __name__ SSHDeployer N/A Deployer N/A N/A 
  A simple deployer that copies an executable to the remote host and runs it
   __init__ N/A N/A self service_name configs N/A None N/A N/A 
    Creates a new SSHDeployer, typical use case is to create one deployer per service. The functions of the
    deployer are driven by configs. The configs can be set in the constructor as defaults and subsequently overridden
    during each invocation. The following configs are currently supported
      additional_directories: used during uninstall to remove additional directories see directories_to_clean
      args: used during start to give args to the start command
      delay: used during start or stop to add a delay before returning in order to allow the service time to start up
      directories_to_clean: used during uninstall to removed additional directories
      env: used during install/start/stop/get_pid to run custom commands with the specified environment
      executable: the executable that defines this service
      extract: used during install to now if the executable should be extracted
      hostname: used during each function to specify the host to execute it on,
       should be passed per call rather than set by default
      install_path: the path to install the executable
      no_copy: used during install to skip the installation step if the executable has already been copied
      pid_command: used during get_pid if this is specified than the command will be used to determine the pid of the executable
        use this or pid_file or pid_keyword
      pid_file: used during get_pid if this is specified than the file will be read to determine the pid of the executable
        use this or pid_command or pid_keyword
      pid_keyword: used during get_pid if this is specified than the keyword will be used with pgrep to determine the pid of the executable
        use this or pid_command or pid_file
      post_install_cmds: used during install to run custom commands prior to running start
      start_command: used during start, the command to start the service
      stop_command: used during stop, the command to stop the service
      sync: used during start, whether the start command is synchronous or not (Default not)
      terminate_only: used during stop to terminate the process rather than using the stop command
    :param service_name: an arbitrary name that can be used to describe the executable
    :param configs: default configurations for the other methods
    :return:
     N/A N/A N/A N/A N/A logging getLogger paramiko setLevel N/A logging ERROR N/A N/A self service_name service_name N/A N/A self default_configs N/A N/A configs None N/A configs N/A N/A N/A Deployer __init__ self N/A install N/A N/A self unique_id configs N/A None N/A N/A 
    Copies the executable to the remote machine under install path. Inspects the configs for the possible keys
    'hostname': the host to install on
    'install_path': the location on the remote host
    'executable': the executable to copy
    'no_copy': if this config is passed in and true then this method will not copy the executable assuming that it is
    already installed
    'post_install_cmds': an optional list of commands that should be executed on the remote machine after the
     executable has been installed. If no_copy is set to true, then the post install commands will not be run.

    If the unique_id is already installed on a different host, this will perform the cleanup action first.
    If either 'install_path' or 'executable' are provided the new value will become the default.

    :param unique_id:
    :param configs:
    :return:
     N/A N/A configs None N/A N/A configs N/A N/A tmp N/A N/A N/A self default_configs copy N/A N/A N/A tmp update configs N/A configs tmp N/A hostname None N/A is_tarfile False N/A is_zipfile False N/A N/A N/A unique_id N/A self processes N/A hostname configs N/A N/A N/A N/A self uninstall unique_id configs N/A hostname N/A configs N/A hostname N/A N/A N/A hostname configs N/A N/A hostname N/A configs N/A hostname N/A N/A N/A unique_id N/A self processes N/A N/A N/A DeploymentError N/A hostname was not provided for unique_id:  unique_id N/A env N/A N/A configs get env N/A N/A install_path N/A N/A N/A configs get install_path N/A N/A N/A self default_configs get install_path N/A pid_file N/A N/A N/A configs get pid_file N/A N/A N/A self default_configs get pid_file N/A N/A install_path None N/A N/A N/A N/A logger error N/A install_path was not provided for unique_id:  unique_id N/A N/A DeploymentError N/A install_path was not provided for unique_id:  unique_id N/A N/A N/A N/A configs get no_copy False N/A N/A N/A get_ssh_client hostname username N/A N/A runtime get_username password N/A N/A runtime get_password ssh N/A N/A N/A log_output N/A better_exec_command ssh N/A N/A mkdir -p {0} format install_path N/A N/A Failed to create path {0} format install_path N/A N/A log_output N/A better_exec_command ssh N/A N/A chmod 755 {0} format install_path N/A N/A Failed to make path {0} writeable format install_path N/A executable N/A N/A N/A configs get executable N/A N/A N/A self default_configs get executable N/A N/A executable None N/A N/A N/A N/A logger error N/A executable was not provided for unique_id:  unique_id N/A N/A DeploymentError N/A executable was not provided for unique_id:  unique_id N/A copy_from_remote_location False N/A N/A : executable N/A N/A copy_from_remote_location True N/A N/A http executable N/A N/A remote_location_server N/A N/A N/A executable split : N/A 0 N/A remote_file_path N/A N/A N/A executable split : N/A 1 N/A remote_file_name N/A N/A N/A os path basename remote_file_path N/A local_temp_file_name N/A N/A N/A os path join N/A N/A configs get tmp_dir /tmp remote_file_name N/A N/A N/A N/A N/A os path exists local_temp_file_name N/A N/A N/A get_sftp_client remote_location_server username N/A N/A runtime get_username password N/A N/A runtime get_password ftp N/A N/A N/A N/A N/A N/A ftp get remote_file_path local_temp_file_name N/A executable local_temp_file_name N/A N/A N/A N/A N/A DeploymentError N/A Unable to load file from remote server  executable N/A N/A remote_file_name N/A N/A N/A executable split / N/A -1 N/A local_temp_file_name N/A N/A N/A os path join N/A N/A configs get tmp_dir /tmp remote_file_name N/A N/A N/A N/A N/A os path exists local_temp_file_name N/A N/A N/A N/A N/A N/A urllib urlretrieve executable local_temp_file_name N/A N/A N/A N/A N/A DeploymentError N/A Unable to load file from remote server  executable N/A executable local_temp_file_name N/A N/A N/A N/A N/A exec_name N/A N/A N/A os path basename executable N/A install_location N/A N/A N/A os path join install_path exec_name N/A N/A get_sftp_client hostname username N/A N/A runtime get_username password N/A N/A runtime get_password ftp N/A N/A N/A N/A ftp put executable install_location N/A N/A N/A N/A N/A DeploymentError N/A Unable to copy executable to install_location: install_location N/A N/A is_tarfile N/A N/A tarfile is_tarfile executable N/A is_zipfile N/A N/A zipfile is_zipfile executable N/A N/A copy_from_remote_location N/A N/A N/A configs get cache False N/A N/A N/A N/A os remove executable N/A N/A N/A N/A configs get extract False N/A N/A N/A self default_configs get extract False N/A N/A is_tarfile N/A N/A N/A log_output N/A better_exec_command ssh N/A N/A tar -xf {0} -C {1} format install_location install_path N/A N/A Failed to extract tarfile {0} format exec_name N/A N/A is_zipfile N/A N/A N/A log_output N/A better_exec_command ssh N/A N/A unzip -o {0} -d {1} format install_location install_path N/A N/A Failed to extract zipfile {0} format exec_name N/A N/A N/A N/A logger error N/A executable  is not a supported filetype for extracting N/A N/A DeploymentError N/A executable  is not a supported filetype for extracting N/A post_install_cmds N/A N/A N/A configs get post_install_cmds False N/A N/A N/A self default_configs get post_install_cmds N/A N/A cmd post_install_cmds N/A N/A relative_cmd N/A N/A cd {0}; {1} format install_path cmd N/A N/A log_output N/A exec_with_env ssh relative_cmd msg N/A N/A Failed to execute post install command: {0} format relative_cmd env env N/A N/A N/A self processes N/A unique_id N/A Process unique_id N/A self service_name hostname install_path N/A N/A N/A N/A self processes N/A unique_id pid_file pid_file N/A start N/A N/A self unique_id configs N/A None N/A N/A 
    Start the service.  If `unique_id` has already been installed the deployer will start the service on that host.
    Otherwise this will call install with the configs. Within the context of this function, only four configs are
    considered
    'start_command': the command to run (if provided will replace the default)
    'args': a list of args that can be passed to the command
    'sync': if the command is synchronous or asynchronous defaults to asynchronous
    'delay': a delay in seconds that might be needed regardless of whether the command returns before the service can
    be started

    :param unique_id:
    :param configs:
    :return: if the command is executed synchronously return the underlying paramiko channel which can be used to get the stdout
    otherwise return the triple stdin, stdout, stderr
     N/A N/A configs None N/A N/A configs N/A N/A tmp N/A N/A N/A self default_configs copy N/A N/A N/A tmp update configs N/A configs tmp N/A N/A N/A logger debug N/A starting  unique_id N/A N/A N/A N/A self get_pid unique_id configs N/A constants PROCESS_NOT_RUNNING_PID N/A N/A None N/A N/A unique_id N/A self processes N/A N/A N/A N/A self install unique_id configs N/A hostname N/A N/A N/A self processes N/A unique_id hostname N/A install_path N/A N/A N/A self processes N/A unique_id install_path N/A start_command N/A N/A N/A configs get start_command N/A N/A N/A self processes N/A unique_id start_command N/A N/A N/A self default_configs get start_command N/A pid_file N/A N/A N/A configs get pid_file N/A N/A N/A self default_configs get pid_file N/A N/A start_command None N/A N/A N/A N/A logger error N/A start_command was not provided for unique_id:  unique_id N/A N/A DeploymentError N/A start_command was not provided for unique_id:  unique_id N/A args N/A N/A N/A configs get args N/A N/A N/A self processes N/A unique_id args N/A N/A N/A self default_configs get args N/A N/A args None N/A N/A full_start_command N/A N/A {0} {1} format start_command N/A N/A join args N/A N/A full_start_command start_command N/A command N/A N/A cd {0}; {1} format install_path full_start_command N/A env N/A N/A configs get env N/A N/A N/A get_ssh_client hostname username N/A N/A runtime get_username password N/A N/A runtime get_password ssh N/A N/A N/A exec_with_env ssh command msg Failed to start env env sync N/A N/A configs get sync False N/A N/A N/A N/A self processes N/A unique_id start_command start_command N/A N/A N/A N/A self processes N/A unique_id args args N/A N/A N/A N/A N/A self processes N/A unique_id pid_file None N/A N/A N/A N/A N/A self processes N/A unique_id pid_file pid_file N/A N/A delay configs N/A N/A N/A N/A time sleep N/A configs N/A delay N/A stop N/A N/A self unique_id configs N/A None N/A N/A Stop the service.  If the deployer has not started a service with`unique_id` the deployer will raise an Exception
    There are two configs that will be considered:
    'terminate_only': if this config is passed in then this method is the same as terminate(unique_id) (this is also the
    behavior if stop_command is None and not overridden)
    'stop_command': overrides the default stop_command

    :param unique_id:
    :param configs:
    :return:
     N/A N/A configs None N/A N/A configs N/A N/A tmp N/A N/A N/A self default_configs copy N/A N/A N/A tmp update configs N/A configs tmp N/A N/A N/A logger debug N/A stopping  unique_id N/A N/A unique_id N/A self processes N/A N/A hostname N/A N/A N/A self processes N/A unique_id hostname N/A N/A N/A N/A logger error N/A N/A Can't stop {0}: process not known format unique_id N/A N/A DeploymentError N/A N/A Can't stop {0}: process not known format unique_id N/A N/A N/A configs get terminate_only False N/A N/A N/A N/A self terminate unique_id configs N/A N/A stop_command N/A N/A N/A configs get stop_command N/A N/A N/A self default_configs get stop_command N/A env N/A N/A configs get env N/A N/A N/A stop_command None N/A N/A install_path N/A N/A N/A self processes N/A unique_id install_path N/A N/A get_ssh_client hostname username N/A N/A runtime get_username password N/A N/A runtime get_password ssh N/A N/A N/A log_output N/A exec_with_env ssh N/A N/A cd {0}; {1} format install_path stop_command msg N/A N/A Failed to stop {0} format unique_id env env N/A N/A N/A N/A self terminate unique_id configs N/A N/A delay configs N/A N/A N/A N/A time sleep N/A configs N/A delay N/A uninstall N/A N/A self unique_id configs N/A None N/A N/A uninstall the service.  If the deployer has not started a service with
    `unique_id` this will raise a DeploymentError.  This considers one config:
    'additional_directories': a list of directories to remove in addition to those provided in the constructor plus
     the install path. This will update the directories to remove but does not override it
    :param unique_id:
    :param configs:
    :return:
     N/A N/A configs None N/A N/A configs N/A N/A tmp N/A N/A N/A self default_configs copy N/A N/A N/A tmp update configs N/A configs tmp N/A N/A unique_id N/A self processes N/A N/A hostname N/A N/A N/A self processes N/A unique_id hostname N/A N/A N/A N/A logger error N/A N/A Can't uninstall {0}: process not known format unique_id N/A N/A DeploymentError N/A N/A Can't uninstall {0}: process not known format unique_id N/A install_path N/A N/A N/A self processes N/A unique_id install_path N/A directories_to_remove N/A N/A N/A self default_configs get directories_to_clean N/A N/A N/A N/A directories_to_remove extend N/A N/A configs get additional_directories N/A N/A N/A install_path directories_to_remove N/A N/A N/A N/A directories_to_remove append install_path N/A N/A get_ssh_client hostname username N/A N/A runtime get_username password N/A N/A runtime get_password ssh N/A N/A directory_to_remove directories_to_remove N/A N/A N/A log_output N/A better_exec_command ssh N/A N/A rm -rf {0} format directory_to_remove N/A N/A Failed to remove {0} format directory_to_remove N/A get_pid N/A N/A self unique_id configs N/A None N/A N/A Gets the pid of the process with `unique_id`.  If the deployer does not know of a process
    with `unique_id` then it should return a value of constants.PROCESS_NOT_RUNNING_PID
     N/A RECV_BLOCK_SIZE 16 N/A N/A configs None N/A N/A configs N/A N/A tmp N/A N/A N/A self default_configs copy N/A N/A N/A tmp update configs N/A configs tmp N/A N/A unique_id N/A self processes N/A N/A hostname N/A N/A N/A self processes N/A unique_id hostname N/A N/A N/A constants PROCESS_NOT_RUNNING_PID N/A N/A N/A N/A N/A self processes N/A unique_id start_command None N/A N/A N/A constants PROCESS_NOT_RUNNING_PID N/A N/A N/A N/A N/A self processes N/A unique_id pid_file None N/A N/A N/A open_remote_file hostname N/A N/A N/A self processes N/A unique_id pid_file username N/A N/A runtime get_username password N/A N/A runtime get_password pid_file N/A N/A full_output N/A N/A pid_file read N/A N/A N/A pid_file N/A N/A configs keys N/A N/A N/A open_remote_file hostname N/A configs N/A pid_file username N/A N/A runtime get_username password N/A N/A runtime get_password pid_file N/A N/A full_output N/A N/A pid_file read N/A N/A pid_keyword N/A N/A N/A self processes N/A unique_id start_command N/A N/A N/A N/A N/A self processes N/A unique_id args None N/A N/A pid_keyword N/A N/A {0} {1} format pid_keyword N/A N/A join N/A N/A N/A self processes N/A unique_id args N/A pid_keyword N/A N/A configs get pid_keyword pid_keyword N/A pid_command N/A N/A ps aux | grep '{0}' | grep -v grep | tr -s ' ' | cut -d ' ' -f 2 | grep -Eo '[0-9]+' format pid_keyword N/A pid_command N/A N/A configs get pid_command pid_command N/A non_failing_command N/A N/A {0}; if [ $? -le 1 ]; then true;  else false; fi; format pid_command N/A env N/A N/A configs get env N/A N/A N/A get_ssh_client hostname username N/A N/A runtime get_username password N/A N/A runtime get_password ssh N/A N/A chan N/A exec_with_env ssh non_failing_command msg Failed to get PID env env N/A output N/A N/A chan recv RECV_BLOCK_SIZE N/A full_output output N/A N/A N/A len output 0 N/A N/A output N/A N/A chan recv RECV_BLOCK_SIZE N/A full_output output N/A N/A N/A len full_output 0 N/A N/A pids N/A N/A int pid_str N/A pid_str N/A N/A full_output split N/A N/A pid_str isdigit N/A N/A N/A len pids 0 N/A N/A pids N/A N/A constants PROCESS_NOT_RUNNING_PID N/A get_host N/A N/A self unique_id N/A N/A N/A Gets the host of the process with `unique_id`.  If the deployer does not know of a process
    with `unique_id` then it should return a value of SOME_SENTINAL_VALUE

    :Parameter unique_id: the name of the process
    :raises NameError if the name is not  valid process
     N/A N/A unique_id N/A self processes N/A N/A N/A N/A N/A self processes N/A unique_id hostname N/A N/A N/A logger error N/A N/A {0} not a known process format unique_id N/A N/A NameError N/A N/A {0} not a known process format unique_id N/A get_processes N/A N/A self N/A N/A N/A  Gets all processes that have been started by this deployer

    :Returns: A list of Processes
     N/A N/A N/A N/A self processes values N/A kill_all_process N/A N/A self N/A N/A N/A  Terminates all the running processes. By default it is set to false.
    Users can set to true in config once the method to get_pid is done deterministically
    either using pid_file or an accurate keyword

     N/A N/A N/A runtime get_active_config cleanup_pending_process False N/A N/A process N/A N/A self get_processes N/A N/A N/A N/A self terminate N/A process unique_id N/A N/A