diff --git a/module/sources/vmware/config.py b/module/sources/vmware/config.py index 7e448a2..72ce96a 100644 --- a/module/sources/vmware/config.py +++ b/module/sources/vmware/config.py @@ -415,6 +415,12 @@ def __init__(self): The same behavior also applies for VM disk sizes.""", default_value=True ), + ConfigOption("skip_host_nics", + bool, + description="""Skip creating or updating host physical nics in Netobx. Normal operation + will maintain all phisical nics in netbox. This option will skip this part.""" , + default_value=False + ), # removed settings ConfigOption("netbox_host_device_role", diff --git a/module/sources/vmware/connection.py b/module/sources/vmware/connection.py index 9ab8974..320f267 100644 --- a/module/sources/vmware/connection.py +++ b/module/sources/vmware/connection.py @@ -1707,6 +1707,9 @@ def add_host(self, obj): if len(host_custom_fields) > 0: host_data["custom_fields"] = host_custom_fields + if self.settings.skip_host_nics is True: + return + # iterate over hosts virtual switches, needed to enrich data on physical interfaces self.network_data["vswitch"][name] = dict() for vswitch in grab(obj, "config.network.vswitch", fallback=list()):