[re2o_lookup] Fix typo.
parent
4319ab1a88
commit
0e1e93fe3c
|
@ -749,15 +749,15 @@ class LookupModule(LookupBase):
|
||||||
|
|
||||||
def _get_prefix(self, api_client, subnet_name):
|
def _get_prefix(self, api_client, subnet_name):
|
||||||
prefixv6 = None
|
prefixv6 = None
|
||||||
if self._is_cached(subnet_name):
|
if self._is_cached(subnet_name + '_v6'):
|
||||||
display.vvv("Found subnet {} in cache.".format(subnet_name))
|
display.vvv("Found subnet {} in cache.".format(subnet_name))
|
||||||
prefixv6 = self._get_cache(subnet_name)
|
prefixv6 = self._get_cache(subnet_name + '_v6')
|
||||||
else:
|
else:
|
||||||
Mtypes = self._rawquery(api_client, 'machines/iptype')
|
Mtypes = self._rawquery(api_client, 'machines/iptype')
|
||||||
iptype = list(filter(lambda x: x['type'] == subnet_name, Mtypes))
|
iptype = list(filter(lambda x: x['type'] == subnet_name, Mtypes))
|
||||||
prefixv6 = iptype[0]['prefix_v6'] + '/64'
|
prefixv6 = iptype[0]['prefix_v6'] + '/64'
|
||||||
display.vvv("Storing subnet {} in cache".format(subnet_name))
|
display.vvv("Storing subnet {} in cache".format(subnet_name))
|
||||||
self._set_cache(subnet_name, prefixv6)
|
self._set_cache(subnet_name + '_v6', prefixv6)
|
||||||
return prefixv6
|
return prefixv6
|
||||||
|
|
||||||
def _get_cidrs(self, api_client, subnet_name):
|
def _get_cidrs(self, api_client, subnet_name):
|
||||||
|
|
Loading…
Reference in New Issue