Example #1
0
 def test_vol_usage_update(self):
     self.mox.StubOutWithMock(db, 'vol_usage_update')
     db.vol_usage_update(self.context, 'fake-vol', 'rd-req', 'rd-bytes',
                         'wr-req', 'wr-bytes', 'fake-id', 'fake-refr',
                         'fake-bool')
     self.mox.ReplayAll()
     self.conductor.vol_usage_update(self.context, 'fake-vol', 'rd-req',
                                     'rd-bytes', 'wr-req', 'wr-bytes',
                                     {'uuid': 'fake-id'}, 'fake-refr',
                                     'fake-bool')
Example #2
0
 def test_vol_usage_update(self):
     self.mox.StubOutWithMock(db, 'vol_usage_update')
     db.vol_usage_update(self.context, 'fake-vol', 'rd-req', 'rd-bytes',
                         'wr-req', 'wr-bytes', 'fake-id', 'fake-refr',
                         'fake-bool')
     self.mox.ReplayAll()
     self.conductor.vol_usage_update(self.context, 'fake-vol', 'rd-req',
                                     'rd-bytes', 'wr-req', 'wr-bytes',
                                     {'uuid': 'fake-id'}, 'fake-refr',
                                     'fake-bool')
Example #3
0
 def save(self, update_totals=False):
     db_vol_usage = db.vol_usage_update(
         self._context, self.volume_id, self.curr_reads,
         self.curr_read_bytes, self.curr_writes, self.curr_write_bytes,
         self.instance_uuid, self.project_id, self.user_id,
         self.availability_zone, update_totals=update_totals)
     self._from_db_object(self._context, self, db_vol_usage)
Example #4
0
 def test_vol_usage_update(self):
     self.mox.StubOutWithMock(db, "vol_usage_update")
     db.vol_usage_update(
         self.context, "fake-vol", "rd-req", "rd-bytes", "wr-req", "wr-bytes", "fake-id", "fake-refr", "fake-bool"
     )
     self.mox.ReplayAll()
     self.conductor.vol_usage_update(
         self.context,
         "fake-vol",
         "rd-req",
         "rd-bytes",
         "wr-req",
         "wr-bytes",
         {"uuid": "fake-id"},
         "fake-refr",
         "fake-bool",
     )
Example #5
0
 def save(self, update_totals=False):
     db_vol_usage = db.vol_usage_update(self._context,
                                        self.volume_id,
                                        self.curr_reads,
                                        self.curr_read_bytes,
                                        self.curr_writes,
                                        self.curr_write_bytes,
                                        self.instance_uuid,
                                        self.project_id,
                                        self.user_id,
                                        self.availability_zone,
                                        update_totals=update_totals)
     self._from_db_object(self._context, self, db_vol_usage)