compose-file icon indicating copy to clipboard operation
compose-file copied to clipboard

warn on network.ipv4_address (and network.ipv6_address)

Open dnephin opened this issue 8 years ago • 1 comments

ipv4/6_address are not supported by swarmkit yet, but we don't warn when they are included in a file.

cc @aanand @vdemeester

dnephin avatar Dec 08 '16 19:12 dnephin

I started working on this in https://github.com/aanand/compose-file/compare/master...dnephin:warn-on-ipv4addr, but it's unfortunately a lot more complicated than it sounds.

We're comparing against the raw config types, so trying to access these nested fields is not easy. We don't even know the structure of the networks value, it could be a list of a map.

I think this code would be easier if we iterated over the reflect.Value instead of the types.Dict. We could even store the "unsupported" fields as struct tags instead of a separate list.

dnephin avatar Dec 08 '16 19:12 dnephin