Ignore:
Timestamp:
Jan 23, 2012, 9:22:13 AM (13 years ago)
Author:
chronos
Message:
  • Přidáno: Základní modul pro konfiguraci routerů. Na něm závisí moduly pro linux a routeros.
Location:
trunk/Modules/NetworkConfigRouterOS
Files:
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigRouterOS/NetworkConfigRouterOS.php

    r381 r382  
    11<?php
    22
    3 class ModuleNetworkRouterOS extends Module
     3class NetworkFirewall extends Model
    44{
    55  function __construct($Database, $System)
    66  {
    77    parent::__construct($Database, $System);
    8     $this->Name = 'NetworkRouterOS';
     8    $this->Name = 'NetworkFirewall';
     9    $this->AddPropertyOneToMany('NetworkDevice', 'NetworkDevice');
     10    $this->AddPropertyString('SourceInterface');
     11    $this->AddPropertyString('DestinationInterface');
     12    $this->AddPropertyString('SourceAddress');
     13    $this->AddPropertyString('DestinationAddress');
     14    $this->AddPropertyInteger('SourcePort');
     15    $this->AddPropertyInteger('DestinationPort');
     16    $this->AddPropertyString('Action');
     17    $this->AddPropertyString('Comment');
     18  }
     19}
     20
     21class NetworkMark extends Model
     22{
     23  function __construct($Database, $System)
     24  {
     25    parent::__construct($Database, $System);
     26    $this->Name = 'NetworkMark';
     27    $this->AddPropertyString('Comment');
     28  }
     29}
     30
     31class NetworkMangleSubgroup extends Model
     32{
     33  function __construct($Database, $System)
     34  {
     35    parent::__construct($Database, $System);
     36    $this->Name = 'NetworkMangleSubgroup';
     37    $this->AddPropertyString('AddressRange');
     38  }
     39}
     40
     41class ModuleNetworkConfigRouterOS extends Module
     42{
     43  function __construct($Database, $System)
     44  {
     45    parent::__construct($Database, $System);
     46    $this->Name = 'NetworkConfigRouterOS';
    947    $this->Version = '1.0';
    1048    $this->Creator = 'Chronos';
    1149    $this->License = 'GNU/GPL';
    1250    $this->Description = 'Mikrotik RouterOS configuration';
    13     $this->Dependencies = array('Network');
    14     $this->SupportedModels = array();
     51    $this->Dependencies = array('NetworkConfig');
     52    $this->SupportedModels = array('NetworkFirewall', 'NetworkMark',
     53      'NetworkMangeSubgroup');
    1554  }
    1655 
Note: See TracChangeset for help on using the changeset viewer.