Class: MistApi::UtilsSendSupportLogs
- Defined in:
- lib/mist_api/models/utils_send_support_logs.rb
Overview
UtilsSendSupportLogs Model.
Instance Attribute Summary collapse
-
#info ⇒ UtilsSendSupportLogsInfoEnum
Optional, enum: * ‘code-dumps`: Upload all core dump files, if any found.
-
#node ⇒ String
optional: for SSR, if node is not present, both nodes support files are uploaded.
-
#num_messages_files ⇒ Integer
optional: number of most recent messages files to upload.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(info = UtilsSendSupportLogsInfoEnum::FULL, node = SKIP, num_messages_files = 1, additional_properties = nil) ⇒ UtilsSendSupportLogs
constructor
A new instance of UtilsSendSupportLogs.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(info = UtilsSendSupportLogsInfoEnum::FULL, node = SKIP, num_messages_files = 1, additional_properties = nil) ⇒ UtilsSendSupportLogs
Returns a new instance of UtilsSendSupportLogs.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 60 def initialize(info = UtilsSendSupportLogsInfoEnum::FULL, node = SKIP, = 1, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @info = info unless info == SKIP @node = node unless node == SKIP @num_messages_files = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#info ⇒ UtilsSendSupportLogsInfoEnum
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
26 27 28 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 26 def info @info end |
#node ⇒ String
optional: for SSR, if node is not present, both nodes support files are uploaded
31 32 33 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 31 def node @node end |
#num_messages_files ⇒ Integer
optional: number of most recent messages files to upload.
35 36 37 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 35 def @num_messages_files end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. info = hash['info'] ||= UtilsSendSupportLogsInfoEnum::FULL node = hash.key?('node') ? hash['node'] : SKIP = hash['num_messages_files'] ||= 1 # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. UtilsSendSupportLogs.new(info, node, , additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['info'] = 'info' @_hash['node'] = 'node' @_hash['num_messages_files'] = 'num_messages_files' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 53 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 47 def self.optionals %w[ info node num_messages_files ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
102 103 104 105 106 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 102 def inspect class_name = self.class.name.split('::').last "<#{class_name} info: #{@info.inspect}, node: #{@node.inspect}, num_messages_files:"\ " #{@num_messages_files.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
95 96 97 98 99 |
# File 'lib/mist_api/models/utils_send_support_logs.rb', line 95 def to_s class_name = self.class.name.split('::').last "<#{class_name} info: #{@info}, node: #{@node}, num_messages_files: #{@num_messages_files},"\ " additional_properties: #{@additional_properties}>" end |