The ceilometer.objectstore.swift_middleware
ModuleΒΆ
Ceilometer Middleware for Swift Proxy
Configuration:
In /etc/swift/proxy-server.conf on the main pipeline add “ceilometer” just before “proxy-server” and add the following filter in the file:
[filter:ceilometer]
use = egg:ceilometer#swift
# Some optional configuration
# this allow to publish additional metadata
metadata_headers = X-TEST
# Set reseller prefix (defaults to "AUTH_" if not set)
reseller_prefix = AUTH_
-
class
ceilometer.objectstore.swift_middleware.
CeilometerMiddleware
(*args, **kwargs)[source] Bases:
object
Ceilometer middleware used for counting requests.
-
publish_sample
(env, bytes_received, bytes_sent)[source]
-
-
class
ceilometer.objectstore.swift_middleware.
InputProxy
(wsgi_input)[source] Bases:
object
File-like object that counts bytes read.
To be swapped in for wsgi.input for accounting purposes. Borrowed from swift.common.utils. Duplidated here to avoid dependency on swift package.
-
read
(*args, **kwargs)[source] Pass read request to the underlying file-like object
Add bytes read to total.
-
readline
(*args, **kwargs)[source] Pass readline request to the underlying file-like object
Add bytes read to total.
-