Class: Cloudkeeper::Aws::FilterHelper
- Inherits:
-
Object
- Object
- Cloudkeeper::Aws::FilterHelper
- Defined in:
- lib/cloudkeeper/aws/filter_helper.rb
Overview
Class used for generating filter structures used by AWS .describe_tags
Constant Summary collapse
- TAG_APPLIANCE_IMAGE_LIST_IDENTIFIER =
'cloudkeeper_appliance_image_list_identifier'.freeze
- TAG_APPLIANCE_IDENTIFIER =
'cloudkeeper_appliance_identifier'.freeze
- TAG_CLOUDKEEPER_IDENTIFIER =
'cloudkeeper_identifier'.freeze
Class Method Summary collapse
- .all_image_lists ⇒ Object
- .appliance(identifier) ⇒ Object
- .cloudkeeper_instance ⇒ Object
- .image(image_id) ⇒ Object
- .image_list(image_list_identifier) ⇒ Object
Class Method Details
.all_image_lists ⇒ Object
9 10 11 |
# File 'lib/cloudkeeper/aws/filter_helper.rb', line 9 def self.all_image_lists [{ name: 'tag-key', values: [TAG_APPLIANCE_IMAGE_LIST_IDENTIFIER] }] + cloudkeeper_instance end |
.appliance(identifier) ⇒ Object
18 19 20 21 |
# File 'lib/cloudkeeper/aws/filter_helper.rb', line 18 def self.appliance(identifier) [{ name: "tag:#{TAG_APPLIANCE_IDENTIFIER}", values: [identifier] }] + cloudkeeper_instance end |
.cloudkeeper_instance ⇒ Object
27 28 29 30 |
# File 'lib/cloudkeeper/aws/filter_helper.rb', line 27 def self.cloudkeeper_instance [{ name: "tag:#{TAG_CLOUDKEEPER_IDENTIFIER}", values: [Cloudkeeper::Aws::Settings['identifier']] }] end |
.image(image_id) ⇒ Object
23 24 25 |
# File 'lib/cloudkeeper/aws/filter_helper.rb', line 23 def self.image(image_id) [{ name: 'image-id', values: [image_id] }] + cloudkeeper_instance end |
.image_list(image_list_identifier) ⇒ Object
13 14 15 16 |
# File 'lib/cloudkeeper/aws/filter_helper.rb', line 13 def self.image_list(image_list_identifier) [{ name: "tag:#{TAG_APPLIANCE_IMAGE_LIST_IDENTIFIER}", values: [image_list_identifier] }] + cloudkeeper_instance end |