First commit and first version of the add-on

This commit is contained in:
zxBCN Gallego_Izquierdo
2024-05-31 14:07:19 +02:00
commit 1094b4458d
423 changed files with 130141 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import requests
from requests.auth import HTTPBasicAuth
class MenMiceQuery():
base_url = "https://ipam.eu.boehringer.com/mmws/api/IPAMRecords"
#base_url = "https://10.183.177.24/mmws/api"
def run_query(self, username, password, ip):
response = requests.get(f'{self.base_url}/{ip}/Range', auth=HTTPBasicAuth(username, password), verify=False)
if response.ok:
return response.json()
else:
print(response.json())
raise Exception(f"Error detected: {response.status_code}")