Revision 9d099698
b/lib/ssconf.py | ||
---|---|---|
186 | 186 |
return master_candidate, drained, offline |
187 | 187 |
|
188 | 188 |
def GetInstanceByLinkIp(self, ip, link): |
189 |
"""Get instance name from its link and ip address. |
|
190 |
|
|
191 |
@type ip: string |
|
192 |
@param ip: ip address |
|
193 |
@type link: string |
|
194 |
@param link: nic link |
|
195 |
@rtype: string |
|
196 |
@return: instance name |
|
197 |
|
|
198 |
""" |
|
189 | 199 |
if not link: |
190 | 200 |
link = self.GetDefaultNicLink() |
191 | 201 |
if not link in self._ip_to_inst_by_link: |
... | ... | |
227 | 237 |
return self._mc_primary_ips |
228 | 238 |
|
229 | 239 |
def GetInstancesIps(self, link): |
240 |
"""Get list of nic ips connected to a certain link. |
|
241 |
|
|
242 |
@type link: string |
|
243 |
@param link: nic link |
|
244 |
@rtype: list |
|
245 |
@return: list of ips connected to that link |
|
246 |
|
|
247 |
""" |
|
230 | 248 |
if not link: |
231 | 249 |
link = self.GetDefaultNicLink() |
232 | 250 |
|
Also available in: Unified diff