Revision 23057d29 lib/confd/querylib.py
b/lib/confd/querylib.py | ||
---|---|---|
143 | 143 |
class InstanceIpToNodePrimaryIpQuery(ConfdQuery): |
144 | 144 |
"""A query for the location of one or more instance's ips. |
145 | 145 |
|
146 |
@type query: string or dict |
|
147 |
@param query: instance ip or dict containing: |
|
148 |
constants.CONFD_REQQ_LINK: nic link (optional) |
|
149 |
constants.CONFD_REQQ_IPLIST: list of ips |
|
150 |
constants.CONFD_REQQ_IP: single ip |
|
151 |
(one IP type request is mandatory) |
|
152 |
@rtype: (integer, ...) |
|
153 |
@return: ((status, answer) or (success, [(status, answer)...]) |
|
154 |
|
|
155 | 146 |
""" |
156 | 147 |
def Exec(self, query): |
157 | 148 |
"""InstanceIpToNodePrimaryIpQuery main execution. |
158 | 149 |
|
150 |
@type query: string or dict |
|
151 |
@param query: instance ip or dict containing: |
|
152 |
constants.CONFD_REQQ_LINK: nic link (optional) |
|
153 |
constants.CONFD_REQQ_IPLIST: list of ips |
|
154 |
constants.CONFD_REQQ_IP: single ip |
|
155 |
(one IP type request is mandatory) |
|
156 |
@rtype: (integer, ...) |
|
157 |
@return: ((status, answer) or (success, [(status, answer)...]) |
|
158 |
|
|
159 | 159 |
""" |
160 | 160 |
if isinstance(query, dict): |
161 | 161 |
if constants.CONFD_REQQ_IP in query: |
Also available in: Unified diff