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


Python utils.usage_volume_info函数代码示例

本文整理汇总了Python中nova.compute.utils.usage_volume_info函数的典型用法代码示例。如果您正苦于以下问题:Python usage_volume_info函数的具体用法?Python usage_volume_info怎么用?Python usage_volume_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: vol_usage_update

    def vol_usage_update(
        self, context, vol_id, rd_req, rd_bytes, wr_req, wr_bytes, instance, last_refreshed=None, update_totals=False
    ):
        vol_usage = self.db.vol_usage_update(
            context,
            vol_id,
            rd_req,
            rd_bytes,
            wr_req,
            wr_bytes,
            instance["uuid"],
            instance["project_id"],
            instance["user_id"],
            instance["availability_zone"],
            update_totals,
        )

        # We have just updated the database, so send the notification now
        notifier.notify(
            context,
            "conductor.%s" % self.host,
            "volume.usage",
            notifier.INFO,
            compute_utils.usage_volume_info(vol_usage),
        )
开发者ID:habuka036,项目名称:nova,代码行数:25,代码来源:manager.py

示例2: vol_usage_update

    def vol_usage_update(
        self, context, vol_id, rd_req, rd_bytes, wr_req, wr_bytes, instance, last_refreshed=None, update_totals=False
    ):
        # The session object is needed here, as the vol_usage object returned
        # needs to bound to it in order to refresh its data
        session = db_session.get_session()
        vol_usage = self.db.vol_usage_update(
            context,
            vol_id,
            rd_req,
            rd_bytes,
            wr_req,
            wr_bytes,
            instance["uuid"],
            instance["project_id"],
            instance["user_id"],
            instance["availability_zone"],
            update_totals,
            session,
        )

        # We have just updated the database, so send the notification now
        notifier.notify(
            context,
            "conductor.%s" % self.host,
            "volume.usage",
            notifier.INFO,
            compute_utils.usage_volume_info(vol_usage),
        )
开发者ID:djipko,项目名称:nova,代码行数:29,代码来源:manager.py

示例3: vol_usage_update

    def vol_usage_update(self, context, vol_id, rd_req, rd_bytes, wr_req,
                         wr_bytes, instance, last_refreshed, update_totals):
        vol_usage = self.db.vol_usage_update(context, vol_id,
                                             rd_req, rd_bytes,
                                             wr_req, wr_bytes,
                                             instance['uuid'],
                                             instance['project_id'],
                                             instance['user_id'],
                                             instance['availability_zone'],
                                             update_totals)

        # We have just updated the database, so send the notification now
        self.notifier.info(context, 'volume.usage',
                           compute_utils.usage_volume_info(vol_usage))
开发者ID:VinceOnGit,项目名称:nova,代码行数:14,代码来源:manager.py


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