Class: Nucleon::Action::Network::Inspect
- Inherits:
-
Object
- Object
- Nucleon::Action::Network::Inspect
- Defined in:
- lib/nucleon/action/network/inspect.rb
Class Method Summary collapse
-
.describe ⇒ Object
—————————————————————————– Info.
Instance Method Summary collapse
- #arguments ⇒ Object
-
#configure ⇒ Object
—————————————————————————– Settings.
-
#execute ⇒ Object
—————————————————————————– Operations.
-
#ignore ⇒ Object
—.
Class Method Details
.describe ⇒ Object
Info
10 11 12 |
# File 'lib/nucleon/action/network/inspect.rb', line 10 def self.describe super(:network, :inspect, 955) end |
Instance Method Details
#arguments ⇒ Object
32 33 34 |
# File 'lib/nucleon/action/network/inspect.rb', line 32 def arguments [ :elements ] end |
#configure ⇒ Object
Settings
17 18 19 20 21 22 23 24 |
# File 'lib/nucleon/action/network/inspect.rb', line 17 def configure super do codes :configuration_parse_failed register_array :elements register_translator :format, :json end end |
#execute ⇒ Object
Operations
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/nucleon/action/network/inspect.rb', line 39 def execute super do |node| ensure_network do if settings[:elements].empty? data = network.config.export else data = network.config.get(settings[:elements]) end if network.config.status == code.success render data, :format => settings[:format] else myself.status = code.configuration_parse_failed end end end end |
#ignore ⇒ Object
28 29 30 |
# File 'lib/nucleon/action/network/inspect.rb', line 28 def ignore node_ignore end |