lmcadm 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 938d019f4b6505f37a438e3067e6a6e1dcf7fea9
4
- data.tar.gz: a95c69c72ba3a0c9a49662bd234cedfaf7b40528
3
+ metadata.gz: 745a5304645376df76004e6c5130341aba234243
4
+ data.tar.gz: 9ace3654a56c6d756417317fc1a5ebcf07edb1eb
5
5
  SHA512:
6
- metadata.gz: ebdf152550d92de31951c1dc9cd01275bf82463fc483e995804042429a4e0b067396d2c6231e02193fa94644f961c8bb274ae209acce85627dc1848ec506839e
7
- data.tar.gz: 7a9a3f51b97d8a6c8396e4ad247880087dcb7f8829c1e9f6ae61599fa2ec810de60d9685a4cc4876c1b681230af9050e57f66d80c4685070736f07139a02b6ae
6
+ metadata.gz: f350bbb06491ffc16d75be0e6e47987882f7c9fd1e3c8211f340c417bc1e04558fe778891f20738ac0f136a9236f455742317a33c27d501c164280f740a1061a
7
+ data.tar.gz: 1bb9baf23b511dff5df7424b694fd080723face9035bcb2ebfb1853e484b75c8cb46e926bfe8514e3489f9b98fa38d8c636bd42687856c463f9f28a4bc00634d
@@ -11,16 +11,25 @@ module LMCAdm
11
11
  end
12
12
  end
13
13
 
14
- maintenance.arg_name 'UUID'
14
+ maintenance.arg_name 'UUID', [:required]
15
15
  maintenance.desc 'Enable scripting for an account'
16
16
  maintenance.command :scripting do |scr|
17
+ scr.desc 'Change the state of scripting'
17
18
  scr.switch :enable
19
+ scr.desc 'Get the state of scripting'
20
+ scr.switch :get
18
21
  scr.action do |global_options, options, args|
22
+ raise "No account UUID specified" if args.length < 1
19
23
  root_account = LMC::Account.get LMC::Account::ROOT_ACCOUNT_UUID
20
24
  cloud = LMC::Cloud.instance
21
25
  cloud.auth_for_account root_account
22
- result = cloud.put ['cloud-service-config', 'configroot', 'accounts', args.first, 'scriptauthority'], options[:enable]
23
- raise "error - unexpected result" unless result.body == options[:enable]
26
+ if options[:get]
27
+ result = cloud.get ['cloud-service-config', 'configroot', 'accounts', args.first, 'scriptauthority']
28
+ puts result.body
29
+ else
30
+ result = cloud.put ['cloud-service-config', 'configroot', 'accounts', args.first, 'scriptauthority'], options[:enable]
31
+ raise "error - unexpected result" unless result.body == options[:enable]
32
+ end
24
33
  end
25
34
  end
26
35
 
@@ -1,3 +1,3 @@
1
1
  module LMCAdm
2
- VERSION = '0.10.0'
2
+ VERSION = '0.11.0'
3
3
  end
data/lmcadm CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/bin/sh
2
2
  #wrapper script
3
3
  #set -x
4
- GLI_DEBUG=true bundle exec exe/lmcadm "$@"
4
+ GLI_DEBUG=false bundle exec exe/lmcadm "$@"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lmcadm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - erpel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-25 00:00:00.000000000 Z
11
+ date: 2020-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler