You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"file": "URL or path to the JSON file to import.",
1040
-
"bypass-data-validation": "Bypass as much of Nautobot's internal data validation logic as possible, allowing the import of data from NetBox that would be rejected as invalid if entered as-is through the GUI or REST API. USE WITH CAUTION: it is generally more desirable to *take note* of any data validation errors, *correct* the invalid data in NetBox, and *re-import* with the corrected data! (default: False)",
1041
1045
"demo-version": "Version of the demo data to import from `https://github.com/netbox-community/netbox-demo-data/json` instead of using the `--file` option (default: empty).",
1046
+
"test-input": "Version of the test data to import from `nautobot_netbox_importer/tests/fixtures/nautobot-v<value>` instead of using the `--file` option (default: empty).",
1047
+
"bypass-data-validation": "Bypass as much of Nautobot's internal data validation logic as possible, allowing the import of data from NetBox that would be rejected as invalid if entered as-is through the GUI or REST API. USE WITH CAUTION: it is generally more desirable to *take note* of any data validation errors, *correct* the invalid data in NetBox, and *re-import* with the corrected data! (default: False)",
1042
1048
"create-missing-cable-terminations": "Create missing cable terminations as Nautobot requires both cable terminations to be defined to save cable instances.",
1043
1049
"customizations": "Path to a Python module containing customizations to apply during the import. (default: empty)",
1044
1050
"deduplicate-prefixes": "Deduplicate `ipam.prefix` and `ipam.aggregate` from NetBox. `prefix` value will be unique. (default: False)",
"save-json-summary-path": "File path to write the JSON mapping to. (default: generated-mappings.json)",
1049
1055
"save-text-summary-path": "File path to write the text mapping to. (default: generated-mappings.txt)",
1050
1056
"sitegroup-parent-always-region": "When importing `dcim.sitegroup` to `dcim.locationtype`, always set the parent of a site group, to be a `Region` location type. This is a workaround to fix validation errors `'A Location of type Location may only have a Location of the same type as its parent.'`. (default: False)",
1051
-
"update-paths": "Call management command `trace_paths` to update paths after the import. (default: False)",
1052
-
"unrack-zero-uheight-devices": "Cleans the `position` field in `dcim.device` instances with `u_height == 0`. (default: True)",
1053
1057
"tag-issues": "If specified, tag records with any importer issues. (default: '')",
1054
1058
"trace-issues": "Show a detailed trace of issues originated from any `Exception` found during the import.",
1059
+
"unrack-zero-uheight-devices": "Cleans the `position` field in `dcim.device` instances with `u_height == 0`. (default: True)",
1060
+
"update-paths": "Call management command `trace_paths` to update paths after the import. (default: False)",
1055
1061
}
1056
1062
)
1057
1063
defimport_netbox( # noqa: PLR0913
1058
1064
context,
1059
1065
file="",
1060
1066
demo_version="",
1061
-
save_json_summary_path="",
1062
-
save_text_summary_path="",
1067
+
test_input="",
1063
1068
bypass_data_validation=False,
1064
1069
create_missing_cable_terminations=False,
1065
1070
customizations="",
1066
1071
deduplicate_prefixes=False,
1067
1072
dry_run=True,
1068
1073
fix_powerfeed_locations=False,
1069
-
sitegroup_parent_always_region=False,
1070
1074
print_summary=True,
1071
-
update_paths=False,
1072
-
unrack_zero_uheight_devices=True,
1075
+
save_json_summary_path="",
1076
+
save_text_summary_path="",
1077
+
sitegroup_parent_always_region=False,
1073
1078
tag_issues="",
1074
1079
trace_issues=False,
1080
+
unrack_zero_uheight_devices=True,
1081
+
update_paths=False,
1075
1082
):
1076
1083
"""Import NetBox data into Nautobot."""
1077
-
ifdemo_version:
1078
-
iffile:
1079
-
raiseValueError("Cannot specify both, `file` and `demo` arguments")
0 commit comments