morpheus-cli 3.6.9 → 3.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/morpheus/api/api_client.rb +0 -4
  3. data/lib/morpheus/api/deploy_interface.rb +12 -8
  4. data/lib/morpheus/cli.rb +0 -1
  5. data/lib/morpheus/cli/access_token_command.rb +3 -4
  6. data/lib/morpheus/cli/account_groups_command.rb +8 -3
  7. data/lib/morpheus/cli/apps.rb +10 -5
  8. data/lib/morpheus/cli/archives_command.rb +20 -6
  9. data/lib/morpheus/cli/boot_scripts_command.rb +5 -2
  10. data/lib/morpheus/cli/change_password_command.rb +1 -1
  11. data/lib/morpheus/cli/cli_command.rb +2 -4
  12. data/lib/morpheus/cli/cloud_datastores_command.rb +3 -2
  13. data/lib/morpheus/cli/commands/standard/alias_command.rb +10 -14
  14. data/lib/morpheus/cli/commands/standard/history_command.rb +0 -20
  15. data/lib/morpheus/cli/commands/standard/man_command.rb +8 -8
  16. data/lib/morpheus/cli/containers_command.rb +9 -1
  17. data/lib/morpheus/cli/credentials.rb +2 -1
  18. data/lib/morpheus/cli/cypher_command.rb +10 -2
  19. data/lib/morpheus/cli/dashboard_command.rb +1 -0
  20. data/lib/morpheus/cli/deployments.rb +5 -1
  21. data/lib/morpheus/cli/deploys.rb +26 -9
  22. data/lib/morpheus/cli/execute_schedules_command.rb +9 -1
  23. data/lib/morpheus/cli/execution_request_command.rb +3 -2
  24. data/lib/morpheus/cli/file_copy_request_command.rb +3 -2
  25. data/lib/morpheus/cli/hosts.rb +8 -6
  26. data/lib/morpheus/cli/image_builder_command.rb +14 -10
  27. data/lib/morpheus/cli/instance_types.rb +2 -1
  28. data/lib/morpheus/cli/instances.rb +9 -4
  29. data/lib/morpheus/cli/key_pairs.rb +33 -21
  30. data/lib/morpheus/cli/library_container_scripts_command.rb +5 -2
  31. data/lib/morpheus/cli/library_container_templates_command.rb +5 -2
  32. data/lib/morpheus/cli/library_container_types_command.rb +5 -3
  33. data/lib/morpheus/cli/library_instance_types_command.rb +6 -2
  34. data/lib/morpheus/cli/library_layouts_command.rb +5 -3
  35. data/lib/morpheus/cli/library_option_lists_command.rb +5 -1
  36. data/lib/morpheus/cli/library_option_types_command.rb +5 -0
  37. data/lib/morpheus/cli/library_upgrades_command.rb +5 -3
  38. data/lib/morpheus/cli/license.rb +3 -0
  39. data/lib/morpheus/cli/load_balancers.rb +10 -1
  40. data/lib/morpheus/cli/mixins/processes_helper.rb +10 -4
  41. data/lib/morpheus/cli/monitoring_apps_command.rb +32 -26
  42. data/lib/morpheus/cli/monitoring_checks_command.rb +35 -27
  43. data/lib/morpheus/cli/monitoring_contacts_command.rb +19 -16
  44. data/lib/morpheus/cli/monitoring_groups_command.rb +32 -26
  45. data/lib/morpheus/cli/monitoring_incidents_command.rb +39 -30
  46. data/lib/morpheus/cli/network_domains_command.rb +5 -2
  47. data/lib/morpheus/cli/network_groups_command.rb +5 -2
  48. data/lib/morpheus/cli/network_pool_servers_command.rb +5 -2
  49. data/lib/morpheus/cli/network_pools_command.rb +5 -2
  50. data/lib/morpheus/cli/network_proxies_command.rb +5 -2
  51. data/lib/morpheus/cli/network_services_command.rb +1 -0
  52. data/lib/morpheus/cli/networks_command.rb +5 -2
  53. data/lib/morpheus/cli/packages_command.rb +6 -3
  54. data/lib/morpheus/cli/policies_command.rb +17 -3
  55. data/lib/morpheus/cli/power_schedules_command.rb +9 -1
  56. data/lib/morpheus/cli/preseed_scripts_command.rb +5 -2
  57. data/lib/morpheus/cli/processes_command.rb +17 -6
  58. data/lib/morpheus/cli/recent_activity_command.rb +1 -0
  59. data/lib/morpheus/cli/remote.rb +1 -0
  60. data/lib/morpheus/cli/roles.rb +14 -5
  61. data/lib/morpheus/cli/security_group_rules.rb +8 -4
  62. data/lib/morpheus/cli/security_groups.rb +4 -0
  63. data/lib/morpheus/cli/shell.rb +13 -23
  64. data/lib/morpheus/cli/storage_providers_command.rb +12 -6
  65. data/lib/morpheus/cli/tasks.rb +6 -0
  66. data/lib/morpheus/cli/tenants_command.rb +13 -9
  67. data/lib/morpheus/cli/user_groups_command.rb +7 -1
  68. data/lib/morpheus/cli/user_settings_command.rb +7 -1
  69. data/lib/morpheus/cli/user_sources_command.rb +10 -8
  70. data/lib/morpheus/cli/users.rb +7 -2
  71. data/lib/morpheus/cli/version.rb +1 -1
  72. data/lib/morpheus/cli/virtual_images.rb +8 -1
  73. data/lib/morpheus/cli/whoami.rb +34 -15
  74. data/lib/morpheus/cli/workflows.rb +5 -0
  75. data/lib/morpheus/formatters.rb +4 -0
  76. data/lib/morpheus/rest_client.rb +6 -1
  77. metadata +2 -4
  78. data/lib/morpheus/api/app_templates_interface.rb +0 -64
  79. data/lib/morpheus/cli/app_templates.rb +0 -2019
