예제 #1
0
 def _to_balancer(self, obj):
     balancer = LoadBalancer(id=obj['id'],
                             name=obj['name'],
                             state=obj['state'],
                             ip=obj['publicip'],
                             port=obj['publicport'],
                             driver=self.connection.driver)
     balancer.ex_private_port = obj['privateport']
     balancer.ex_public_ip_id = obj['publicipid']
     return balancer
 def _to_balancer(self, obj):
     balancer = LoadBalancer(
         id=obj['id'],
         name=obj['name'],
         state=obj['state'],
         ip=obj['publicip'],
         port=obj['publicport'],
         driver=self.connection.driver
     )
     balancer.ex_private_port = obj['privateport']
     balancer.ex_public_ip_id = obj['publicipid']
     return balancer
예제 #3
0
 def _to_balancer(self, obj):
     balancer = LoadBalancer(
         id=obj["id"],
         name=obj["name"],
         state=self.LB_STATE_MAP.get(obj["state"], State.UNKNOWN),
         ip=obj["publicip"],
         port=obj["publicport"],
         driver=self.connection.driver,
     )
     balancer.ex_private_port = obj["privateport"]
     balancer.ex_public_ip_id = obj["publicipid"]
     return balancer
예제 #4
0
 def _to_balancer(self, obj):
     balancer = LoadBalancer(
         id=obj["id"],
         name=obj["name"],
         state=self.LB_STATE_MAP.get(obj["state"], State.UNKNOWN),
         ip=obj["publicip"],
         port=obj["publicport"],
         driver=self.connection.driver,
     )
     balancer.ex_private_port = obj["privateport"]
     balancer.ex_public_ip_id = obj["publicipid"]
     return balancer