Skip to content

bug: Object files broken #624

@minitriga

Description

@minitriga

Component

infrahubctl

Infrahub SDK version

1.15.0

Current Behavior

Currently with the following object file:


apiVersion: infrahub.app/v1
kind: Object
spec:
  kind: TemplateDcimDevice
  data:
    # ---------------- Core Router Template ----------------
    - template_name: test-device-template
      device_type: Cisco ASR 1006-X
      role: core
      status: active
      interfaces:
        kind: TemplateInterfacePhysical
        parameters:
          expand_range: true
        data:
          - template_name: t-device-temp_TenGigE0/0/[1-20]
            name: TenGigE0/0/[1-20]
            role: upstream
            index: 1 

the range expansion is not working correctly and fails to expand nested objects.

Expected Behavior

I want to expand the nested objects and I would expect that this works.

Steps to Reproduce

apiVersion: infrahub.app/v1
kind: Object
spec:
  kind: TemplateDcimDevice
  data:
    # ---------------- Core Router Template ----------------
    - template_name: test-device-template
      device_type: Cisco ASR 1006-X
      role: core
      status: active
      interfaces:
        kind: TemplateInterfacePhysical
        parameters:
          expand_range: true
        data:
          - template_name: t-device-temp_TenGigE0/0/[1-20]
            name: TenGigE0/0/[1-20]
            role: upstream
            index: 1 

infrahubctl object load test.yml

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions