Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports label mapping in cloud manager #669

Merged
merged 1 commit into from
Nov 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/models/manageiq/providers/amazon/cloud_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class ManageIQ::Providers::Amazon::CloudManager < ManageIQ::Providers::CloudMana
supports :regions
supports :assume_role
supports :auth_key_pair_create
supports :label_mapping

def ensure_managers
build_network_manager unless network_manager
Expand Down Expand Up @@ -286,4 +287,17 @@ def orchestration_template_validate(template)
def self.display_name(number = 1)
n_('Cloud Provider (Amazon)', 'Cloud Providers (Amazon)', number)
end

LABEL_MAPPING_ENTITIES = {
"Vm" => "ManageIQ::Providers::Amazon::CloudManager::Vm",
"Image" => "ManageIQ::Providers::Amazon::CloudManager::Template"
}.freeze

def self.entities_for_label_mapping
LABEL_MAPPING_ENTITIES
end

def self.label_mapping_prefix
"amazon"
end
end