Skip to content

Commit

Permalink
Add orchestration stack my_zone.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaafitz committed Jun 8, 2017
1 parent bb12037 commit d8ef167
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/orchestration_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ def raw_update_stack(_template, _options = {})
raise NotImplementedError, _("raw_update_stack must be implemented in a subclass")
end

def my_zone
ext_management_system.try(:my_zone)
end

def update_stack_queue(userid, template, options = {})
task_opts = {
:action => "updating Orchestration Stack for user #{userid}",
Expand Down
11 changes: 11 additions & 0 deletions spec/models/service_orchestration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@
end
end

describe "#my_zone" do
it "takes the zone from ext_management_system" do
deployed_stack.ext_management_system = manager_by_setter
expect(deployed_stack.my_zone).to eq(manager_by_setter.my_zone)
end

it "returns nil if ext_management_system is not valid" do
expect(deployed_stack.my_zone).to eq(nil)
end
end

describe "#stack_options" do
before do
allow_any_instance_of(ManageIQ::Providers::Amazon::CloudManager::OrchestrationServiceOptionConverter).to(
Expand Down

0 comments on commit d8ef167

Please sign in to comment.