Class: MistApi::UtilsSendSupportLogsInfoEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/mist_api/models/utils_send_support_logs_info_enum.rb

Overview

Optional, enum: * ‘code-dumps`: Upload all core dump files, if any found. Uploads for all members of VC on switches. * `full`: Upload 1 file with output of `request support information`, 1 file that concatenates all `/var/log/outbound-ssh.log*` files, all core dump files, the 5 most recent `/var/log/messages*` files, and Mist agent logs * `messages`: Upload 1 to 10 `/var/log/messages*` files * `outbound-ssh`: Upload 1 file that concatenates all `/var/log/outbound-ssh.log*` files * `process`: Upload 1 file with output of show `system processes extensive“

* `var-logs`: Upload all non-empty files in the `/var/log/` directory

Constant Summary collapse

UTILS_SEND_SUPPORT_LOGS_INFO_ENUM =
[
  # TODO: Write general description for CODEDUMPS
  CODEDUMPS = 'code-dumps'.freeze,

  # TODO: Write general description for FULL
  FULL = 'full'.freeze,

  # TODO: Write general description for MESSAGES
  MESSAGES = 'messages'.freeze,

  # TODO: Write general description for OUTBOUNDSSH
  OUTBOUNDSSH = 'outbound-ssh'.freeze,

  # TODO: Write general description for PROCESS
  PROCESS = 'process'.freeze,

  # TODO: Write general description for VARLOGS
  VARLOGS = 'var-logs'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = CODEDUMPS) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/mist_api/models/utils_send_support_logs_info_enum.rb', line 43

def self.from_value(value, default_value = CODEDUMPS)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'codedumps' then CODEDUMPS
  when 'full' then FULL
  when 'messages' then MESSAGES
  when 'outboundssh' then OUTBOUNDSSH
  when 'process' then PROCESS
  when 'varlogs' then VARLOGS
  else
    default_value
  end
end

.validate(value) ⇒ Object



37
38
39
40
41
# File 'lib/mist_api/models/utils_send_support_logs_info_enum.rb', line 37

def self.validate(value)
  return false if value.nil?

  UTILS_SEND_SUPPORT_LOGS_INFO_ENUM.include?(value)
end