|
@@ -176,11 +176,11 @@ def addBackendServers(slb_id, instance_id):
|
|
|
request.set_BackendServers([{"ServerId": instance_id, "Weight": "0", "Type": "ecs", "ServerIp": ipaddr}])
|
|
|
response = client.do_action_with_exception(request)
|
|
|
logging.info(response)
|
|
|
- for i in range(1, 6):
|
|
|
- time.sleep(5)
|
|
|
- weight = i * 20
|
|
|
- logging.info(f"instance_id: {instance_id}, weight: {weight}")
|
|
|
- setWeight(slb_id=slb_id, instance_id=instance_id, weight=weight)
|
|
|
+ # for i in range(1, 6):
|
|
|
+ # time.sleep(5)
|
|
|
+ # weight = i * 20
|
|
|
+ # logging.info(f"instance_id: {instance_id}, weight: {weight}")
|
|
|
+ # setWeight(slb_id=slb_id, instance_id=instance_id, weight=weight)
|
|
|
|
|
|
|
|
|
def getIpaddr(instance_id):
|