fluent-plugin-openstack 0.0.7 → 0.0.8
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 +4 -4
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_swift.rb +10 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f14022921181dd9ef910a300686d5799819495a74fa17bd1d693eb8a9c2729ed
|
4
|
+
data.tar.gz: 3bde465d639779b85b965e141cd2c9dde94db86b66e1182dbb73a18db7b3a168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c20967350ca7d587b2847fc864b0cb044c495fb99e1a852b6e7632ee9b35e014a82485f45d765707ab00c080f10a9302bb59a5c7eb96860f30d65391062af07
|
7
|
+
data.tar.gz: 0c3d24245c68c0ad83be201098b91b04e7f4a7e94f9ac3ab26666d3985f16d9c260b10e3f4cc0bf8f531ed9e9184625bdde278a9623dc452fa263c6df7667fb9
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
@@ -115,20 +115,16 @@ module Fluent::Plugin
|
|
115
115
|
end
|
116
116
|
|
117
117
|
def start
|
118
|
-
openstack_config = {
|
119
|
-
provider: 'OpenStack',
|
120
|
-
openstack_auth_url: auth_url,
|
121
|
-
openstack_username: auth_user,
|
122
|
-
openstack_api_key: auth_api_key,
|
123
|
-
openstack_tenant: auth_tenant,
|
124
|
-
openstack_region: auth_region
|
125
|
-
}
|
126
|
-
|
127
|
-
log.warn openstack_config.inspect.to_s
|
128
|
-
|
129
118
|
Excon.defaults[:ssl_verify_peer] = ssl_verify
|
130
119
|
begin
|
131
|
-
self.storage = Fog::Storage.new(
|
120
|
+
self.storage = Fog::Storage.new(
|
121
|
+
provider: 'OpenStack',
|
122
|
+
openstack_auth_url: auth_url,
|
123
|
+
openstack_username: auth_user,
|
124
|
+
openstack_api_key: auth_api_key,
|
125
|
+
openstack_tenant: auth_tenant,
|
126
|
+
openstack_region: auth_region
|
127
|
+
)
|
132
128
|
rescue StandardError => e
|
133
129
|
raise "Can't call Swift API. Please check your ENV OS_*, your credentials or auth_url configuration. Error: #{e.inspect}"
|
134
130
|
end
|
@@ -137,9 +133,7 @@ module Fluent::Plugin
|
|
137
133
|
super
|
138
134
|
end
|
139
135
|
|
140
|
-
# TODO: dead method?
|
141
136
|
def format(tag, time, record)
|
142
|
-
log.warn 'Method: `format(tag, time, record)` is NOT dead!'
|
143
137
|
r = inject_values_to_record(tag, time, record)
|
144
138
|
formatter.format(tag, time, r)
|
145
139
|
end
|
@@ -179,10 +173,10 @@ module Fluent::Plugin
|
|
179
173
|
swift_path = swift_path.gsub(/%{[^}]+}/, values_for_swift_object_key_post)
|
180
174
|
if i.positive? && (swift_path == previous_path)
|
181
175
|
if overwrite
|
182
|
-
log.warn "#{swift_path} already exists, but will overwrite"
|
176
|
+
log.warn "File: #{swift_path} already exists, but will overwrite!"
|
183
177
|
break
|
184
178
|
else
|
185
|
-
raise "
|
179
|
+
raise "Duplicated path is generated. Use %{index} in swift_object_key_format: Path: #{swift_path}"
|
186
180
|
end
|
187
181
|
end
|
188
182
|
|