Update sync_ecs.py
parent
f854e995d0
commit
db191b7c4a
|
@ -77,7 +77,8 @@ def w2consul(vendor,account,region,ecs_dict):
|
||||||
if vendor == 'tencent_cloud' and v['ecstag'] != []:
|
if vendor == 'tencent_cloud' and v['ecstag'] != []:
|
||||||
ecstag_dict = {}
|
ecstag_dict = {}
|
||||||
for ecstag in v['ecstag']:
|
for ecstag in v['ecstag']:
|
||||||
ecstag_dict[ecstag.Key] = ecstag.Value
|
if ecstag.Key.encode().isalnum():
|
||||||
|
ecstag_dict[ecstag.Key] = ecstag.Value
|
||||||
data['Meta'].update(ecstag_dict)
|
data['Meta'].update(ecstag_dict)
|
||||||
|
|
||||||
reg = requests.put(puturl, headers=headers, data=json.dumps(data))
|
reg = requests.put(puturl, headers=headers, data=json.dumps(data))
|
||||||
|
|
Loading…
Reference in New Issue