bosh_cli 1.2347.0 → 1.2354.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cli/client/director.rb +4 -0
- data/lib/cli/commands/locks.rb +34 -0
- data/lib/cli/version.rb +1 -1
- metadata +9 -8
data/lib/cli/client/director.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# Copyright (c) 2013 GoPivotal, Inc.
|
3
|
+
|
4
|
+
module Bosh::Cli::Command
|
5
|
+
class Locks < Base
|
6
|
+
|
7
|
+
usage 'locks'
|
8
|
+
desc 'Show list of current locks'
|
9
|
+
def locks
|
10
|
+
auth_required
|
11
|
+
|
12
|
+
locks = director.list_locks
|
13
|
+
err('No locks') if locks.empty?
|
14
|
+
|
15
|
+
show_locks_table(locks)
|
16
|
+
say("Locks total: %d" % locks.size)
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def show_locks_table(locks)
|
22
|
+
locks_table = table do |t|
|
23
|
+
t.headings = ['Type', 'Resource', 'Expires at']
|
24
|
+
locks.each do |lock|
|
25
|
+
t << [lock['type'], lock['resource'].join(':'), Time.at(lock['timeout'].to_i).utc]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
nl
|
30
|
+
say(locks_table)
|
31
|
+
nl
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2354.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bosh_common
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.2354.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.2354.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: json_pure
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.2354.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ~>
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 1.
|
125
|
+
version: 1.2354.0
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: net-ssh
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,7 +269,7 @@ dependencies:
|
|
269
269
|
version: '0'
|
270
270
|
description: ! 'BOSH CLI
|
271
271
|
|
272
|
-
|
272
|
+
fdf40d'
|
273
273
|
email: support@cloudfoundry.com
|
274
274
|
executables:
|
275
275
|
- bosh
|
@@ -300,6 +300,7 @@ files:
|
|
300
300
|
- lib/cli/commands/job.rb
|
301
301
|
- lib/cli/commands/job_management.rb
|
302
302
|
- lib/cli/commands/job_rename.rb
|
303
|
+
- lib/cli/commands/locks.rb
|
303
304
|
- lib/cli/commands/log_management.rb
|
304
305
|
- lib/cli/commands/maintenance.rb
|
305
306
|
- lib/cli/commands/misc.rb
|
@@ -380,7 +381,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
380
381
|
version: '0'
|
381
382
|
segments:
|
382
383
|
- 0
|
383
|
-
hash:
|
384
|
+
hash: -3118865310165357047
|
384
385
|
requirements: []
|
385
386
|
rubyforge_project:
|
386
387
|
rubygems_version: 1.8.23
|