tumblr / collins

groovy kind of love
tumblr.github.com/collins
Apache License 2.0
571 stars 99 forks source link

Creating a new address should not require gateway and netmask #476

Open discordianfish opened 7 years ago

discordianfish commented 7 years ago

When creating a new specific IP via the POST endpoint, it requires to specify gw, netmask and pool beside the address. This seems redundant since the gateway and netmask can be looked up in the pool: https://tumblr.github.io/collins/api.html#api-ipam-update-an-address

Maybe I miss something but I can't see any reason this is required from the user instead of collins looking that up in the configured pools.

byxorna commented 7 years ago

@discordianfish I agree. Would you be interested in making a diff to fix this? (if omitted, determine from pool config, otherwise use user supplied vals?).

discordianfish commented 7 years ago

Same here, not doing anything on bare metal right now. If I end up doing something collins base in the future, I'm happy to pick that up again though.