简体   繁体   中英

customizing openstack swfit middleware

I want to write openstack/swift middleware. but I don't know where to put my code after development so that I can put it on the pipeline later. According to it's document I have to put it on /opt/stack/swift. but I didn't install openstack-swift via "devstack" so I don't have that path.

what should I do now?

As I understood we have yo put our middleware code in this path in the proxy node:

/usr/lib/python3/site-packages/swift/common/middleware/MIDDLEWARE_NAME.py

then configuring the /etc/swift/proxy-server.conf

[filter:ip_whitelist]
paste.filter_factory = swift.common.middleware.ip_whitelist:filter_factory
# You can override the default log routing for this filter here:
# set log_name = ratelimit
# set log_facility = LOG_LOCAL0
# set log_level = INFO
# set log_headers = False
# set log_address = /dev/log
deny_message = You shall not pass!

you can see more on this link .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM