Skip to content

yaml output starts off as a list instead of dict #120

@bassslap

Description

@bassslap

Is there a way to remove the '-' or list from the parent dict structure of the yaml output?

ex:

  • r_cfg: <<<<<<<<<--------- Is there an option to not have the '-'?
    protocols:
    bgp:
    groups:
    IBGP:
    R_ASN: '65201'
    local_address: Loopback0
    nbrs:
    - nbr: 10.100.0.1
    - nbr: 10.100.0.2
    - nbr: 10.100.0.3
    L_ASN: '65201'

I would like for it to be as so:
r_cfg:
interfaces:
intf: Loopback0
ip: !!python/object/apply:ipaddress.IPv4Interface
- 10.1.1.1/32
is_loop: true
mask: 255.255.255.255
protocols:
bgp:
groups:
IBGP:
R_ASN: '65201'
local_address: Loopback0
nbrs:
- nbr: 10.100.0.1
- nbr: 10.100.0.2
- nbr: 10.100.0.3
L_ASN: '65201'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions