コード例 #1
0
ファイル: manager.py プロジェクト: djipko/nova
    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),
        )
コード例 #2
0
ファイル: manager.py プロジェクト: habuka036/nova
    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),
        )
コード例 #3
0
ファイル: manager.py プロジェクト: leesurezen/nova
    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))
コード例 #4
0
ファイル: manager.py プロジェクト: VinceOnGit/nova
    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))
コード例 #5
0
ファイル: manager.py プロジェクト: yuans/nova
    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'],
                                             last_refreshed, 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))