Class: OpenPortChecker
- Defined in:
- lib/scripts/ec2/open_port_checker.rb
Overview
Identifies all server instances with their ports open and checks if there are instances where no service runs on that port. Port ranges are ignored.
Defined Under Namespace
Classes: AnalysisDone, Done, InitialState, InstancesRetrievedState, OpenPortCheckerState, SecurityGroupsRetrievedState
Constant Summary
Constants inherited from Ec2Script
Ec2Script::CS_AWS_TIMEOUT, Ec2Script::CS_SEC_GRP_DESC, Ec2Script::CS_SEC_GRP_NAME
Instance Method Summary collapse
- #check_input_parameters ⇒ Object
-
#initialize(input_params) ⇒ OpenPortChecker
constructor
Input parameters * ec2_api_handler => object that allows to access the EC2 API.
- #load_initial_state ⇒ Object
Methods inherited from Ec2Script
#get_execution_result, #post_message, #register_progress_message_listener, #register_state_change_listener, #start_script
Constructor Details
#initialize(input_params) ⇒ OpenPortChecker
Input parameters
-
ec2_api_handler => object that allows to access the EC2 API
16 17 18 |
# File 'lib/scripts/ec2/open_port_checker.rb', line 16 def initialize(input_params) super(input_params) end |
Instance Method Details
#check_input_parameters ⇒ Object
20 21 22 23 24 |
# File 'lib/scripts/ec2/open_port_checker.rb', line 20 def check_input_parameters() if @input_params[:ec2_api_handler] == nil raise Exception.new("no EC2 handler specified") end end |
#load_initial_state ⇒ Object
26 27 28 |
# File 'lib/scripts/ec2/open_port_checker.rb', line 26 def load_initial_state() OpenPortCheckerState.load_state(@input_params) end |