source: branches/Modular/Modules/NetworkConfigRouterOS/NetworkConfigRouterOS.php@ 424

Last change on this file since 424 was 424, checked in by chronos, 12 years ago
  • Upraveno: Modulární systém přepracován tak, že základní modul System je zodpovědný za udržování stavu instalování modulů v databázi a je instalován samostatně jako první modul. Následně lze instalovat moduly dle závislostí.
File size: 1.7 KB
Line 
1<?php
2
3class NetworkFirewall extends Model
4{
5 function __construct($Database, $System)
6 {
7 parent::__construct($Database, $System);
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';
47 $this->Version = '1.0';
48 $this->Creator = 'Chronos';
49 $this->License = 'GNU/GPL';
50 $this->Description = 'Mikrotik RouterOS configuration';
51 $this->Dependencies = array('NetworkConfig');
52 $this->SupportedModels = array('NetworkFirewall', 'NetworkMark',
53 'NetworkMangleSubgroup');
54 }
55
56 function Install()
57 {
58 parent::Install();
59 }
60
61 function UnInstall()
62 {
63 parent::UnInstall();
64 }
65
66 function Start()
67 {
68 parent::Start();
69 }
70}
71
72?>
Note: See TracBrowser for help on using the repository browser.