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

Remove tenant selection from base deployment options #18202

Merged
merged 1 commit into from
Nov 19, 2018
Merged
Show file tree
Hide file tree
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
16 changes: 1 addition & 15 deletions app/models/orchestration_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,6 @@ def parameter_groups
# Basic options for all templates, each subclass should add more type/provider specific deployment options
# Return array of OrchestrationParameters. (Deployment options are different from parameters, but they use same class)
def deployment_options(_manager_class = nil)
tenant_opt = OrchestrationTemplate::OrchestrationParameter.new(
:name => "tenant_name",
:label => "Tenant",
:data_type => "string",
:description => "Tenant where the stack will be deployed",
:required => true,
:reconfigurable => false,
:constraints => [
OrchestrationTemplate::OrchestrationParameterAllowedDynamic.new(
:fqname => "/Cloud/Orchestration/Operations/Methods/Available_Tenants"
)
]
)

stack_name_opt = OrchestrationTemplate::OrchestrationParameter.new(
:name => "stack_name",
:label => "Stack Name",
Expand All @@ -130,7 +116,7 @@ def deployment_options(_manager_class = nil)
)
]
)
[tenant_opt, stack_name_opt]
[stack_name_opt]
end

# List managers that may be able to deploy this template
Expand Down
3 changes: 1 addition & 2 deletions spec/models/orchestration_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@
describe "#deployment_options" do
it do
options = subject.deployment_options
assert_deployment_option(options[0], "tenant_name", :OrchestrationParameterAllowedDynamic, true)
assert_deployment_option(options[1], "stack_name", :OrchestrationParameterPattern, true)
assert_deployment_option(options[0], "stack_name", :OrchestrationParameterPattern, true)
end
end

Expand Down