TT#24841 don't return empty strings from IP helper scripts

Change-Id: Ic604bae6d83853746067e8440467ced6e6cefe31
changes/00/19500/1
Richard Fuchs 8 years ago
parent 5eeb478d57
commit 952c57645e

@ -41,6 +41,7 @@ FOREACH host IN hosts.keys.sort;
peer = hosts.$host.peer;
blktmp.processed_hosts.$peer = 1;
FOREACH ip IN hosts.$host.$realiface.advertised_ip;
NEXT UNLESS ip;
out.push(ip);
END;
END;

@ -38,6 +38,7 @@ IF status.item(hosts.${argv.host}.status);
NEXT UNLESS hosts.${argv.host}.$realiface.type.grep('^' _ argv.type _ '$').size();
FOREACH ip IN hosts.${argv.host}.$realiface.advertised_ip;
NEXT UNLESS ip;
out.push(ip);
END;
END;

@ -35,6 +35,7 @@ FOREACH set IN cluster_sets.keys;
FOREACH iface IN hosts.$host.interfaces;
NEXT UNLESS hosts.$host.$iface.cluster_sets.grep('^' _ set _ '$').size();
NEXT UNLESS hosts.$host.$iface.type.grep('^' _ argv.type _ '$').size();
NEXT UNLESS hosts.$host.$iface.ip;
theset.ips.push(hosts.$host.$iface.ip) UNLESS theset.ips.defined(hosts.$host.$iface.ip);
END;
END;

@ -48,6 +48,7 @@ FOREACH set IN cluster_sets.keys;
FOREACH iface IN hosts.$host.interfaces;
NEXT UNLESS hosts.$host.$iface.cluster_sets.grep('^' _ set _ '$').size();
NEXT UNLESS hosts.$host.$iface.type.grep('^' _ argv.type _ '$').size();
NEXT UNLESS hosts.$host.$iface.ip;
theset.ips.push(hosts.$host.$iface.ip) UNLESS theset.ips.defined(hosts.$host.$iface.ip);
END;
END;

@ -41,6 +41,7 @@ FOREACH set IN cluster_sets.keys;
NEXT UNLESS hosts.$host.$iface.type.grep('^' _ argv.type _ '$').size();
blktmp.processed_hosts.$peer = 1;
FOREACH ip IN hosts.$host.$iface.shared_ip;
NEXT UNLESS ip;
theset.ips.push(ip) UNLESS theset.ips.defined(ip);
END;
END;

@ -53,6 +53,7 @@ FOREACH set IN cluster_sets.keys;
NEXT UNLESS hosts.$host.$iface.type.grep('^' _ argv.type _ '$').size();
blktmp.processed_hosts.$peer = 1;
FOREACH ip IN hosts.$host.$iface.shared_ip;
NEXT UNLESS ip;
theset.ips.push(ip) UNLESS theset.ips.defined(ip);
END;
END;

@ -39,6 +39,7 @@ FOREACH host IN hosts.keys.sort;
NEXT IF realiface != iface;
NEXT UNLESS hosts.$host.$realiface.type.grep('^' _ argv.type _ '$').size();
NEXT IF out.grep('^' _ hosts.$host.$realiface.ip _ '$').size();
NEXT UNLESS hosts.$host.$realiface.ip;
out.push({ name = host, ip = hosts.$host.$realiface.ip });
END;

@ -36,6 +36,7 @@ FOREACH host IN hosts.keys;
NEXT IF realiface != iface;
NEXT UNLESS hosts.$host.$realiface.type.grep('^' _ argv.type _ '$').size();
NEXT IF out.grep('^' _ hosts.$host.$realiface.ip _ '$').size();
NEXT UNLESS hosts.$host.$realiface.ip;
out.push(hosts.$host.$realiface.ip);
END;

@ -36,6 +36,7 @@ IF status.item(hosts.${argv.host}.status);
FOREACH realiface IN hosts.${argv.host}.keys;
NEXT IF realiface != iface;
NEXT UNLESS hosts.${argv.host}.$realiface.type.grep('^' _ argv.type _ '$').size();
NEXT UNLESS hosts.${argv.host}.$realiface.ip;
out.push(hosts.${argv.host}.$realiface.ip);
END;

@ -41,6 +41,7 @@ FOREACH host IN hosts.keys.sort;
peer = hosts.$host.peer;
blktmp.processed_hosts.$peer = 1;
FOREACH ip IN hosts.$host.$realiface.shared_ip;
NEXT UNLESS ip;
out.push(ip);
END;
END;

@ -38,6 +38,7 @@ IF status.item(hosts.${argv.host}.status);
NEXT UNLESS hosts.${argv.host}.$realiface.type.grep('^' _ argv.type _ '$').size();
FOREACH ip IN hosts.${argv.host}.$realiface.shared_ip;
NEXT UNLESS ip;
out.push(ip);
END;
END;

@ -50,6 +50,7 @@ FOREACH host IN hosts.keys.sort;
ip = ip.replace('^:', '0:');
ip = ip.replace(':$', ':0');
END;
NEXT UNLESS ip;
out.push(ip);
END;
END;

@ -47,6 +47,7 @@ IF status.item(hosts.${argv.host}.status);
ip = ip.replace('^:', '0:');
ip = ip.replace(':$', ':0');
END;
NEXT UNLESS ip;
out.push(ip);
END;
END;

@ -35,6 +35,7 @@ FOREACH host IN hosts.keys.sort;
FOREACH realiface IN hosts.$host.keys;
NEXT IF realiface != iface;
NEXT UNLESS hosts.$host.$realiface.type.grep('^' _ argv.type _ '$').size();
NEXT UNLESS hosts.$host.$realiface.v6ip;
out.push(hosts.$host.$realiface.v6ip);
END;

Loading…
Cancel
Save