本文整理汇总了Python中swift.proxy.controllers.base.Controller.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Controller.__init__方法的具体用法?Python Controller.__init__怎么用?Python Controller.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类swift.proxy.controllers.base.Controller
的用法示例。
在下文中一共展示了Controller.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from swift.proxy.controllers.base import Controller [as 别名]
# 或者: from swift.proxy.controllers.base.Controller import __init__ [as 别名]
def __init__(self, app, account_name, **kwargs):
Controller.__init__(self, app)
#将ascii形式的字符转换成unicode形式字符,url解码
self.account_name = unquote(account_name)
if not self.app.allow_account_management:
self.allowed_methods.remove('PUT')
self.allowed_methods.remove('DELETE')
示例2: __init__
# 需要导入模块: from swift.proxy.controllers.base import Controller [as 别名]
# 或者: from swift.proxy.controllers.base.Controller import __init__ [as 别名]
def __init__(self, app, account_name, **kwargs):
Controller.__init__(self, app)
print 'in __init__ of accountcontroller class'
self.account_name = unquote(account_name)
if not self.app.allow_account_management:
self.allowed_methods.remove('PUT')
self.allowed_methods.remove('DELETE')
示例3: __init__
# 需要导入模块: from swift.proxy.controllers.base import Controller [as 别名]
# 或者: from swift.proxy.controllers.base.Controller import __init__ [as 别名]
def __init__(self, app, conf):
Controller.__init__(self, app)
self.conf = conf
self.logger = get_logger(conf, log_route='ringinfo')
self.swift_dir = self.conf.get('swift_dir', '/etc/swift')
self.object_ring = Ring(self.swift_dir, ring_name='object')
self.container_ring = Ring(self.swift_dir, ring_name='container')
self.account_ring = Ring(self.swift_dir, ring_name='account')
示例4: __init__
# 需要导入模块: from swift.proxy.controllers.base import Controller [as 别名]
# 或者: from swift.proxy.controllers.base.Controller import __init__ [as 别名]
def __init__(self, app, version, expose_info, disallowed_sections,
admin_key):
Controller.__init__(self, app)
self.expose_info = expose_info
self.disallowed_sections = disallowed_sections
self.admin_key = admin_key
self.allowed_hmac_methods = {
'HEAD': ['HEAD', 'GET'],
'GET': ['GET']}
示例5: __init__
# 需要导入模块: from swift.proxy.controllers.base import Controller [as 别名]
# 或者: from swift.proxy.controllers.base.Controller import __init__ [as 别名]
def __init__(self, app, account_name, container_name, object_name,
**kwargs):
Controller.__init__(self, app)
self.account_name = unquote(account_name)
self.container_name = unquote(container_name)
self.object_name = unquote(object_name)
示例6: __init__
# 需要导入模块: from swift.proxy.controllers.base import Controller [as 别名]
# 或者: from swift.proxy.controllers.base.Controller import __init__ [as 别名]
def __init__(self, app, account_name, **kwargs):
Controller.__init__(self, app)
self.account_name = unquote(account_name)
示例7: __init__
# 需要导入模块: from swift.proxy.controllers.base import Controller [as 别名]
# 或者: from swift.proxy.controllers.base.Controller import __init__ [as 别名]
def __init__(self, app, version, expose_info, disallowed_sections, admin_key):
Controller.__init__(self, app)
self.expose_info = expose_info
self.disallowed_sections = disallowed_sections
self.admin_key = admin_key
self.allowed_hmac_methods = {"HEAD": ["HEAD", "GET"], "GET": ["GET"]}