华为云RDS会采集标签名为'team'的标签

pull/122/head
StarsL.cn 2023-11-01 16:06:16 +08:00 committed by GitHub
parent 76f6e779c0
commit 27ad85f7a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -235,7 +235,8 @@ def rds(account,region):
'cpu':f"{i['cpu']}",
'mem':f"{i['mem']}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'}
count = len(rds_dict)
off,on = sync_rds.w2consul('huaweicloud',account,region,rds_dict)