...
|
...
|
@@ -22,7 +22,7 @@ import time, sys, os |
|
|
demo:
|
|
|
|
|
|
|
|
|
lbswitch = LBSwitch(secretId="AKID6dwpKadiQgbDpXDtyNhppIHPO5qPv5GK", secretKey="ACJkH9mg0DBA1PYpf0E7f3g534wBsQaW",
|
|
|
lbswitch = LBSwitch(secretId="AKID6dwppIHPO5qPv5GK", secretKey="ACJkH9mg0DBsQaW",
|
|
|
az1_lb_id="lb-dyh6eucn", az2_lb_id="lb-capto5b5", az3_lb_id="lb-capto5b5", az1_innerlb_id="lb-c26tgo5r")
|
|
|
|
|
|
# 全部流量切换到AZ1
|
...
|
...
|
@@ -185,12 +185,5 @@ class LBSwitch: |
|
|
|
|
|
|
|
|
|
|
|
lbswitch = LBSwitch(secretId="AKID6dwpKadiQgbDpXDtyNhppIHPO5qPv5GK", secretKey="ACJkH9mg0DBA1PYpf0E7f3g534wBsQaW",
|
|
|
az1_lb_id="lb-dyh6eucn", az2_lb_id="lb-capto5b5", az3_lb_id="lb-capto5b5", az1_innerlb_id="lb-c26tgo5r")
|
|
|
|
|
|
#ret = lbswitch.modify_clb_weight(lb_id="lb-e14oxiq3", ip_weight_dict={"10.66.104.15": 10, "10.66.104.13":20})
|
|
|
#ret = lbswitch.modify_alb_weight(lb_id="lb-fodpm611", domain="*.yoho.cn", ip_weight_dict={"10.66.0.2": 10, "10.66.0.3": 10})
|
|
|
#ret = lbswitch.all_to_az1()
|
|
|
ret = lbswitch.all_to_az2()
|
|
|
print ret
|
|
|
|
...
|
...
|
|