@@ -42,6 +42,7 @@ class Morpheus::Cli::NetworkDomainsCommand
42
42
  connect(options)
43
43
  begin
44
44
  params.merge!(parse_list_options(options))
45
+ @network_domains_interface.setopts(options)
45
46
  if options[:dry_run]
46
47
  print_dry_run @network_domains_interface.dry.list(params)
47
48
  return
@@ -112,6 +113,7 @@ class Morpheus::Cli::NetworkDomainsCommand
112
113
  end
113
114
  connect(options)
114
115
  begin
116
+ @network_domains_interface.setopts(options)
115
117
  if options[:dry_run]
116
118
  if args[0].to_s =~ /\A\d{1,}\Z/
117
119
  print_dry_run @network_domains_interface.dry.get(args[0].to_i)
@@ -330,7 +332,7 @@ class Morpheus::Cli::NetworkDomainsCommand
330
332
 
331
333
  end
332
334
 
333
-
335
+ @network_domains_interface.setopts(options)
334
336
  if options[:dry_run]
335
337
  print_dry_run @network_domains_interface.dry.create(payload)
336
338
  return
@@ -450,7 +452,7 @@ class Morpheus::Cli::NetworkDomainsCommand
450
452
  end
451
453
 
452
454
  end
453
-
455
+ @network_domains_interface.setopts(options)
454
456
  if options[:dry_run]
455
457
  print_dry_run @network_domains_interface.dry.update(network_domain["id"], payload)
456
458
  return
@@ -494,6 +496,7 @@ class Morpheus::Cli::NetworkDomainsCommand
494
496
  unless options[:yes] || Morpheus::Cli::OptionTypes.confirm("Are you sure you want to delete the network domain: #{network_domain['name']}?")
495
497
  return 9, "aborted command"
496
498
  end
499
+ @network_domains_interface.setopts(options)
497
500
  if options[:dry_run]
498
501
  print_dry_run @network_domains_interface.dry.destroy(network_domain['id'])
499
502
  return 0
@@ -42,6 +42,7 @@ class Morpheus::Cli::NetworkGroupsCommand
42
42
  connect(options)
43
43
  begin
44
44
  params.merge!(parse_list_options(options))
45
+ @network_groups_interface.setopts(options)
45
46
  if options[:dry_run]
46
47
  print_dry_run @network_groups_interface.dry.list(params)
47
48
  return
@@ -110,6 +111,7 @@ class Morpheus::Cli::NetworkGroupsCommand
110
111
  end
111
112
  connect(options)
112
113
  begin
114
+ @network_groups_interface.setopts(options)
113
115
  if options[:dry_run]
114
116
  if args[0].to_s =~ /\A\d{1,}\Z/
115
117
  print_dry_run @network_groups_interface.dry.get(args[0].to_i)
@@ -319,7 +321,7 @@ class Morpheus::Cli::NetworkGroupsCommand
319
321
 
320
322
  end
321
323
 
322
-
324
+ @network_groups_interface.setopts(options)
323
325
  if options[:dry_run]
324
326
  print_dry_run @network_groups_interface.dry.create(payload)
325
327
  return
@@ -480,7 +482,7 @@ class Morpheus::Cli::NetworkGroupsCommand
480
482
  end
481
483
 
482
484
  end
483
-
485
+ @network_groups_interface.setopts(options)
484
486
  if options[:dry_run]
485
487
  print_dry_run @network_groups_interface.dry.update(network_group["id"], payload)
486
488
  return
@@ -524,6 +526,7 @@ class Morpheus::Cli::NetworkGroupsCommand
524
526
  unless options[:yes] || Morpheus::Cli::OptionTypes.confirm("Are you sure you want to delete the network group: #{network_group['name']}?")
525
527
  return 9, "aborted command"
526
528
  end
529
+ @network_groups_interface.setopts(options)
527
530
  if options[:dry_run]
528
531
  print_dry_run @network_groups_interface.dry.destroy(network_group['id'])
529
532
  return 0
@@ -42,6 +42,7 @@ class Morpheus::Cli::NetworkPoolServersCommand
42
42
  connect(options)
43
43
  begin
44
44
  params.merge!(parse_list_options(options))
45
+ @network_pool_servers_interface.setopts(options)
45
46
  if options[:dry_run]
46
47
  print_dry_run @network_pool_servers_interface.dry.list(params)
47
48
  return
@@ -108,6 +109,7 @@ class Morpheus::Cli::NetworkPoolServersCommand
108
109
  end
109
110
  connect(options)
110
111
  begin
112
+ @network_pool_servers_interface.setopts(options)
111
113
  if options[:dry_run]
112
114
  if args[0].to_s =~ /\A\d{1,}\Z/
113
115
  print_dry_run @network_pool_servers_interface.dry.get(args[0].to_i)
@@ -218,7 +220,7 @@ class Morpheus::Cli::NetworkPoolServersCommand
218
220
 
219
221
  end
220
222
 
221
-
223
+ @network_pool_servers_interface.setopts(options)
222
224
  if options[:dry_run]
223
225
  print_dry_run @network_pool_servers_interface.dry.create(payload)
224
226
  return
@@ -308,7 +310,7 @@ class Morpheus::Cli::NetworkPoolServersCommand
308
310
  # ['name', 'serviceUsername', 'servicePassword', 'servicePort', 'serviceHost', 'serviceUrl', 'serviceMode', 'networkFilter', 'tenantMatch']
309
311
 
310
312
  end
311
-
313
+ @network_pool_servers_interface.setopts(options)
312
314
  if options[:dry_run]
313
315
  print_dry_run @network_pool_servers_interface.dry.update(network_pool_server["id"], payload)
314
316
  return
@@ -352,6 +354,7 @@ class Morpheus::Cli::NetworkPoolServersCommand
352
354
  unless options[:yes] || Morpheus::Cli::OptionTypes.confirm("Are you sure you want to delete the network pool server: #{network_pool_server['name']}?")
353
355
  return 9, "aborted command"
354
356
  end
357
+ @network_pool_servers_interface.setopts(options)
355
358
  if options[:dry_run]
356
359
  print_dry_run @network_pool_servers_interface.dry.destroy(network_pool_server['id'])
357
360
  return 0
@@ -42,6 +42,7 @@ class Morpheus::Cli::NetworkPoolsCommand
42
42
  connect(options)
43
43
  begin
44
44
  params.merge!(parse_list_options(options))
45
+ @network_pools_interface.setopts(options)
45
46
  if options[:dry_run]
46
47
  print_dry_run @network_pools_interface.dry.list(params)
47
48
  return
@@ -111,6 +112,7 @@ class Morpheus::Cli::NetworkPoolsCommand
111
112
  end
112
113
  connect(options)
113
114
  begin
115
+ @network_pools_interface.setopts(options)
114
116
  if options[:dry_run]
115
117
  if args[0].to_s =~ /\A\d{1,}\Z/
116
118
  print_dry_run @network_pools_interface.dry.get(args[0].to_i)
@@ -253,7 +255,7 @@ class Morpheus::Cli::NetworkPoolsCommand
253
255
 
