Module: TrainPlugins::Juniper::Constants

Defined in:
lib/train-juniper/constants.rb

Overview

Common constants used across the plugin

Constant Summary collapse

DEFAULT_SSH_PORT =

SSH Configuration

Returns:

  • (Integer)

    Default SSH port

22
PORT_RANGE =

Returns Valid port range for SSH connections.

Returns:

  • (Range)

    Valid port range for SSH connections

(1..65_535)
SSH_KEEPALIVE_INTERVAL =

Returns SSH keepalive interval in seconds.

Returns:

  • (Integer)

    SSH keepalive interval in seconds

60
SSH_KEEPALIVE_MAX_COUNT =

Returns Maximum keepalive count before disconnect.

Returns:

  • (Integer)

    Maximum keepalive count before disconnect

3
DEFAULT_LOG_LEVEL =

Logging Configuration

Returns:

  • (Integer)

    Default log level

Logger::WARN
STANDARD_SSH_OPTIONS =

Standard SSH Options for network devices

{
  'UserKnownHostsFile' => '/dev/null',
  'StrictHostKeyChecking' => 'no',
  'LogLevel' => 'ERROR',
  'ForwardAgent' => 'no'
}.freeze
CLI_PROMPT =

JunOS CLI Prompt Patterns

Returns:

  • (Regexp)

    Pattern matching JunOS CLI prompts

/[%>$#]\s*$/
CONFIG_PROMPT =

Returns Pattern matching JunOS configuration mode prompts.

Returns:

  • (Regexp)

    Pattern matching JunOS configuration mode prompts

/[%#]\s*$/
CONFIG_PATH_PATTERN =

File Path Patterns

Returns:

  • (Regexp)

    Pattern for configuration file paths

%r{/config/(.*)}
OPERATIONAL_PATH_PATTERN =

Returns Pattern for operational data paths.

Returns:

  • (Regexp)

    Pattern for operational data paths

%r{/operational/(.*)}
UPLOAD_NOT_SUPPORTED =

Error Messages

Returns:

  • (String)

    Error message for unsupported upload operations

'File operations not supported for Juniper devices - use command-based configuration'
DOWNLOAD_NOT_SUPPORTED =

Returns Error message for unsupported download operations.

Returns:

  • (String)

    Error message for unsupported download operations

'File operations not supported for Juniper devices - use run_command() to retrieve data'