bosh_cpi 1.2546.0 → 1.2549.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bosh/cpi/cli.rb +4 -1
- data/lib/cloud/config.rb +1 -1
- data/lib/cloud/external_cpi.rb +12 -1
- data/lib/cloud/version.rb +1 -1
- metadata +6 -6
data/lib/bosh/cpi/cli.rb
CHANGED
@@ -28,8 +28,9 @@ class Bosh::Cpi::Cli
|
|
28
28
|
INVALID_CALL_ERROR_TYPE = 'InvalidCall'.freeze
|
29
29
|
UNKNOWN_ERROR_TYPE = 'Unknown'.freeze
|
30
30
|
|
31
|
-
def initialize(cpi, result_io)
|
31
|
+
def initialize(cpi, logs_string_io, result_io)
|
32
32
|
@cpi = cpi
|
33
|
+
@logs_string_io = logs_string_io
|
33
34
|
@result_io = result_io
|
34
35
|
end
|
35
36
|
|
@@ -92,6 +93,7 @@ class Bosh::Cpi::Cli
|
|
92
93
|
message: message,
|
93
94
|
ok_to_retry: ok_to_retry,
|
94
95
|
},
|
96
|
+
log: @logs_string_io.string,
|
95
97
|
}
|
96
98
|
@result_io.print(JSON.dump(hash)); nil
|
97
99
|
end
|
@@ -100,6 +102,7 @@ class Bosh::Cpi::Cli
|
|
100
102
|
hash = {
|
101
103
|
result: result,
|
102
104
|
error: nil,
|
105
|
+
log: @logs_string_io.string,
|
103
106
|
}
|
104
107
|
@result_io.print(JSON.dump(hash)); nil
|
105
108
|
end
|
data/lib/cloud/config.rb
CHANGED
@@ -5,7 +5,7 @@ module Bosh::Clouds
|
|
5
5
|
|
6
6
|
class << self
|
7
7
|
extend Forwardable
|
8
|
-
def_delegators :@delegate, :db, :logger, :uuid, :uuid=, :task_checkpoint
|
8
|
+
def_delegators :@delegate, :db, :logger, :uuid, :uuid=, :task_checkpoint, :cpi_task_log
|
9
9
|
end
|
10
10
|
|
11
11
|
# @param [Bosh::Director::Config] config director config file
|
data/lib/cloud/external_cpi.rb
CHANGED
@@ -53,7 +53,8 @@ module Bosh::Clouds
|
|
53
53
|
'message' => String,
|
54
54
|
'ok_to_retry' => bool
|
55
55
|
}
|
56
|
-
)
|
56
|
+
),
|
57
|
+
'log' => String
|
57
58
|
}
|
58
59
|
end
|
59
60
|
|
@@ -87,6 +88,8 @@ module Bosh::Clouds
|
|
87
88
|
handle_error(parsed_response['error'])
|
88
89
|
end
|
89
90
|
|
91
|
+
save_cpi_log(parsed_response['log'])
|
92
|
+
|
90
93
|
parsed_response['result']
|
91
94
|
end
|
92
95
|
end
|
@@ -118,6 +121,14 @@ module Bosh::Clouds
|
|
118
121
|
raise error, error_message
|
119
122
|
end
|
120
123
|
|
124
|
+
def save_cpi_log(output)
|
125
|
+
# cpi log path is set up at the beginning of every task in Config
|
126
|
+
# see JobRunner#setup_task_logging
|
127
|
+
File.open(Config.cpi_task_log, 'a') do |f|
|
128
|
+
f.write(output)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
121
132
|
def parsed_response(input)
|
122
133
|
begin
|
123
134
|
JSON.load(input)
|
data/lib/cloud/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh_cpi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2549.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-05-
|
12
|
+
date: 2014-05-14 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.2549.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,10 +26,10 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.2549.0
|
30
30
|
description: ! 'BOSH CPI
|
31
31
|
|
32
|
-
|
32
|
+
0d3835'
|
33
33
|
email: support@cloudfoundry.com
|
34
34
|
executables: []
|
35
35
|
extensions: []
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
version: '0'
|
70
70
|
segments:
|
71
71
|
- 0
|
72
|
-
hash:
|
72
|
+
hash: 3737853131911870421
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
75
|
rubygems_version: 1.8.23
|