fluent-plugin-openstack 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_swift.rb +2 -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: b0748f1164bf7b8b89bae682ce44ff4fc407bb1163dc348db288bee26fe7d3a3
|
4
|
+
data.tar.gz: 77fc7b831d011bce506b0dc1e756b2846ba30011610daa6db3393b1e13f72ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c32144ab893cdf0a1b0e542062a2bf0383ec3acff8cec2c2253f51e2dcb068d3f24a7cf85531f12b4d22507aab86320b81342d33507d9475778f0289dac03d2
|
7
|
+
data.tar.gz: 780aef2d1abefcb88f671b10d9abed6df82d5f5a47e080fd711f198f18a27e37bc060ed63d1535c1332b25ce81530fb0d42c20cbc0f50d7958243013c6e10216
|
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
@@ -25,13 +25,7 @@ module Fluent::Plugin
|
|
25
25
|
config_param :auth_user, :string
|
26
26
|
desc "Authentication Key (Password). Set a value or use `#{ENV['OS_PASSWORD']}`"
|
27
27
|
config_param :auth_api_key, :string
|
28
|
-
# Identity v2
|
29
28
|
config_param :auth_tenant, :string, default: nil
|
30
|
-
# Identity v3
|
31
|
-
desc "Authentication Project. Set a value or use `#{ENV['OS_PROJECT_NAME']}`"
|
32
|
-
config_param :project_name, :string, default: nil
|
33
|
-
desc "Authentication Domain. Set a value or use `#{ENV['OS_PROJECT_DOMAIN_NAME']}`"
|
34
|
-
config_param :domain_name, :string, default: nil
|
35
29
|
desc "Authentication Region. Optional, not required if there is only one region available. Set a value or use `#{ENV['OS_REGION_NAME']}`"
|
36
30
|
config_param :auth_region, :string, default: nil
|
37
31
|
config_param :swift_account, :string, default: nil
|
@@ -87,13 +81,6 @@ module Fluent::Plugin
|
|
87
81
|
raise Fluent::ConfigError, 'auth_api_key parameter or OS_PASSWORD variable not defined'
|
88
82
|
end
|
89
83
|
|
90
|
-
if project_name.blank?
|
91
|
-
raise Fluent::ConfigError, 'project_name parameter or OS_PROJECT_NAME variable not defined'
|
92
|
-
end
|
93
|
-
if domain_name.blank?
|
94
|
-
raise Fluent::ConfigError, 'domain_name parameter or OS_PROJECT_DOMAIN_NAME variable not defined'
|
95
|
-
end
|
96
|
-
|
97
84
|
self.ext, self.mime_type = case store_as
|
98
85
|
when 'gzip' then ['gz', 'application/x-gzip']
|
99
86
|
when 'lzo' then
|
@@ -137,8 +124,6 @@ module Fluent::Plugin
|
|
137
124
|
openstack_username: auth_user,
|
138
125
|
openstack_api_key: auth_api_key,
|
139
126
|
openstack_tenant: auth_tenant,
|
140
|
-
openstack_project_name: project_name,
|
141
|
-
openstack_domain_name: domain_name,
|
142
127
|
openstack_region: auth_region
|
143
128
|
)
|
144
129
|
rescue StandardError => e
|
@@ -151,6 +136,7 @@ module Fluent::Plugin
|
|
151
136
|
|
152
137
|
# TODO: dead method?
|
153
138
|
def format(tag, time, record)
|
139
|
+
log.warn "Method: `format(tag, time, record)` is NOT dead!"
|
154
140
|
r = inject_values_to_record(tag, time, record)
|
155
141
|
formatter.format(tag, time, r)
|
156
142
|
end
|
@@ -185,7 +171,7 @@ module Fluent::Plugin
|
|
185
171
|
|
186
172
|
swift_path = extract_placeholders(swift_path, metadata)
|
187
173
|
swift_path = swift_path.gsub(/%{[^}]+}/, values_for_swift_object_key_post)
|
188
|
-
if
|
174
|
+
if i.positive? && (swift_path == previous_path)
|
189
175
|
if overwrite
|
190
176
|
log.warn "#{swift_path} already exists, but will overwrite"
|
191
177
|
break
|