Class: CloudSpec::AMZN::SecurityGroups
- Inherits:
-
Base
- Object
- Base
- CloudSpec::AMZN::SecurityGroups
show all
- Defined in:
- lib/cloudspec/amzn/security_groups.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#compute_client, #harvest, #initialize, #load_rules, #mock?, #process_account, #regions
Class Method Details
.include_rules ⇒ Object
4
5
6
7
|
# File 'lib/cloudspec/amzn/security_groups.rb', line 4
def self.include_rules
CloudSpec.log.debug 'including rules ...'
include ::AMZN::SecurityGroupRules
end
|
Instance Method Details
#evaluate_object(account_name, region, object) ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/cloudspec/amzn/security_groups.rb', line 15
def evaluate_object(account_name, region, object)
CloudSpec.log.debug "Evaluating object #{object.group_id} ..."
begin
evaluate(object)
rescue RSpec::Expectations::ExpectationNotMetError => e
CloudSpec.log.error "[#{account_name}][#{region}][#{object.group_id}] - " + e.to_s
end
end
|
#objects(credentials, region) ⇒ Object
9
10
11
12
13
|
# File 'lib/cloudspec/amzn/security_groups.rb', line 9
def objects(credentials, region)
CloudSpec.log.debug 'getting groups ...'
aws_client = compute_client(credentials, region)
aws_client.security_groups
end
|