254
256
  end
255
257
 
256
-
258
+ @network_pools_interface.setopts(options)
257
259
  if options[:dry_run]
258
260
  print_dry_run @network_pools_interface.dry.create(payload)
259
261
  return
@@ -373,7 +375,7 @@ class Morpheus::Cli::NetworkPoolsCommand
373
375
  end
374
376
 
375
377
  end
376
-
378
+ @network_pools_interface.setopts(options)
377
379
  if options[:dry_run]
378
380
  print_dry_run @network_pools_interface.dry.update(network_pool["id"], payload)
379
381
  return
@@ -417,6 +419,7 @@ class Morpheus::Cli::NetworkPoolsCommand
417
419
  unless options[:yes] || Morpheus::Cli::OptionTypes.confirm("Are you sure you want to delete the network pool: #{network_pool['name']}?")
418
420
  return 9, "aborted command"
419
421
  end
422
+ @network_pools_interface.setopts(options)
420
423
  if options[:dry_run]
421
424
  print_dry_run @network_pools_interface.dry.destroy(network_pool['id'])
422
425
  return 0
@@ -42,6 +42,7 @@ class Morpheus::Cli::NetworkProxiesCommand
42
42
  connect(options)
43
43
  begin
44
44
  params.merge!(parse_list_options(options))
45
+ @network_proxies_interface.setopts(options)
45
46
  if options[:dry_run]
46
47
  print_dry_run @network_proxies_interface.dry.list(params)
47
48
  return
@@ -110,6 +111,7 @@ class Morpheus::Cli::NetworkProxiesCommand
110
111
  end
111
112
  connect(options)
112
113
  begin
114
+ @network_proxies_interface.setopts(options)
113
115
  if options[:dry_run]
114
116
  if args[0].to_s =~ /\A\d{1,}\Z/
115
117
  print_dry_run @network_proxies_interface.dry.get(args[0].to_i)
@@ -304,7 +306,7 @@ class Morpheus::Cli::NetworkProxiesCommand
304
306
 
305
307
  end
306
308
 
307
-
309
+ @network_proxies_interface.setopts(options)
308
310
  if options[:dry_run]
309
311
  print_dry_run @network_proxies_interface.dry.create(payload)
310
312
  return
@@ -470,7 +472,7 @@ class Morpheus::Cli::NetworkProxiesCommand
470
472
  end
471
473
 
472
474
  end
473
-
475
+ @network_proxies_interface.setopts(options)
474
476
  if options[:dry_run]
475
477
  print_dry_run @network_proxies_interface.dry.update(network_proxy["id"], payload)
476
478
  return
@@ -514,6 +516,7 @@ class Morpheus::Cli::NetworkProxiesCommand
514
516
  unless options[:yes] || Morpheus::Cli::OptionTypes.confirm("Are you sure you want to delete the network proxy: #{network_proxy['name']}?")
515
517
  return 9, "aborted command"
516
518
  end
519
+ @network_proxies_interface.setopts(options)
517
520
  if options[:dry_run]
518
521
  print_dry_run @network_proxies_interface.dry.destroy(network_proxy['id'])
519
522
  return 0
@@ -43,6 +43,7 @@ class Morpheus::Cli::NetworkServicesCommand
43
43
  connect(options)
44
44
  begin
45
45
  params.merge!(parse_list_options(options))
46
+ @network_services_interface.setopts(options)
46
47
  if options[:dry_run]
47
48
  print_dry_run @network_services_interface.dry.list(params)
48
49
  return
@@ -45,6 +45,7 @@ class Morpheus::Cli::NetworksCommand
45
45
  connect(options)
46
46
  begin
47
47
  params.merge!(parse_list_options(options))
48
+ @networks_interface.setopts(options)
48
49
  if options[:dry_run]
49
50
  print_dry_run @networks_interface.dry.list(params)
50
51
  return
@@ -115,6 +116,7 @@ class Morpheus::Cli::NetworksCommand
115
116
  end
116
117
  connect(options)
117
118
  begin
119
+ @networks_interface.setopts(options)
118
120
  if options[:dry_run]
119
121
  if args[0].to_s =~ /\A\d{1,}\Z/
120
122
  print_dry_run @networks_interface.dry.get(args[0].to_i)
@@ -456,7 +458,7 @@ class Morpheus::Cli::NetworksCommand
456
458
 
