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=1465415
  • Loading branch information
gmcculloug authored and simaishi committed Jun 30, 2017
1 parent f159817 commit fa669b4
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 @@ -86,6 +86,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(template, options = {})
raw_update_stack(template, options)
end
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 fa669b4

Please sign in to comment.