|
1 | | -from tendrl.commons import objects |
| 1 | +from tendrl.integrations.ceph.objects import osd |
2 | 2 |
|
3 | 3 |
|
4 | | -class Osd(objects.BaseObject): |
| 4 | +class Osd(osd.Osd): |
5 | 5 | def __init__(self, id=None, |
6 | | - uuid=None, public_addr=None, cluster_addr=None, |
7 | | - heartbeat_front_addr=None, heartbeat_back_addr=None, |
| 6 | + uuid=None, hostname=None, public_addr=None, cluster_addr=None, |
| 7 | + device_path=None, heartbeat_front_addr=None, heartbeat_back_addr=None, |
8 | 8 | down_at=None, up_from=None, lost_at=None, |
9 | 9 | osd_up=None, osd_in=None, up_thru=None, |
10 | 10 | weight=None, primary_affinity=None, |
11 | 11 | state=None, last_clean_begin=None, |
12 | | - last_clean_end=None, *args, **kwargs): |
13 | | - super(Osd, self).__init__(*args, **kwargs) |
14 | | - |
15 | | - self.id = id |
16 | | - self.uuid = uuid |
17 | | - self.public_addr = public_addr |
18 | | - self.cluster_addr = cluster_addr |
19 | | - self.heartbeat_front_addr = heartbeat_front_addr |
20 | | - self.heartbeat_back_addr = heartbeat_back_addr |
21 | | - self.down_at = down_at |
22 | | - self.up_from = up_from |
23 | | - self.lost_at = lost_at |
24 | | - self.osd_up = osd_up |
25 | | - self.osd_in = osd_in |
26 | | - self.up_thru = up_thru |
27 | | - self.weight = weight |
28 | | - self.primary_affinity = primary_affinity |
29 | | - self.state = state |
30 | | - self.last_clean_begin = last_clean_begin |
31 | | - self.last_clean_end = last_clean_end |
32 | | - self.value = 'clusters/{0}/Osds/{1}' |
33 | | - |
34 | | - def render(self): |
35 | | - self.value = self.value.format( |
36 | | - NS.tendrl_context.integration_id, |
37 | | - self.uuid |
| 12 | + last_clean_end=None, total=None, used=None, used_pcnt=None, |
| 13 | + *args, **kwargs): |
| 14 | + super(Osd, self).__init__( |
| 15 | + id=id, |
| 16 | + uuid=uuid, |
| 17 | + hostname=hostname, |
| 18 | + public_addr=public_addr, |
| 19 | + cluster_addr=cluster_addr, |
| 20 | + device_path=device_path, |
| 21 | + heartbeat_front_addr=heartbeat_front_addr, |
| 22 | + heartbeat_back_addr=heartbeat_back_addr, |
| 23 | + down_at=down_at, |
| 24 | + up_from=up_from, |
| 25 | + lost_at=lost_at, |
| 26 | + osd_up=osd_up, |
| 27 | + osd_in=osd_in, |
| 28 | + up_thru=up_thru, |
| 29 | + weight=weight, |
| 30 | + primary_affinity=primary_affinity, |
| 31 | + state=state, |
| 32 | + last_clean_begin=last_clean_begin, |
| 33 | + last_clean_end=last_clean_end, |
| 34 | + total=total, |
| 35 | + used=used, |
| 36 | + used_pcnt=used_pcnt, |
| 37 | + *args, |
| 38 | + **kwargs |
38 | 39 | ) |
39 | | - return super(Osd, self).render() |
0 commit comments