Skip to content

Netbox Device Sync Selection #88

@asergeant01

Description

@asergeant01

Currently, the selection of which devices to sync from netbox is driven from the ClusterImport custom resource.

This resource's most atomic unit is "clusters", whereby the list of devices to sync is extracted from queries and filters on the netbox /api/virtualization/clusters/ api.

In order to provide more flexibility for other use cases, I would purpose changing the atomic unit to "devices", whereby the list of devices to sync is extracted from queries and filters on the netbox /api/dcim/devices/ api.

A purposed CR is supplied for illustrative purposes.

kind: DeviceImport
metadata:
  labels:
    app.kubernetes.io/name: argora
    app.kubernetes.io/managed-by: kustomize
  name: deviceimport-sample
  namespace: argora-system
spec:
  devices:
  - name: "xxx"
    site: "xxx"
    role: "xxx"
    type: "xxx"
    status: "xxx"
    cluster:
       name: "cc-b0-qa-de-1"
       region: "qa-de-1"
       type: "cc-kvm-compute"
    tags:
      - "tag1"
      - "tag2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions