summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/license_endpoint.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-07-29 17:00:49 +0100
committerThom May <thom@may.lt>2016-07-29 17:00:49 +0100
commite257f450c044616fefbd15e9a180387aaaa572a1 (patch)
tree6a148967013485078af6601546bdb7b61c623f3c /lib/chef_zero/endpoints/license_endpoint.rb
parent4c86d798010b73c76c916e601ff48c24ffb65dd6 (diff)
downloadchef-zero-tm/style.tar.gz
ChefStyletm/style
Signed-off-by: Thom May <thom@may.lt>
Diffstat (limited to 'lib/chef_zero/endpoints/license_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/license_endpoint.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef_zero/endpoints/license_endpoint.rb b/lib/chef_zero/endpoints/license_endpoint.rb
index 8638875..ec85834 100644
--- a/lib/chef_zero/endpoints/license_endpoint.rb
+++ b/lib/chef_zero/endpoints/license_endpoint.rb
@@ -1,5 +1,5 @@
-require 'ffi_yajl'
-require 'chef_zero/rest_base'
+require "ffi_yajl"
+require "chef_zero/rest_base"
module ChefZero
module Endpoints
@@ -9,15 +9,15 @@ module ChefZero
def get(request)
node_count = 0
- list_data(request, [ 'organizations' ]).each do |orgname|
- node_count += list_data(request, [ 'organizations', orgname, 'nodes' ]).size
+ list_data(request, [ "organizations" ]).each do |orgname|
+ node_count += list_data(request, [ "organizations", orgname, "nodes" ]).size
end
json_response(200, {
"limit_exceeded" => (node_count > MAX_NODE_COUNT) ? true : false,
"node_license" => MAX_NODE_COUNT,
"node_count" => node_count,
- "upgrade_url" => 'http://blah.com'
+ "upgrade_url" => "http://blah.com",
})
end
end