mirror of
https://github.com/jbowdre/phpIPAM-for-vRA8.git
synced 2024-11-23 23:42:20 +00:00
fix inverted logic in gateway check (#3)
This commit is contained in:
parent
6a042450f9
commit
625739bd31
3 changed files with 5 additions and 2 deletions
2
pom.xml
2
pom.xml
|
@ -23,7 +23,7 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
|
||||||
<properties>
|
<properties>
|
||||||
<provider.name>phpIPAM</provider.name>
|
<provider.name>phpIPAM</provider.name>
|
||||||
<provider.description>phpIPAM integration for vRA</provider.description>
|
<provider.description>phpIPAM integration for vRA</provider.description>
|
||||||
<provider.version>1.0.7</provider.version>
|
<provider.version>1.0.8</provider.version>
|
||||||
|
|
||||||
<provider.supportsAddressSpaces>false</provider.supportsAddressSpaces>
|
<provider.supportsAddressSpaces>false</provider.supportsAddressSpaces>
|
||||||
<provider.supportsUpdateRecord>true</provider.supportsUpdateRecord>
|
<provider.supportsUpdateRecord>true</provider.supportsUpdateRecord>
|
||||||
|
|
|
@ -93,7 +93,7 @@ def do_get_ip_ranges(self, auth_credentials, cert):
|
||||||
ipRange['dnsServerAddresses'] = []
|
ipRange['dnsServerAddresses'] = []
|
||||||
# try to get the address marked as the gateway in IPAM
|
# try to get the address marked as the gateway in IPAM
|
||||||
gw_req = requests.get(f"{subnet_uri}/{subnet['id']}/addresses/?filter_by=is_gateway&filter_value=1", headers=token, verify=cert)
|
gw_req = requests.get(f"{subnet_uri}/{subnet['id']}/addresses/?filter_by=is_gateway&filter_value=1", headers=token, verify=cert)
|
||||||
if gw_req.status_code == 200 and not 'data' in gw_req.json():
|
if gw_req.status_code == 200 and 'data' in gw_req.json():
|
||||||
gateway = gw_req.json()['data'][0]['ip']
|
gateway = gw_req.json()['data'][0]['ip']
|
||||||
ipRange['gatewayAddress'] = gateway
|
ipRange['gatewayAddress'] = gateway
|
||||||
logging.debug(ipRange)
|
logging.debug(ipRange)
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# v1.0.8
|
||||||
|
Fix gateway check logic
|
||||||
|
|
||||||
# v1.0.7
|
# v1.0.7
|
||||||
Enable optional custom subnet filter
|
Enable optional custom subnet filter
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue