package com.yahoo.vespa.hosted.node.admin.task.util.network;

/**
 * Strong type IPv4 and IPv6 with the respective iptables executable.
 *
 * @author smorgrav
 */
public enum IPVersion {

    IPv6("ip6tables"),
    IPv4("iptables");

    IPVersion(String exec) {
        this.exec = exec;
    }

    private String exec;

    String exec() {
        return exec;
    }
}

@@ -97,42 +97,50 @@
 ith 
-the respective iptables executable
+common executables for ip related commands
 .%0A *
@@ -209,16 +209,25 @@
 6tables%22
+, %22ip -6%22
 ),%0A    I
@@ -240,16 +240,22 @@
 ptables%22
+, %22ip%22
 );%0A%0A    
@@ -275,114 +275,287 @@
 ing 
-exec) %7B%0A        this.exec = exec;%0A    %7D%0A%0A    private String exec;%0A%0A    String exec() %7B%0A        return exec
+iptablesCmd, String ipCmd) %7B%0A        this.ipCmd = ipCmd;%0A        this.iptablesCmd = iptablesCmd;%0A    %7D%0A%0A    private String iptablesCmd;%0A    private String ipCmd;%0A%0A    public String iptablesCmd() %7B%0A        return iptablesCmd;%0A    %7D%0A    public String ipCmd() %7B%0A        return ipCmd
 ;%0A  

Rename exec to iptablesCmd and add ipCmd