Пример #1
0
    }
    if (count($portMapping->udpPortMap) > 0) {
        $newName = $rule->owner->owner->appOverrideRules->findAvailableName($rule->name(), '');
        $newRule = $rule->owner->owner->appOverrideRules->newAppOverrideRule($newName, $rule->isPreRule());
        if ($rule->sourceIsNegated()) {
            $newRule->setSourceIsNegated(true);
        }
        if ($rule->destinationIsNegated()) {
            $newRule->setDestinationIsNegated(true);
        }
        $newRule->from->copy($rule->from);
        $newRule->to->copy($rule->to);
        $newRule->source->copy($rule->source);
        $newRule->destination->copy($rule->destination);
        $newRule->setUdp();
        $newRule->setPorts($portMapping->udpMappingToText());
        $newRule->setApplication($application);
        if ($context->isAPI) {
            $newRule->API_sync();
        }
        print $context->padding . " - created TCP appOverride rule '{$newRule->name()}'\n";
    }
}, 'args' => array('applicationName' => array('type' => 'string', 'default' => '*nodefault*'), 'restrictToListOfServices' => array('type' => 'string', 'default' => '*sameAsInRule*')));
// </editor-fold>
//TODO add action==move
/************************************ */
PH::processCliArgs();
$nestedQueries = array();
foreach (PH::$args as $index => &$arg) {
    if (!isset($supportedArguments[$index])) {
        if (strpos($index, 'subquery') === 0) {