Skip to content

"network::route" needs to check the length of the arrays #134

@KedneckInc

Description

@KedneckInc

I have route information in yaml, in a format similar to this, but spread across more than one level, so I have to do a 'merge' to get all the information in one spot.

project::network::config:
  ... several other network config sets ...
  networkname:
    ... other network configuration parameters ...
    routes:
      ipaddress:
        - 10.10.0.0
        - 10.20.30.0
      netmask:
        - 255.255.0.0
        - 255.255.255.0
      gateway:
        - 10.10.10.1
        - 10.10.10.1

Unfortunately, every merge that I've attempted uniques the gateway array so that the final output in the route-* file is like this:

ADDRESS0=10.10.0.0
ADDRESS1=10.20.30.0
NETMASK0=255.255.0.0
NETMASK1=255.255.255.0
GATEWAY0=10.10.10.1

At the least, 'network::route' needs to check the length of the arrays it is given, to ensure that they're the same length, to avoid generating a bogus route file.

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