mgr/orch: improve commandline parsing
We have to parse options like hostname, network and optional name
Examples:
"myhost"
"myhost=name"
"myhost:1.2.3.4"
"myhost:1.2.3.4=name"
"myhost:1.2.3.0/24"
"myhost:1.2.3.4/24=name"
"myhost:v2:1.2.3.4:3000/24=name"
"myhost:v2:1.2.3.4:3000,v1:1.2.3.4:6789/24=name"
This patch improves the durability of the code by using
regexes and adds validations for ip_addresses and subnets.
This will now also act as the single parser for all inputs.
Signed-off-by: Joshua Schmid <jschmid@suse.de>
(cherry picked from commit
4812167228813adc2fa45ff502257ca38ed53530)