457
459
  end
458
460
 
459
-
461
+ @networks_interface.setopts(options)
460
462
  if options[:dry_run]
461
463
  print_dry_run @networks_interface.dry.create(payload)
462
464
  return
@@ -734,7 +736,7 @@ class Morpheus::Cli::NetworksCommand
734
736
  end
735
737
 
736
738
  end
737
-
739
+ @networks_interface.setopts(options)
738
740
  if options[:dry_run]
739
741
  print_dry_run @networks_interface.dry.update(network["id"], payload)
740
742
  return
@@ -778,6 +780,7 @@ class Morpheus::Cli::NetworksCommand
778
780
  unless options[:yes] || Morpheus::Cli::OptionTypes.confirm("Are you sure you want to delete the network: #{network['name']}?")
779
781
  return 9, "aborted command"
780
782
  end
783
+ @networks_interface.setopts(options)
781
784
  if options[:dry_run]
782
785
  print_dry_run @networks_interface.dry.destroy(network['id'])
783
786
  return 0
@@ -39,7 +39,7 @@ class Morpheus::Cli::LibraryPackagesCommand
39
39
  connect(options)
40
40
  begin
41
41
  params.merge!(parse_list_options(options))
42
-
42
+ @packages_interface.setopts(options)
43
43
  if options[:dry_run]
44
44
  print_dry_run @packages_interface.dry.list(params)
45
45
  return 0
@@ -104,6 +104,7 @@ class Morpheus::Cli::LibraryPackagesCommand
104
104
  # params['phrase'] = args[0]
105
105
  end
106
106
  params.merge!(parse_list_options(options))
107
+ @packages_interface.setopts(options)
107
108
  if options[:dry_run]
108
109
  print_dry_run @packages_interface.dry.search(params)
109
110
  return 0
@@ -177,6 +178,7 @@ class Morpheus::Cli::LibraryPackagesCommand
177
178
  begin
178
179
  params.merge!(parse_list_options(options))
179
180
  params['code'] = args[0]
181
+ @packages_interface.setopts(options)
180
182
  if options[:dry_run]
181
183
  print_dry_run @packages_interface.dry.info(params)
182
184
  return 0
@@ -325,6 +327,7 @@ class Morpheus::Cli::LibraryPackagesCommand
325
327
  connect(options)
326
328
  begin
327
329
  params['code'] = args[0]
330
+ @packages_interface.setopts(options)
328
331
  if options[:dry_run]
329
332
  #print cyan,bold, " - Uploading #{local_file_path} to #{bucket_id}:#{destination} DRY RUN", reset, "\n"
330
333
  # print_h1 "DRY RUN"
@@ -398,7 +401,7 @@ class Morpheus::Cli::LibraryPackagesCommand
398
401
 
399
402
  connect(options)
400
403
  begin
401
-
404
+ @packages_interface.setopts(options)
402
405
  if options[:dry_run]
403
406
  #print cyan,bold, " - Uploading #{local_file_path} to #{bucket_id}:#{destination} DRY RUN", reset, "\n"
404
407
  # print_h1 "DRY RUN"
@@ -577,7 +580,7 @@ class Morpheus::Cli::LibraryPackagesCommand
577
580
 
578
581
  # merge -O options into normally parsed options
579
582
  params.deep_merge!(options[:options].reject {|k,v| k.is_a?(Symbol) }) if options[:options]
580
-
583
+ @packages_interface.setopts(options)
581
584
  if options[:dry_run]
582
585
  print_dry_run @packages_interface.dry.export(params, outfile), full_command_string
583
586
  return 0
@@ -78,6 +78,9 @@ class Morpheus::Cli::PoliciesCommand
78
78
  params['refType'] = 'User'
79
79
  params['refId'] = user['id']
80
80
  end
81
+ @policies_interface.setopts(options)
82
+ @group_policies_interface.setopts(options)
83
+ @cloud_policies_interface.setopts(options)
81
84
  if options[:dry_run]
82
85
  if group
83
86
  print_dry_run @group_policies_interface.dry.list(group['id'], params)
@@ -212,6 +215,9 @@ class Morpheus::Cli::PoliciesCommand
212
215
  user = find_user_by_username_or_id(nil, options[:user])
213
216
  return 1 if user.nil?
214
217
  end
218
+ @policies_interface.setopts(options)
219
+ @group_policies_interface.setopts(options)
220
+ @cloud_policies_interface.setopts(options)
215
221
  if options[:dry_run]
