1 class Arvados::V1::VirtualMachinesController < ApplicationController
2 before_filter :admin_required, :only => :get_all_logins
5 User.includes(:authorized_keys).all.each do |u|
9 @vms = VirtualMachine.includes(:login_permissions).all
11 vm.login_permissions.each do |perm|
12 user_uuid = perm.tail_uuid
13 @users[user_uuid].andand.authorized_keys.each do |ak|
14 username = perm.properties.andand['username']
18 hostname: vm.hostname,
19 public_key: ak.public_key,
21 virtual_machine_uuid: vm.uuid,
22 authorized_key_uuid: ak.uuid
28 render json: { kind: "arvados#HashList", items: @response }