Module: Bosh::AwsCloud::Helpers
- Included in:
- Cloud, InstanceManager, Network, NetworkConfigurator, ResourceWait, Stemcell, StemcellCreator
- Defined in:
- lib/cloud/aws/helpers.rb
Instance Method Summary collapse
-
#cloud_error(message) ⇒ Object
Raises CloudError exception.
- #extract_security_group_names(networks_spec) ⇒ Object
Instance Method Details
#cloud_error(message) ⇒ Object
Raises CloudError exception
10 11 12 13 14 15 |
# File 'lib/cloud/aws/helpers.rb', line 10 def cloud_error() if @logger @logger.error() end raise Bosh::Clouds::CloudError, end |
#extract_security_group_names(networks_spec) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cloud/aws/helpers.rb', line 17 def extract_security_group_names(networks_spec) networks_spec. values. select { |network_spec| network_spec.has_key? "cloud_properties" }. map { |network_spec| network_spec["cloud_properties"] }. select { |cloud_properties| cloud_properties.has_key? "security_groups" }. map { |cloud_properties| Array(cloud_properties["security_groups"]) }. flatten. sort. uniq end |