Module: Morpheus::Cli

Defined in:
lib/morpheus/cli.rb,
lib/morpheus/cli/version.rb,
lib/morpheus/cli/cli_command.rb,
lib/morpheus/cli/credentials.rb,
lib/morpheus/cli/cli_registry.rb,
lib/morpheus/cli/option_types.rb,
lib/morpheus/cli/option_parser.rb

Defined Under Namespace

Modules: AccountsHelper, CliCommand, InfrastructureHelper, MonitoringHelper, OptionTypes, PrintHelper, ProvisioningHelper, WhoamiHelper Classes: Accounts, AliasCommand, AppTemplates, Apps, ArchivesCommand, BootScriptsCommand, CliRegistry, Clouds, ColoringCommand, CommandError, ContainersCommand, Credentials, CurlCommand, DashboardCommand, Deployments, Deploys, DotFile, EchoCommand, ErrorHandler, Groups, Hosts, ImageBuilderCommand, InstanceTypes, Instances, KeyPairs, Library, License, LoadBalancers, LogLevelCommand, Login, Logout, ManCommand, MonitorContactsCommand, MonitoringAppsCommand, MonitoringChecksCommand, MonitoringGroupsCommand, MonitoringIncidentsCommand, OptionParser, PreseedScriptsCommand, RecentActivityCommand, Remote, Roles, SecurityGroupRules, SecurityGroups, SetPromptCommand, Shell, SourceCommand, SslVerificationCommand, Tasks, Users, VersionCommand, VirtualImages, Whoami, Workflows

Constant Summary collapse

VERSION =
"3.1.0"

Class Method Summary collapse

Class Method Details

.home_directoryObject



18
19
20
21
22
23
24
25
26
# File 'lib/morpheus/cli.rb', line 18

def self.home_directory
  if @@home_directory
    @@home_directory
  elsif ENV['MORPHEUS_CLI_HOME']
    @@home_directory = ENV['MORPHEUS_CLI_HOME']
  else
    @@home_directory = File.join(Dir.home, ".morpheus")
  end
end

.home_directory=(fn) ⇒ Object

the home directory, where morpheus-cli stores things



14
15
16
# File 'lib/morpheus/cli.rb', line 14

def self.home_directory=(fn)
  @@home_directory = fn
end

.load!Object

load all the well known commands and utilties they need



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/morpheus/cli.rb', line 29

def self.load!()
  # load interfaces
  require 'morpheus/api/api_client.rb'
  Dir[File.dirname(__FILE__)  + "/api/**/*.rb"].each {|file| load file }

  # load mixins
  Dir[File.dirname(__FILE__)  + "/cli/mixins/*.rb"].each {|file| load file }

  # load commands
  # Dir[File.dirname(__FILE__)  + "/cli/*.rb"].each {|file| load file }

  # utilites
  require 'morpheus/cli/cli_registry.rb'
  require 'morpheus/cli/dot_file.rb'
  require 'morpheus/cli/command_error'

  load 'morpheus/cli/cli_command.rb'
  load 'morpheus/cli/option_types.rb'
  load 'morpheus/cli/credentials.rb'
  
  # shell scripting commands
  load 'morpheus/cli/source_command.rb'
  load 'morpheus/cli/echo_command.rb'
  load 'morpheus/cli/coloring_command.rb'
  load 'morpheus/cli/log_level_command.rb'
  load 'morpheus/cli/ssl_verification_command.rb'

  # all the known commands
  load 'morpheus/cli/remote.rb'
  load 'morpheus/cli/login.rb'
  load 'morpheus/cli/logout.rb'
  load 'morpheus/cli/whoami.rb'
  load 'morpheus/cli/dashboard_command.rb'
  load 'morpheus/cli/recent_activity_command.rb'
  load 'morpheus/cli/groups.rb'
  load 'morpheus/cli/clouds.rb'
  load 'morpheus/cli/hosts.rb'
  load 'morpheus/cli/load_balancers.rb'
  load 'morpheus/cli/shell.rb'
  load 'morpheus/cli/tasks.rb'
  load 'morpheus/cli/workflows.rb'
  load 'morpheus/cli/deployments.rb'
  load 'morpheus/cli/instances.rb'
  load 'morpheus/cli/containers_command.rb'
  load 'morpheus/cli/apps.rb'
  load 'morpheus/cli/app_templates.rb'
  load 'morpheus/cli/deploys.rb'
  load 'morpheus/cli/license.rb'
  load 'morpheus/cli/instance_types.rb'
  load 'morpheus/cli/security_groups.rb'
  load 'morpheus/cli/security_group_rules.rb'
  load 'morpheus/cli/accounts.rb'
  load 'morpheus/cli/users.rb'
  load 'morpheus/cli/roles.rb'
  load 'morpheus/cli/key_pairs.rb'
  load 'morpheus/cli/virtual_images.rb'
  load 'morpheus/cli/library.rb'
  load 'morpheus/cli/version_command.rb'
  load 'morpheus/cli/alias_command.rb'
  # todo: combine checks, incidents, apps, and goups under monitoring?
  # `monitoring apps|groups` still needed, 
  # maybe they should go under the apps and groups commands instead?
  # load 'morpheus/cli/monitoring_command.rb'
  load 'morpheus/cli/monitoring_incidents_command.rb'
  load 'morpheus/cli/monitoring_checks_command.rb'
  load 'morpheus/cli/monitoring_contacts_command.rb'
  load 'morpheus/cli/monitoring_groups_command.rb'
  load 'morpheus/cli/monitoring_apps_command.rb'

  # maybe scope all of these to image-builder or something
  load 'morpheus/cli/image_builder_command.rb'
  # load 'morpheus/cli/image_builds_command.rb'
  load 'morpheus/cli/preseed_scripts_command.rb'
  load 'morpheus/cli/boot_scripts_command.rb'

  load 'morpheus/cli/archives_command.rb'

  # nice to have commands
  load 'morpheus/cli/curl_command.rb'
  load 'morpheus/cli/set_prompt_command.rb'
  load 'morpheus/cli/man_command.rb' # please implement me


  # Your new commands go here...

end