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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5b0999e4c402c8052c252104dbdea3054fbf4fd3c22fe65a9eb7f863c42f412
4
- data.tar.gz: d735ef8c85fc5379dff57ea76244f497f62c4cef8a4191bae5f29c46bce097d7
3
+ metadata.gz: b0748f1164bf7b8b89bae682ce44ff4fc407bb1163dc348db288bee26fe7d3a3
4
+ data.tar.gz: 77fc7b831d011bce506b0dc1e756b2846ba30011610daa6db3393b1e13f72ff1
5
5
  SHA512:
6
- metadata.gz: 8a58dd035929572ba6d83048c3cb4cb22a6f41ffbc0a6ffcc75ce35d94a746c8a839bec51ee61fbb68314f91e34b2f8c1d5e7fdb00240b47284376299100d2bf
7
- data.tar.gz: a007de4d5abd83ce01e3c870fdc808434a66d85e3a01819c1e38b253c7e501171300407ecf8eee9004b32fd361160f9c67848dc5914d4c807f58a14824dc5d3e
6
+ metadata.gz: 0c32144ab893cdf0a1b0e542062a2bf0383ec3acff8cec2c2253f51e2dcb068d3f24a7cf85531f12b4d22507aab86320b81342d33507d9475778f0289dac03d2
7
+ data.tar.gz: 780aef2d1abefcb88f671b10d9abed6df82d5f5a47e080fd711f198f18a27e37bc060ed63d1535c1332b25ce81530fb0d42c20cbc0f50d7958243013c6e10216
data/README.md CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  ### Overview
4
4
 
5
- This gem is based on hard work of: `https://github.com/yuuzi41/fluent-plugin-openstack`.
5
+ This gem is based on hard work of: `https://github.com/yuuzi41/fluent-plugin-swift`.
6
6
  It is simplified and refactored version of this gem.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
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 (i > 0) && (swift_path == previous_path)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-openstack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - brissenden