Sha256: ece36729a041c0259bd0fb723815ecfa5278dd1c3f2d1284e72f340cb96cd267
Contents?: true
Size: 877 Bytes
Versions: 3
Compression:
Stored size: 877 Bytes
Contents
class Ey::Core::Cli::Servers < Ey::Core::Cli::Subcommand title "servers" summary "List servers you have access to" option :account, short: 'c', long: 'account', description: 'Filter by account name or id', argument: 'Account' option :environment, short: "-e", long: "environment", description: "Filter by environment.", argument: "environment" def handle servers = if option(:account) account = core_account_for(options) core_client.servers.all(account: account) elsif environment = option(:environment) (core_client.environments.get(environment) || core_client.environments.first(name: environment)).servers.all else core_client.servers.all end puts TablePrint::Printer.new(servers, [{id: {width: 10}}, :role, :provisioned_id]).table_print end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ey-core-3.1.2 | lib/ey-core/cli/servers.rb |
ey-core-3.1.1 | lib/ey-core/cli/servers.rb |
ey-core-3.1.0 | lib/ey-core/cli/servers.rb |