Class: UnimatrixCLI::Zephyrus::Routing::ConfigurationCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/unimatrix_cli/zephyrus/routing/configuration_command.rb

Instance Method Summary collapse

Methods inherited from Command

available_commands, descendants, #initialize, #read_file, #validate, #validate_collection, #write

Methods included from UnimatrixParser

included

Constructor Details

This class inherits a constructor from UnimatrixCLI::Command

Instance Method Details

#executeObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/unimatrix_cli/zephyrus/routing/configuration_command.rb', line 10

def execute
  response = routing_configuration_request
  if response[ 'outputs' ].nil?
    write( 
      message: "Configuration could not be found: #{ response.inspect }",
      error: true
    )
  else
    response[ 'outputs' ].each do | output | 
      write( message: parse_configuration_output( output ) )
    end
  end
end