216
222
  if args[0].to_s =~ /\A\d{1,}\Z/
217
223
  if group
@@ -463,7 +469,9 @@ class Morpheus::Cli::PoliciesCommand
463
469
  end
464
470
  end
465
471
 
466
-
472
+ @policies_interface.setopts(options)
473
+ @group_policies_interface.setopts(options)
474
+ @cloud_policies_interface.setopts(options)
467
475
  if options[:dry_run]
468
476
  if group
469
477
  print_dry_run @group_policies_interface.dry.create(group['id'], payload)
@@ -593,7 +601,9 @@ class Morpheus::Cli::PoliciesCommand
593
601
  # return
594
602
  # end
595
603
  # json_response = @policies_interface.update(policy["id"], payload)
596
-
604
+ @policies_interface.setopts(options)
605
+ @group_policies_interface.setopts(options)
606
+ @cloud_policies_interface.setopts(options)
597
607
  if options[:dry_run]
598
608
  if group
599
609
  print_dry_run @group_policies_interface.dry.update(group['id'], policy["id"], payload)
@@ -656,6 +666,9 @@ class Morpheus::Cli::PoliciesCommand
656
666
  # return 0
657
667
  # end
658
668
  # json_response = @policies_interface.destroy(policy['id'])
669
+ @policies_interface.setopts(options)
670
+ @group_policies_interface.setopts(options)
671
+ @cloud_policies_interface.setopts(options)
659
672
  if options[:dry_run]
660
673
  if group
661
674
  print_dry_run @group_policies_interface.dry.destroy(group['id'], policy["id"])
@@ -706,6 +719,7 @@ class Morpheus::Cli::PoliciesCommand
706
719
 
707
720
  connect(options)
708
721
  begin
722
+ @policies_interface.setopts(options)
709
723
  if options[:dry_run]
710
724
  print_dry_run @policies_interface.dry.list_policy_types(params)
711
725
  return 0
@@ -746,7 +760,6 @@ class Morpheus::Cli::PoliciesCommand
746
760
  print_rest_exception(e, options)
747
761
  return 1
748
762
  end
749
- @policies_interface.list_policy_types
750
763
  end
751
764
 
752
765
  def get_type(args)
@@ -769,6 +782,7 @@ class Morpheus::Cli::PoliciesCommand
769
782
  connect(options)
770
783
  begin
771
784
  policy_type_id = args[0].to_s
785
+ @policies_interface.setopts(options)
772
786
  if options[:dry_run]
773
787
  print_dry_run @policies_interface.dry.get_policy_type(policy_type_id, params)
774
788
  return 0
@@ -33,6 +33,7 @@ class Morpheus::Cli::PowerSchedulesCommand
33
33
  connect(options)
34
34
  begin
35
35
  params.merge!(parse_list_options(options))
36
+ @power_schedules_interface.setopts(options)
36
37
  if options[:dry_run]
37
38
  print_dry_run @power_schedules_interface.dry.list(params)
38
39
  return
@@ -102,6 +103,7 @@ class Morpheus::Cli::PowerSchedulesCommand
102
103
  if schedule.nil?
103
104
  return 1
104
105
  end
106
+ @power_schedules_interface.setopts(options)
105
107
  if options[:dry_run]
106
108
  print_dry_run @power_schedules_interface.dry.get(schedule['id'])
107
109
  return
@@ -231,6 +233,7 @@ class Morpheus::Cli::PowerSchedulesCommand
231
233
  # todo: prompt?
232
234
  payload = {'schedule' => params}
233
235
  end
236
+ @power_schedules_interface.setopts(options)
234
237
  if options[:dry_run]
235
238
  print_dry_run @power_schedules_interface.dry.create(payload)
236
239
  return
@@ -309,6 +312,7 @@ class Morpheus::Cli::PowerSchedulesCommand
309
312
  params.deep_merge!(options[:options].reject {|k,v| k.is_a?(Symbol) }) if options[:options]
310
313
  payload = {'schedule' => params}
311
314
  end
315
+ @power_schedules_interface.setopts(options)
312
316
  if options[:dry_run]
313
317
  print_dry_run @power_schedules_interface.dry.update(schedule["id"], payload)
314
318
  return
@@ -356,7 +360,7 @@ class Morpheus::Cli::PowerSchedulesCommand
356
360
  # }
