Class: Nucleon::Action::Cloud::Inspect
- Inherits:
-
Object
- Object
- Nucleon::Action::Cloud::Inspect
- Includes:
- Mixin::Action::Registration
- Defined in:
- lib/nucleon/action/cloud/inspect.rb
Class Method Summary collapse
-
.describe ⇒ Object
—————————————————————————– Info.
Instance Method Summary collapse
-
#arguments ⇒ Object
—.
-
#configure ⇒ Object
—————————————————————————– Settings.
-
#execute ⇒ Object
—————————————————————————– Operations.
Class Method Details
.describe ⇒ Object
Info
12 13 14 |
# File 'lib/nucleon/action/cloud/inspect.rb', line 12 def self.describe super(:cloud, :inspect, 950) end |
Instance Method Details
#arguments ⇒ Object
30 31 32 |
# File 'lib/nucleon/action/cloud/inspect.rb', line 30 def arguments [ :elements ] end |
#configure ⇒ Object
Settings
19 20 21 22 23 24 25 26 |
# File 'lib/nucleon/action/cloud/inspect.rb', line 19 def configure super do codes :configuration_parse_failed register_array :elements register_translator :format, :json end end |
#execute ⇒ Object
Operations
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/nucleon/action/cloud/inspect.rb', line 37 def execute super do |node, network| ensure_network(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 |