华为云RDS会采集标签名为'team'的标签
parent
76f6e779c0
commit
27ad85f7a2
|
@ -235,7 +235,8 @@ def rds(account,region):
|
||||||
'cpu':f"{i['cpu']}核",
|
'cpu':f"{i['cpu']}核",
|
||||||
'mem':f"{i['mem']}GB",
|
'mem':f"{i['mem']}GB",
|
||||||
'disk':f"{i['volume']['size']}GB",
|
'disk':f"{i['volume']['size']}GB",
|
||||||
'exp': '-' if i['expiration_time'] == None else i['expiration_time'].split('T')[0]
|
'exp': '-' if i['expiration_time'] == None else i['expiration_time'].split('T')[0],
|
||||||
|
'team': {'team':x.get('value') for x in i['tags'] if x.get('key') == 'team'}.get('team','无')
|
||||||
} for i in info if i['datastore']['type'] == 'MySQL'}
|
} for i in info if i['datastore']['type'] == 'MySQL'}
|
||||||
count = len(rds_dict)
|
count = len(rds_dict)
|
||||||
off,on = sync_rds.w2consul('huaweicloud',account,region,rds_dict)
|
off,on = sync_rds.w2consul('huaweicloud',account,region,rds_dict)
|
||||||
|
|
Loading…
Reference in New Issue