357
361
  # payload['schedule'].merge!(schedule)
358
362
  payload = params
359
-
363
+ @power_schedules_interface.setopts(options)
360
364
  if options[:dry_run]
361
365
  print_dry_run @power_schedules_interface.dry.destroy(schedule["id"])
362
366
  return
@@ -411,6 +415,7 @@ class Morpheus::Cli::PowerSchedulesCommand
411
415
  end
412
416
  payload = {'instances' => instances.collect {|it| it['id'] } }
413
417
  end
418
+ @power_schedules_interface.setopts(options)
414
419
  if options[:dry_run]
415
420
  print_dry_run @power_schedules_interface.dry.add_instances(schedule["id"], payload)
416
421
  return 0
@@ -469,6 +474,7 @@ class Morpheus::Cli::PowerSchedulesCommand
469
474
  end
470
475
  payload = {'instances' => instances.collect {|it| it['id'] } }
471
476
  end
477
+ @power_schedules_interface.setopts(options)
472
478
  if options[:dry_run]
473
479
  print_dry_run @power_schedules_interface.dry.remove_instances(schedule["id"], payload)
474
480
  return 0
@@ -527,6 +533,7 @@ class Morpheus::Cli::PowerSchedulesCommand
527
533
  end
528
534
  payload = {'servers' => servers.collect {|it| it['id'] } }
529
535
  end
536
+ @power_schedules_interface.setopts(options)
530
537
  if options[:dry_run]
531
538
  print_dry_run @power_schedules_interface.dry.add_servers(schedule["id"], payload)
532
539
  return 0
@@ -585,6 +592,7 @@ class Morpheus::Cli::PowerSchedulesCommand
585
592
  end
586
593
  payload = {'servers' => servers.collect {|it| it['id'] } }
587
594
  end
595
+ @power_schedules_interface.setopts(options)
588
596
  if options[:dry_run]
589
597
  print_dry_run @power_schedules_interface.dry.remove_servers(schedule["id"], payload)
590
598
  return 0
@@ -45,7 +45,7 @@ class Morpheus::Cli::PreseedScriptsCommand
45
45
  [:phrase, :offset, :max, :sort, :direction].each do |k|
46
46
  params[k] = options[k] unless options[k].nil?
47
47
  end
48
-
48
+ @preseed_scripts_interface.setopts(options)
49
49
  if options[:dry_run]
50
50
  print_dry_run @preseed_scripts_interface.dry.list(params)
51
51
  return
@@ -104,6 +104,7 @@ class Morpheus::Cli::PreseedScriptsCommand
104
104
  end
105
105
  connect(options)
106
106
  begin
107
+ @preseed_scripts_interface.setopts(options)
107
108
  if options[:dry_run]
108
109
  if args[0].to_s =~ /\A\d{1,}\Z/
109
110
  print_dry_run @preseed_scripts_interface.dry.get(args[0].to_i)
@@ -182,6 +183,7 @@ class Morpheus::Cli::PreseedScriptsCommand
182
183
  payload['preseedScript']['content'] = File.read(script_file)
183
184
  end
184
185
  payload['preseedScript'].merge!(params)
186
+ @preseed_scripts_interface.setopts(options)
185
187
  if options[:dry_run]
186
188
  print_dry_run @preseed_scripts_interface.dry.create(payload)
187
189
  return
@@ -252,7 +254,7 @@ class Morpheus::Cli::PreseedScriptsCommand
252
254
  payload['preseedScript']['content'] = File.read(script_file)
253
255
  end
254
256
  payload['preseedScript'].merge!(params)
255
-
257
+ @preseed_scripts_interface.setopts(options)
256
258
  if options[:dry_run]
257
259
  print_dry_run @preseed_scripts_interface.dry.update(preseed_script["id"], payload)
258
260
  return
@@ -295,6 +297,7 @@ class Morpheus::Cli::PreseedScriptsCommand
295
297
  unless options[:yes] || Morpheus::Cli::OptionTypes.confirm("Are you sure you want to delete the preseed script: #{preseed_script['fileName']}?")
296
298
  return 9, "aborted command"
297
299
  end
300
+ @preseed_scripts_interface.setopts(options)
298
301
  if options[:dry_run]
299
302
  print_dry_run @preseed_scripts_interface.dry.destroy(preseed_script['id'])
300
303
  return 0