Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KedneckInc opened this issue Oct 22, 2017 · 0 comments
Open

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

KedneckInc opened this issue Oct 22, 2017 · 0 comments

Comments

@KedneckInc
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant