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


Python LOGGER.warning方法代码示例

本文整理汇总了Python中swift3.utils.LOGGER.warning方法的典型用法代码示例。如果您正苦于以下问题:Python LOGGER.warning方法的具体用法?Python LOGGER.warning怎么用?Python LOGGER.warning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在swift3.utils.LOGGER的用法示例。


在下文中一共展示了LOGGER.warning方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: controller

# 需要导入模块: from swift3.utils import LOGGER [as 别名]
# 或者: from swift3.utils.LOGGER import warning [as 别名]
    def controller(self):
        if self.is_service_request:
            return ServiceController

        if not self.slo_enabled:
            multi_part = ["partNumber", "uploadId", "uploads"]
            if len([p for p in multi_part if p in self.params]):
                LOGGER.warning("multipart: No SLO middleware in pipeline")
                raise S3NotImplemented("Multi-part feature isn't support")

        if "acl" in self.params:
            return AclController
        if "delete" in self.params:
            return MultiObjectDeleteController
        if "location" in self.params:
            return LocationController
        if "logging" in self.params:
            return LoggingStatusController
        if "partNumber" in self.params:
            return PartController
        if "uploadId" in self.params:
            return UploadController
        if "uploads" in self.params:
            return UploadsController
        if "versioning" in self.params:
            return VersioningController

        unsupported = ("notification", "policy", "requestPayment", "torrent", "website", "cors", "tagging", "restore")
        if set(unsupported) & set(self.params):
            return UnsupportedController

        if self.is_object_request:
            return ObjectController
        return BucketController
开发者ID:tumf,项目名称:swift3,代码行数:36,代码来源:request.py

示例2: controller

# 需要导入模块: from swift3.utils import LOGGER [as 别名]
# 或者: from swift3.utils.LOGGER import warning [as 别名]
    def controller(self):
        if self.is_service_request:
            return ServiceController

        if not self.slo_enabled:
            multi_part = ['partNumber', 'uploadId', 'uploads']
            if len([p for p in multi_part if p in self.params]):
                LOGGER.warning('multipart: No SLO middleware in pipeline')
                raise S3NotImplemented("Multi-part feature isn't support")

        if 'acl' in self.params:
            return AclController
        if 'delete' in self.params:
            return MultiObjectDeleteController
        if 'location' in self.params:
            return LocationController
        if 'logging' in self.params:
            return LoggingStatusController
        if 'partNumber' in self.params:
            return PartController
        if 'uploadId' in self.params:
            return UploadController
        if 'uploads' in self.params:
            return UploadsController
        if 'versioning' in self.params:
            return VersioningController

        unsupported = ('notification', 'policy', 'requestPayment', 'torrent',
                       'website', 'cors', 'tagging', 'restore')
        if set(unsupported) & set(self.params):
            return UnsupportedController

        if self.is_object_request:
            return ObjectController
        return BucketController
开发者ID:notmyname,项目名称:swift3,代码行数:37,代码来源:request.py

示例3: check_pipeline

# 需要导入模块: from swift3.utils import LOGGER [as 别名]
# 或者: from swift3.utils.LOGGER import warning [as 别名]
    def check_pipeline(self, conf):
        """
        Check that proxy-server.conf has an appropriate pipeline for swift3.
        """
        if conf.get('__file__', None) is None:
            return

        ctx = loadcontext(loadwsgi.APP, conf.__file__)
        pipeline = str(PipelineWrapper(ctx)).split(' ')

        # Add compatible with 3rd party middleware.
        if check_filter_order(pipeline,
                              ['swift3', 'proxy-server']):

            auth_pipeline = pipeline[pipeline.index('swift3') + 1:
                                     pipeline.index('proxy-server')]

            # Check SLO middleware
            if 'slo' not in auth_pipeline:
                self.slo_enabled = False
                LOGGER.warning('swift3 middleware is required SLO middleware '
                               'to support multi-part upload, please add it '
                               'in pipline')

            if not conf.auth_pipeline_check:
                LOGGER.debug('Skip pipeline auth check.')
                return

            if 'tempauth' in auth_pipeline:
                LOGGER.debug('Use tempauth middleware.')
                return
            elif 'keystoneauth' in auth_pipeline:
                if check_filter_order(auth_pipeline,
                                      ['s3token',
                                       'authtoken',
                                       'keystoneauth']):
                    LOGGER.debug('Use keystone middleware.')
                    return

            elif len(auth_pipeline):
                LOGGER.debug('Use third party(unknown) auth middleware.')
                return

        raise ValueError('Invalid proxy pipeline: %s' % pipeline)
开发者ID:KoreaCloudObjectStorage,项目名称:swift3,代码行数:46,代码来源:middleware.py


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