morpheus-cli 4.1.4 → 4.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/morpheus.rb +5 -0
- data/lib/morpheus/api.rb +2 -2
- data/lib/morpheus/api/api_client.rb +47 -12
- data/lib/morpheus/api/appliance_settings_interface.rb +30 -0
- data/lib/morpheus/api/auth_interface.rb +14 -10
- data/lib/morpheus/api/clouds_interface.rb +7 -0
- data/lib/morpheus/api/clusters_interface.rb +17 -5
- data/lib/morpheus/api/custom_instance_types_interface.rb +2 -3
- data/lib/morpheus/api/deployments_interface.rb +7 -0
- data/lib/morpheus/api/execute_schedules_interface.rb +2 -3
- data/lib/morpheus/api/groups_interface.rb +7 -0
- data/lib/morpheus/api/license_interface.rb +9 -2
- data/lib/morpheus/api/load_balancers_interface.rb +7 -0
- data/lib/morpheus/api/logs_interface.rb +11 -2
- data/lib/morpheus/api/monitoring_alerts_interface.rb +45 -0
- data/lib/morpheus/api/monitoring_checks_interface.rb +2 -2
- data/lib/morpheus/api/monitoring_interface.rb +13 -8
- data/lib/morpheus/api/power_schedules_interface.rb +2 -3
- data/lib/morpheus/api/servers_interface.rb +5 -2
- data/lib/morpheus/api/setup_interface.rb +25 -7
- data/lib/morpheus/api/task_sets_interface.rb +7 -1
- data/lib/morpheus/api/tasks_interface.rb +7 -0
- data/lib/morpheus/api/virtual_images_interface.rb +2 -3
- data/lib/morpheus/api/whitelabel_settings_interface.rb +60 -0
- data/lib/morpheus/cli.rb +18 -14
- data/lib/morpheus/cli/access_token_command.rb +18 -2
- data/lib/morpheus/cli/appliance_settings_command.rb +303 -0
- data/lib/morpheus/cli/apps.rb +4 -3
- data/lib/morpheus/cli/archives_command.rb +0 -21
- data/lib/morpheus/cli/blueprints_command.rb +2 -2
- data/lib/morpheus/cli/cli_command.rb +32 -8
- data/lib/morpheus/cli/clouds.rb +6 -11
- data/lib/morpheus/cli/clusters.rb +346 -117
- data/lib/morpheus/cli/command_error.rb +4 -0
- data/lib/morpheus/cli/commands/standard/man_command.rb +1 -1
- data/lib/morpheus/cli/containers_command.rb +2 -1
- data/lib/morpheus/cli/credentials.rb +49 -4
- data/lib/morpheus/cli/deployments.rb +2 -2
- data/lib/morpheus/cli/dot_file.rb +2 -2
- data/lib/morpheus/cli/error_handler.rb +6 -3
- data/lib/morpheus/cli/execute_schedules_command.rb +1 -1
- data/lib/morpheus/cli/groups.rb +4 -4
- data/lib/morpheus/cli/hosts.rb +3 -2
- data/lib/morpheus/cli/image_builder_command.rb +0 -21
- data/lib/morpheus/cli/instances.rb +17 -4
- data/lib/morpheus/cli/library_container_types_command.rb +1 -1
- data/lib/morpheus/cli/library_layouts_command.rb +1 -1
- data/lib/morpheus/cli/library_upgrades_command.rb +1 -1
- data/lib/morpheus/cli/license.rb +185 -72
- data/lib/morpheus/cli/load_balancers.rb +4 -4
- data/lib/morpheus/cli/login.rb +4 -0
- data/lib/morpheus/cli/logs_command.rb +132 -0
- data/lib/morpheus/cli/mixins/infrastructure_helper.rb +2 -2
- data/lib/morpheus/cli/mixins/logs_helper.rb +65 -0
- data/lib/morpheus/cli/mixins/monitoring_helper.rb +410 -28
- data/lib/morpheus/cli/mixins/print_helper.rb +14 -4
- data/lib/morpheus/cli/monitoring_alerts_command.rb +800 -0
- data/lib/morpheus/cli/monitoring_apps_command.rb +85 -28
- data/lib/morpheus/cli/monitoring_checks_command.rb +60 -27
- data/lib/morpheus/cli/monitoring_contacts_command.rb +54 -79
- data/lib/morpheus/cli/monitoring_groups_command.rb +62 -23
- data/lib/morpheus/cli/monitoring_incidents_command.rb +91 -70
- data/lib/morpheus/cli/network_pools_command.rb +39 -23
- data/lib/morpheus/cli/power_schedules_command.rb +1 -1
- data/lib/morpheus/cli/remote.rb +834 -275
- data/lib/morpheus/cli/roles.rb +100 -38
- data/lib/morpheus/cli/tasks.rb +1 -1
- data/lib/morpheus/cli/user_settings_command.rb +20 -12
- data/lib/morpheus/cli/version.rb +1 -1
- data/lib/morpheus/cli/virtual_images.rb +1 -1
- data/lib/morpheus/cli/whitelabel_settings_command.rb +546 -0
- data/lib/morpheus/cli/whoami.rb +1 -1
- data/lib/morpheus/cli/workflows.rb +2 -2
- data/lib/morpheus/terminal.rb +22 -8
- metadata +11 -2
data/lib/morpheus/cli/whoami.rb
CHANGED
@@ -368,7 +368,7 @@ class Morpheus::Cli::Workflows
|
|
368
368
|
end
|
369
369
|
|
370
370
|
def find_workflow_by_name(name)
|
371
|
-
workflows = @task_sets_interface.
|
371
|
+
workflows = @task_sets_interface.list({name: name.to_s})['taskSets']
|
372
372
|
if workflows.empty?
|
373
373
|
print_red_alert "Workflow not found by name #{name}"
|
374
374
|
return nil
|
@@ -404,7 +404,7 @@ class Morpheus::Cli::Workflows
|
|
404
404
|
end
|
405
405
|
|
406
406
|
def find_task_by_name(name)
|
407
|
-
tasks = @tasks_interface.
|
407
|
+
tasks = @tasks_interface.list({name: name.to_s})['tasks']
|
408
408
|
if tasks.empty?
|
409
409
|
print_red_alert "Task not found by name #{name}"
|
410
410
|
return nil
|
data/lib/morpheus/terminal.rb
CHANGED
@@ -85,10 +85,10 @@ module Morpheus
|
|
85
85
|
# the global Morpheus::Terminal instance
|
86
86
|
# This should go away, but it needed for now...
|
87
87
|
def self.instance
|
88
|
-
@morphterm
|
88
|
+
@morphterm # ||= self.new({})
|
89
89
|
end
|
90
90
|
|
91
|
-
# hack alert! This should go away, but
|
91
|
+
# hack alert! This should go away, but is needed for now...
|
92
92
|
def self.new(*args)
|
93
93
|
obj = super(*args)
|
94
94
|
@morphterm = obj
|
@@ -107,12 +107,14 @@ module Morpheus
|
|
107
107
|
# @param [IO] stderr
|
108
108
|
# @stderr = stderr
|
109
109
|
def initialize(stdin=STDIN,stdout=STDOUT, stderr=STDERR, homedir=nil)
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
110
|
+
attrs = {}
|
111
|
+
if stdin.is_a?(Hash)
|
112
|
+
attrs = stdin.clone()
|
113
|
+
stdin = attrs[:stdin] || STDIN
|
114
|
+
stdout = attrs[:stdout] || STDOUT
|
115
|
+
stderr = attrs[:stderr] || STDERR
|
116
|
+
homedir = attrs[:homedir] || attrs[:home] || attrs[:home_directory]
|
117
|
+
end
|
116
118
|
# establish IO
|
117
119
|
# @stdin, @stdout, @stderr = stdin, stdout, stderr
|
118
120
|
set_stdin(stdin)
|
@@ -140,6 +142,14 @@ module Morpheus
|
|
140
142
|
@angry_prompt ||= Morpheus::Terminal.angry_prompt
|
141
143
|
end
|
142
144
|
|
145
|
+
def to_s
|
146
|
+
"<##{self.class}:#{self.object_id.to_s(8)} @stdin=#{@stdin} @stdout=#{@base_url} @stderr=#{@stderr} @home=#{@home_directory} @prompt=#{@prompt} >"
|
147
|
+
end
|
148
|
+
|
149
|
+
def inspect
|
150
|
+
to_s
|
151
|
+
end
|
152
|
+
|
143
153
|
# execute .morpheus_profile startup script
|
144
154
|
def execute_profile_script(rerun=false)
|
145
155
|
if @profile_dot_file
|
@@ -181,6 +191,10 @@ module Morpheus
|
|
181
191
|
@stderr
|
182
192
|
end
|
183
193
|
|
194
|
+
def home_directory=(homedir)
|
195
|
+
set_home_directory(homedir)
|
196
|
+
end
|
197
|
+
|
184
198
|
def set_home_directory(homedir)
|
185
199
|
full_homedir = File.expand_path(homedir)
|
186
200
|
# if !Dir.exists?(full_homedir)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morpheus-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Estes
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-10-
|
14
|
+
date: 2019-10-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -156,10 +156,12 @@ files:
|
|
156
156
|
- README.md
|
157
157
|
- Rakefile
|
158
158
|
- bin/morpheus
|
159
|
+
- lib/morpheus.rb
|
159
160
|
- lib/morpheus/api.rb
|
160
161
|
- lib/morpheus/api/account_groups_interface.rb
|
161
162
|
- lib/morpheus/api/accounts_interface.rb
|
162
163
|
- lib/morpheus/api/api_client.rb
|
164
|
+
- lib/morpheus/api/appliance_settings_interface.rb
|
163
165
|
- lib/morpheus/api/apps_interface.rb
|
164
166
|
- lib/morpheus/api/archive_buckets_interface.rb
|
165
167
|
- lib/morpheus/api/archive_files_interface.rb
|
@@ -200,6 +202,7 @@ files:
|
|
200
202
|
- lib/morpheus/api/license_interface.rb
|
201
203
|
- lib/morpheus/api/load_balancers_interface.rb
|
202
204
|
- lib/morpheus/api/logs_interface.rb
|
205
|
+
- lib/morpheus/api/monitoring_alerts_interface.rb
|
203
206
|
- lib/morpheus/api/monitoring_apps_interface.rb
|
204
207
|
- lib/morpheus/api/monitoring_checks_interface.rb
|
205
208
|
- lib/morpheus/api/monitoring_contacts_interface.rb
|
@@ -244,6 +247,7 @@ files:
|
|
244
247
|
- lib/morpheus/api/user_sources_interface.rb
|
245
248
|
- lib/morpheus/api/users_interface.rb
|
246
249
|
- lib/morpheus/api/virtual_images_interface.rb
|
250
|
+
- lib/morpheus/api/whitelabel_settings_interface.rb
|
247
251
|
- lib/morpheus/api/whoami_interface.rb
|
248
252
|
- lib/morpheus/api/wiki_interface.rb
|
249
253
|
- lib/morpheus/benchmarking.rb
|
@@ -251,6 +255,7 @@ files:
|
|
251
255
|
- lib/morpheus/cli/access_token_command.rb
|
252
256
|
- lib/morpheus/cli/account_groups_command.rb
|
253
257
|
- lib/morpheus/cli/accounts.rb
|
258
|
+
- lib/morpheus/cli/appliance_settings_command.rb
|
254
259
|
- lib/morpheus/cli/apps.rb
|
255
260
|
- lib/morpheus/cli/archives_command.rb
|
256
261
|
- lib/morpheus/cli/auth_command.rb
|
@@ -318,14 +323,17 @@ files:
|
|
318
323
|
- lib/morpheus/cli/load_balancers.rb
|
319
324
|
- lib/morpheus/cli/login.rb
|
320
325
|
- lib/morpheus/cli/logout.rb
|
326
|
+
- lib/morpheus/cli/logs_command.rb
|
321
327
|
- lib/morpheus/cli/mixins/accounts_helper.rb
|
322
328
|
- lib/morpheus/cli/mixins/infrastructure_helper.rb
|
323
329
|
- lib/morpheus/cli/mixins/library_helper.rb
|
330
|
+
- lib/morpheus/cli/mixins/logs_helper.rb
|
324
331
|
- lib/morpheus/cli/mixins/monitoring_helper.rb
|
325
332
|
- lib/morpheus/cli/mixins/print_helper.rb
|
326
333
|
- lib/morpheus/cli/mixins/processes_helper.rb
|
327
334
|
- lib/morpheus/cli/mixins/provisioning_helper.rb
|
328
335
|
- lib/morpheus/cli/mixins/whoami_helper.rb
|
336
|
+
- lib/morpheus/cli/monitoring_alerts_command.rb
|
329
337
|
- lib/morpheus/cli/monitoring_apps_command.rb
|
330
338
|
- lib/morpheus/cli/monitoring_checks_command.rb
|
331
339
|
- lib/morpheus/cli/monitoring_contacts_command.rb
|
@@ -362,6 +370,7 @@ files:
|
|
362
370
|
- lib/morpheus/cli/users.rb
|
363
371
|
- lib/morpheus/cli/version.rb
|
364
372
|
- lib/morpheus/cli/virtual_images.rb
|
373
|
+
- lib/morpheus/cli/whitelabel_settings_command.rb
|
365
374
|
- lib/morpheus/cli/whoami.rb
|
366
375
|
- lib/morpheus/cli/wiki_command.rb
|
367
376
|
- lib/morpheus/cli/workflows.rb
|