/* $XORP */

test {
    %command: "" %help: HELP;
    /*
     * TODO: XXX: Remove the "policy" dependency if the "test" node is
     * needed by some other module.
     */
    %module: policy;
    %tag: HELP "Test operation";
}

test policy {
    %command: "" %help: HELP;
    %module: policy;
    %tag: HELP "Test routing policies";
}

test policy $(policy.policy-statement.*) {
    %command: "" %help: HELP;
    %module: policy;
    %tag: HELP "Test a routing policy";
}

test policy $(policy.policy-statement.*) <prefix> {
    %command: "cli_send_processor_xrl -t policy -- test $3 $4" %help: HELP;
    %module: policy;
    %tag: HELP "Test a routing policy on a prefix";
}

test policy $(policy.policy-statement.*) <prefix> <route attributes> {
    %command: "cli_send_processor_xrl -t policy -- test $3 $4 $5" %help: HELP;
    %module: policy;
    %tag: HELP "Test a routing policy on a prefix and route attribute";
}

show policy {
    %command: "" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy information";
}

show policy network4-list {
    %command: "cli_send_processor_xrl -t policy -- show set_ipv4net" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy network4 lists";
}

show policy network4-list $(policy.network4-list.*) {
    %command: "cli_send_processor_xrl -t policy -- show set_ipv4net $4" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy network4 list";
}

show policy network6-list {
    %command: "cli_send_processor_xrl -t policy -- show set_ipv6net" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy network6 lists";
}

show policy network6-list $(policy.network6-list.*) {
    %command: "cli_send_processor_xrl -t policy -- show set_ipv6net $4" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy network6 list";
}

show policy community-list {
    %command: "cli_send_processor_xrl -t policy -- show set_com32" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy community lists";
}

show policy community-list $(policy.community-list.*) {
    %command: "cli_send_processor_xrl -t policy -- show set_com32 $4" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy community list";
}

show policy as-path-list {
    %command: "cli_send_processor_xrl -t policy -- show set_str" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy AS path lists";
}

show policy as-path-list $(policy.as-path-list.*) {
    %command: "cli_send_processor_xrl -t policy -- show set_str $4" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy AS path list";
}

show policy policy-statement {
    %command: "cli_send_processor_xrl -t policy -- show policy-statement" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy statements";
}

show policy policy-statement $(policy.policy-statement.*) {
    %command: "cli_send_processor_xrl -t policy -- show policy-statement $4" %help: HELP;
    %module: policy;
    %tag: HELP "Show policy statement";
}
