diff --git a/lib/vmpooler/api/v1.rb b/lib/vmpooler/api/v1.rb index ad2f033cf..33a55fa47 100644 --- a/lib/vmpooler/api/v1.rb +++ b/lib/vmpooler/api/v1.rb @@ -295,8 +295,6 @@ def need_token! jdata.each do |key, val| result[key] ||= {} - result[key]['ok'] = true ## - val.to_i.times do |_i| vm = backend.spop('vmpooler__ready__' + key) @@ -320,8 +318,6 @@ def need_token! result[key] ||= {} - result[key]['ok'] = true ## - if result[key]['hostname'] result[key]['hostname'] = [result[key]['hostname']] unless result[key]['hostname'].is_a?(Array) result[key]['hostname'].push(vm) @@ -329,8 +325,6 @@ def need_token! result[key]['hostname'] = vm end else - result[key]['ok'] = false ## - status 503 result['ok'] = false end @@ -373,8 +367,6 @@ def need_token! params[:template].split('+').each do |template| result[template] ||= {} - result[template]['ok'] = true ## - vm = backend.spop('vmpooler__ready__' + template) unless vm.nil? @@ -404,8 +396,6 @@ def need_token! result[template]['hostname'] = vm end else - result[template]['ok'] = false ## - status 503 result['ok'] = false end diff --git a/spec/vmpooler/api/v1_spec.rb b/spec/vmpooler/api/v1_spec.rb index 4e6240dd6..5f7643a15 100644 --- a/spec/vmpooler/api/v1_spec.rb +++ b/spec/vmpooler/api/v1_spec.rb @@ -213,7 +213,6 @@ def app() expected = { ok: true, pool1: { - ok: true, hostname: 'abcdefghijklmnop' } } @@ -229,11 +228,9 @@ def app() expected = { ok: true, pool1: { - ok: true, hostname: 'abcdefghijklmnop' }, pool2: { - ok: true, hostname: 'qrstuvwxyz012345' } } @@ -256,7 +253,6 @@ def app() expected = { ok: true, pool1: { - ok: true, hostname: 'abcdefghijklmnop' } } @@ -280,7 +276,6 @@ def app() expected = { ok: true, pool1: { - ok: true, hostname: 'abcdefghijklmnop' } } @@ -298,7 +293,6 @@ def app() expected = { ok: true, pool1: { - ok: true, hostname: 'abcdefghijklmnop' } }