File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,20 @@ def get_lbaas_uuid_id(self, identifier):
100100 this_lb = self .lbaas .getLoadBalancer (identifier , mask = "mask[id,uuid]" )
101101 else :
102102 this_lb = self .lbaas .getObject (id = identifier , mask = "mask[id,uuid]" )
103- return this_lb ['uuid' ], this_lb ['id' ]
103+ return this_lb .get ('uuid' ), this_lb .get ('id' )
104+
105+ def get_lbaas_by_address (self , address ):
106+ """Gets a LBaaS by address.
107+
108+ :param address: Address of the LBaaS instance
109+ """
110+ this_lb = {}
111+ this_lbs = self .lbaas .getAllObjects ()
112+ for lbaas in this_lbs :
113+ if lbaas .get ('address' ) == address :
114+ this_lb = lbaas
115+ break
116+ return this_lb
104117
105118 def delete_lb_member (self , identifier , member_id ):
106119 """Removes a member from a LBaaS instance
You can’t perform that action at this time.
0 commit comments