Skip to content

Commit

Permalink
Merge pull request #15334 from tinaafitz/orchestration_stack_add_zone
Browse files Browse the repository at this point in the history
Add orchestration stack my_zone.
(cherry picked from commit 8e6d2fb)

https://bugzilla.redhat.com/show_bug.cgi?id=1461143
  • Loading branch information
gmcculloug authored and simaishi committed Jun 13, 2017
1 parent 31403de commit 52bbd3f
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
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
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 52bbd3f

Please sign in to comment.