Skip to content

Commit

Permalink
add clusters_credentials method
Browse files Browse the repository at this point in the history
  • Loading branch information
pyeremenko committed Aug 13, 2015
1 parent bab0021 commit 4ebe2f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/iron_worker_ng/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ def clusters_get(cluster_id)
parse_response(get("clusters/#{cluster_id}"))
end

def clusters_credentials(cluster_id)
parse_response(get("clusters/#{cluster_id}/credentials"))
end

def clusters_create(options = {})
parse_response(post("clusters", options))
end
Expand Down
7 changes: 7 additions & 0 deletions lib/iron_worker_ng/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,13 @@ def clusters_get(id)
OpenStruct.new(res)
end

def clusters_credentials(id)
IronCore::Logger.debug 'IronWorkerNG', "Calling projects.get"
res = @api.clusters_credentials(id)['cluster']
res['_id'] = res['id']
OpenStruct.new(res)
end

def clusters_create(params = {})
IronCore::Logger.debug 'IronWorkerNG', "Calling clusters.create with params='#{params.to_s}'"
res = @api.clusters_create(params)
Expand Down

0 comments on commit 4ebe2f8

Please sign in to comment.