Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Commit

Permalink
Promote README changes allow insecure TLS (#30)
Browse files Browse the repository at this point in the history
* Added insecure TLS option for untrusted certs for #27 (#28)

* Updated README with GitHub Actions button (#29)

* Added build badge to readme

* Changed build graphic to master
  • Loading branch information
synackray authored Jan 6, 2020
1 parent d7683f5 commit 8e15612
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions settings.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8e15612

Please sign in to comment.