diff --git a/README.md b/README.md index 7dbd9a6..8f982bf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # vCenter NetBox Sync +![Build](https://github.com/synackray/vcenter-netbox-sync/workflows/Build/badge.svg?branch=master) + Exports vCenter objects using the [VMware pyVmomi](https://github.com/vmware/pyvmomi) SDK, transforms them into NetBox objects, and syncs them. ## Principles diff --git a/run.py b/run.py index a099483..35fdac9 100644 --- a/run.py +++ b/run.py @@ -719,7 +719,9 @@ def request(self, req_type, nb_obj_type, data=None, query=None, nb_id=None): "{}/".format(nb_id) if nb_id else "" ) log.debug("Sending %s to '%s'", req_type.upper(), url) - req = getattr(self.nb_session, req_type)(url, json=data, timeout=10) + req = getattr(self.nb_session, req_type)( + url, json=data, timeout=10, verify=(not settings.NB_INSECURE_TLS) + ) # Parse status if req.status_code == 200: log.debug( diff --git a/settings.example.py b/settings.example.py index 5380491..d99c34e 100644 --- a/settings.example.py +++ b/settings.example.py @@ -21,6 +21,7 @@ NB_API_KEY = "" # NetBox API Key NB_DISABLE_TLS = False # Disables SSL/TLS and uses HTTP for requests. Not ever recommended. NB_FQDN = "netbox.example.com" # The fully qualified domain name to reach NetBox +NB_INSECURE_TLS = False # Leverage SSL/TLS but ignore certificate errors (ex. expired, untrusted) NB_PORT = 443 # [optional] NetBox port to connect to if changed from the default NB_PRUNE_ENABLED = True # Automatically orphan and delete objects if they are no longer in their source system NB_PRUNE_DELAY_DAYS = 0 # How many days should we wait before pruning an orphaned object