class ThreeScaleToolbox::Commands::ServiceCommand::CopyCommand::CopyServiceProxyTask
Public Instance Methods
call()
click to toggle source
# File lib/3scale_toolbox/commands/service_command/copy_command/copy_service_proxy_task.rb, line 8 def call target.update_proxy target_proxy_attrs target.update_oidc source.oidc if source.attrs['backend_version'] == 'oidc' logger.info "updated proxy of #{target.id} to match the original" end
source_proxy()
click to toggle source
# File lib/3scale_toolbox/commands/service_command/copy_command/copy_service_proxy_task.rb, line 25 def source_proxy @source_proxy ||= source.proxy end
target_proxy_attrs()
click to toggle source
# File lib/3scale_toolbox/commands/service_command/copy_command/copy_service_proxy_task.rb, line 14 def target_proxy_attrs if source.attrs['deployment_option'] == 'hosted' # For services with "hosted" deployment config, # "Public Base URL" should not be copied, mainly because public base URL is self-assigned. # Two 3scale products (aka services) cannot be served using the same public base URL. source_proxy.dup.delete_if { |key, _v| %w[endpoint sandbox_endpoint].include? key } else source_proxy end end