morpheus-cli 3.6.1 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7dcc836533eb2ee562132b47ff16c4fe83e6f7cc3b901e34527e5ba9ccf0b10f
4
- data.tar.gz: 32e8ac970752cf8584f432af02908ffa6f238dc69ecee40cc85c4308baec9d75
3
+ metadata.gz: 4b96e9a323b6252c8aea83546061d49935d48d468b06c88b2aea362a04024bb4
4
+ data.tar.gz: 45517a33a6c41ab8f97b4c83195cf2ba9c864aa44301eb8ede39243250f63608
5
5
  SHA512:
6
- metadata.gz: ff3196dabce7253348d7fe48a3bce8ebbbccb1801ba6d666cbb141c8825c473033c2c69626d23dfa3f22d91c3aef708b88c23de471a6610965d826ac85294cf3
7
- data.tar.gz: b28bb8057de9ba759c6d889f6bc403ea92d323fb5dbedda3ff81653ce1705c0eecd39c02d25bc8ae7f1b83ac699bcc295d8be21075aa0a3e2dc4dfc8c326ae43
6
+ metadata.gz: ea362685980a7a97f65c62af61cb0ee45fae02f73684599ba7290b1c411087d70b345f9d0488550721d8e174ddd824ad43383d95f03a8c7d9fb80018362accab
7
+ data.tar.gz: 9382c219bd8d7078c258c6568d034ef64c6a6b8ca496818ec84295208c3c7ff1c541e07b1801f7af4aff7507acacb81b6c155c08f3deb92f2b6b4131b71d5aa9
@@ -1096,12 +1096,12 @@ class Morpheus::Cli::Hosts
1096
1096
  end
1097
1097
  end
1098
1098
  end
1099
- if params.empty? && !editable_options.empty?
1100
- puts optparse
1101
- option_lines = editable_options.collect {|it| "\t-O #{it['fieldContext'] ? (it['fieldContext'] + '.') : ''}#{it['fieldName']}=\"value\"" }.join("\n")
1102
- puts "\nAvailable Options:\n#{option_lines}\n\n"
1103
- return 1
1104
- end
1099
+ # if params.empty? && !editable_options.empty?
1100
+ # puts optparse
1101
+ # option_lines = editable_options.collect {|it| "\t-O #{it['fieldContext'] ? (it['fieldContext'] + '.') : ''}#{it['fieldName']}=\"value\"" }.join("\n")
1102
+ # puts "\nAvailable Options:\n#{option_lines}\n\n"
1103
+ # return 1
1104
+ # end
1105
1105
 
1106
1106
  end
1107
1107
 
@@ -2055,12 +2055,12 @@ class Morpheus::Cli::Instances
2055
2055
  params = {}
2056
2056
  params.deep_merge!(options[:options].reject {|k,v| k.is_a?(Symbol) }) if options[:options]
2057
2057
 
2058
- if params.empty? && !editable_options.empty?
2059
- puts optparse
2060
- option_lines = editable_options.collect {|it| "\t-O #{it['fieldContext'] ? (it['fieldContext'] + '.') : ''}#{it['fieldName']}=\"value\"" }.join("\n")
2061
- puts "\nAvailable Options:\n#{option_lines}\n\n"
2062
- exit 1
2063
- end
2058
+ # if params.empty? && !editable_options.empty?
2059
+ # puts optparse
2060
+ # option_lines = editable_options.collect {|it| "\t-O #{it['fieldContext'] ? (it['fieldContext'] + '.') : ''}#{it['fieldName']}=\"value\"" }.join("\n")
2061
+ # puts "\nAvailable Options:\n#{option_lines}\n\n"
2062
+ # exit 1
2063
+ # end
2064
2064
 
2065
2065
  workflow_payload = {taskSet: {"#{workflow['id']}" => params }}
2066
2066
  begin
@@ -236,7 +236,7 @@ class Morpheus::Cli::NetworksCommand
236
236
  options['allowStaticOverride'] = val.to_s == 'on' || val.to_s == 'true'
237
237
  end
238
238
  opts.on('--group-access-all [on|off]', String, "Toggle Access for all groups.") do |val|
239
- group_access_all = val.to_s == 'on' || val.to_s == 'true'
239
+ group_access_all = val.to_s == 'on' || val.to_s == 'true' || val.to_s == ''
240
240
  end
241
241
  opts.on('--group-access LIST', Array, "Group Access, comma separated list of group IDs.") do |list|
242
242
  if list.size == 1 && list[0] == 'null' # hacky way to clear it
@@ -417,7 +417,13 @@ class Morpheus::Cli::NetworksCommand
417
417
  end
418
418
 
419
419
  # Group Access
420
- if group_access_all != nil
420
+ # Group Access (default is All)
421
+ if group_access_all.nil?
422
+ if payload['resourcePermissions'].nil?
423
+ payload['resourcePermissions'] ||= {}
424
+ payload['resourcePermissions']['all'] = true
425
+ end
426
+ else
421
427
  payload['resourcePermissions'] ||= {}
422
428
  payload['resourcePermissions']['all'] = group_access_all
423
429
  end
@@ -517,7 +523,7 @@ class Morpheus::Cli::NetworksCommand
517
523
  options['allowStaticOverride'] = val.to_s == 'on' || val.to_s == 'true'
518
524
  end
519
525
  opts.on('--group-access-all [on|off]', String, "Toggle Access for all groups.") do |val|
520
- group_access_all = val.to_s == 'on' || val.to_s == 'true'
526
+ group_access_all = val.to_s == 'on' || val.to_s == 'true' || val.to_s == ''
521
527
  end
522
528
  opts.on('--group-access LIST', Array, "Group Access, comma separated list of group IDs.") do |list|
523
529
  if list.size == 1 && list[0] == 'null' # hacky way to clear it
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Morpheus
3
3
  module Cli
4
- VERSION = "3.6.1"
4
+ VERSION = "3.6.2"
5
5
  end
6
6
  end
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: 3.6.1
4
+ version: 3.6.2
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-01-14 00:00:00.000000000 Z
14
+ date: 2019-01-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler