{# SPDX-License-Identifier: Apache-2.0 #} {# Copyright (C) 2025 Marcin Zieba #} {% extends 'base/layout.html' %} {% block title %}Import Profile from YAML{% endblock %} {% block content %}
Import Profile from YAML

Upload a full-profile YAML file (as exported via Export YAML on a profile page). If the profile name already exists, its mappings are updated/merged; otherwise a new profile is created.

{% csrf_token %}
Cancel
Expected YAML format:

adapter_config replaces the profile's stored adapter configuration. It is not merged. An omitted setting resets to the adapter's default.

profile:
  name: My Profile
  source_adapter: flat_workbook
  adapter_config:
    sheet_name: Data
    source_id_column: Id
    custom_field_name: cans_id
    update_existing: true
    create_missing_device_types: true
    preview_view_mode: rows
    capture_extra_data: true
    primary_contact_role: Primary Contact
    primary_contact_lookup_field: email

column_mappings:
  - source_column: Name
    target_field: device_name
  - source_column: Primary Contact
    target_field: candidate:contact
  - source_column: Contact
    target_field: candidate:contact
  - source_column: Contact Number
    target_field: candidate:contact
  - source_column: Owner
    target_field: candidate:contact

class_role_mappings:
  - source_class: Server
    creates_rack: false
    role_slug: server
    ignore: false

device_type_mappings:
  - source_make: Cisco
    source_model: Catalyst 2960X
    netbox_manufacturer_slug: cisco
    netbox_device_type_slug: cisco-catalyst-2960x

manufacturer_mappings:
  - source_make: Dell EMC
    netbox_manufacturer_slug: dell

column_transform_rules:
  - source_column: Name
    pattern: "^(\\w+) - (.+)$"
    group_1_target: asset_tag
    group_2_target: device_name
{% endblock %}