can't able to creat LoadBalancer
GOPIPACHA opened this issue · 3 comments
Hi All,
I am trying to creaye the loadbalancer from quitre long time but i am getting Traceback error.Below is my sample python code for creating LB,
import digitalocean
droplet = digitalocean.LoadBalancer(token="API- Token",
name= 'check',
region= 'BLR1'
forwarding_rules= ['entry_protocol:http',
'entry_port:80',
'target_protocol:http',
'target_port:80']))
droplet.create()
when i try to execute the above code i am getting error like below
'''
Traceback (most recent call last):
File "/home/mypathshala-1/PycharmProjects/digital_ocen/LB.py", line 9, in
lb.create()
File "/home/mypathshala-1/PycharmProjects/digital_ocen/venv/lib/python3.7/site-packages/digitalocean/LoadBalancer.py", line 210, in create
rules_dict = [rule.dict for rule in self.forwarding_rules]
File "/home/mypathshala-1/PycharmProjects/digital_ocen/venv/lib/python3.7/site-packages/digitalocean/LoadBalancer.py", line 210, in
rules_dict = [rule.dict for rule in self.forwarding_rules]
AttributeError: 'str' object has no attribute 'dict'
Can anyone help me out how can create a LoadBalancer and how can i add a droplet to it?
Thanks in advance.
Can annyone help me out on this issue please
Will i get any responce ?
Hi, sorry for the late (super late) reply.
Check how to create new rules from this guide. I do believe that it could have been the issue!
Closing as it has been a long time since the last update, but if anything: please feel free to re-open the issue!