Mentions légales du service

Skip to content
Snippets Groups Projects
Commit aaacc108 authored by JEANVOINE Emmanuel's avatar JEANVOINE Emmanuel
Browse files

[Kareboot] Updated kareboot according to the new environment API compliant with RFC3986

parent 252243b5
Branches
Tags
No related merge requests found
...@@ -132,13 +132,16 @@ class KarebootClient < ClientWorkflow ...@@ -132,13 +132,16 @@ class KarebootClient < ClientWorkflow
params[:check_destructive] = options[:check_demolishing] if options[:check_demolishing] params[:check_destructive] = options[:check_demolishing] if options[:check_demolishing]
if options[:env_name] if options[:env_name]
username = URI.encode_www_form_component(options[:env_user]) || '' username = URI.encode_www_form_component(options[:env_user])
envname = URI.encode_www_form_component(options[:env_name]) envname = URI.encode_www_form_component(options[:env_name])
envversion = options[:env_version] || '' envversion = options[:env_version]
tmp = {} tmp = {}
tmp[:last] = true unless options[:env_version] tmp[:last] = true unless options[:env_version]
envs = get2(options,api_path("/#{username}/#{envname}/#{envversion}",:envs),tmp) tmp[:username] = username if username && !username.empty?
tmp[:name] = envname if envname && !envname.empty?
tmp[:version] = envversion if envversion
envs = get2(options,api_path("/",:envs),tmp)
error("The environment '#{options[:env_name]}' does not exist") if envs.size <= 0 error("The environment '#{options[:env_name]}' does not exist") if envs.size <= 0
env = envs.first env = envs.first
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment