Class: PortRangeDetector

Inherits:
Ec2Script show all
Defined in:
lib/scripts/ec2/port_range_detector.rb

Overview

Checks for all security groups of a region if no port ranges are defined.

Defined Under Namespace

Classes: Done, InitialState, PortRangeDetectorState, SecurityGroupsAnalysed, SecurityGroupsRetrieved

Constant Summary

Constants inherited from Ec2Script

Ec2Script::CS_AWS_TIMEOUT, Ec2Script::CS_SEC_GRP_DESC, Ec2Script::CS_SEC_GRP_NAME

Instance Method Summary collapse

Methods inherited from Ec2Script

#get_execution_result, #post_message, #register_progress_message_listener, #register_state_change_listener, #start_script

Constructor Details

#initialize(input_params) ⇒ PortRangeDetector

Input parameters

  • ec2_api_handler => object that allows to access the EC2 API



14
15
16
# File 'lib/scripts/ec2/port_range_detector.rb', line 14

def initialize(input_params)
  super(input_params)
end

Instance Method Details

#check_input_parametersObject



18
19
20
21
22
# File 'lib/scripts/ec2/port_range_detector.rb', line 18

def check_input_parameters()
  if @input_params[:ec2_api_handler] == nil
    raise Exception.new("no EC2 handler specified")
  end
end

#load_initial_stateObject



24
25
26
# File 'lib/scripts/ec2/port_range_detector.rb', line 24

def load_initial_state()
  PortRangeDetectorState.load_state(@input_params)
end