当前位置: 首页>>代码示例>>Python>>正文


Python Controller.__init__方法代码示例

本文整理汇总了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')
开发者ID:sunzz679,项目名称:swift-2.4.0--source-read,代码行数:9,代码来源:account.py

示例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')
开发者ID:jannatunnoor,项目名称:test_swift,代码行数:9,代码来源:account.py

示例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')
开发者ID:HeyManLeader,项目名称:OpenStack-Swift,代码行数:10,代码来源:gziptojson.py

示例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']}
开发者ID:sunzz679,项目名称:swift-2.4.0--source-read,代码行数:11,代码来源:info.py

示例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)
开发者ID:saebyuk,项目名称:swift,代码行数:8,代码来源:obj.py

示例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)
开发者ID:sun7shines,项目名称:Cloudfs,代码行数:5,代码来源:account.py

示例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"]}
开发者ID:jettang,项目名称:icehouse,代码行数:8,代码来源:info.py


注:本文中的swift.proxy.controllers.base.Controller.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。