Looks good! +1
A few nitpicks:
#1: + ring_id = self._ceph_ring_id + if ring_id is None: + ring_id = self._get_ceph_ring_id() + self._ceph_ring_id = ring_id
I think you can write this as
+ if self._ceph_ring_id is None: + self._ceph_ring_id = self._get_ceph_ring_id()
#2: + self.assertNotEqual([], plugin._ceph_usage_points) + self.assertEqual([(300, 1.0), (600, 1.0)], plugin._ceph_usage_points)
The first assert is redundant.
#3: + if len(message["ceph-usages"]) and message["ring-id"] is not None:
len() can be dropped.
« Back to merge proposal
Looks good! +1
A few nitpicks:
#1: ceph_ring_ id()
+ ring_id = self._ceph_ring_id
+ if ring_id is None:
+ ring_id = self._get_
+ self._ceph_ring_id = ring_id
I think you can write this as
+ if self._ceph_ring_id is None: ceph_ring_ id()
+ self._ceph_ring_id = self._get_
#2: qual([] , plugin. _ceph_usage_ points) l([(300, 1.0), (600, 1.0)], plugin. _ceph_usage_ points)
+ self.assertNotE
+ self.assertEqua
The first assert is redundant.
#3: "ceph-usages" ]) and message["ring-id"] is not None:
+ if len(message[
len() can be dropped.