Changeset 11553 for trunk

Show
Ignore:
Timestamp:
11/03/08 12:36:46 (2 months ago)
Author:
javier.amor.garcia@…
Message:

untabified file

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/client/services/src/EBox/Services.pm

    r10728 r11553  
    1616# Class: EBox::Services 
    1717# 
    18 #       This class is used to abstract services composed of 
    19 #       protocols and ports. 
    20 # 
    21 #        
     18#       This class is used to abstract services composed of 
     19#       protocols and ports. 
     20# 
     21#        
    2222 
    2323package EBox::Services; 
     
    111111# Method: serviceNames 
    112112# 
    113 #       Fetch all the service identifiers and names 
     113#       Fetch all the service identifiers and names 
    114114# 
    115115# Returns: 
    116116# 
    117 #       Array ref of  hash refs which contain: 
    118 # 
    119 #       'id' - service identifier 
    120 #       'name' service name 
    121 # 
    122 #       Example: 
     117#       Array ref of  hash refs which contain: 
     118# 
     119#       'id' - service identifier 
     120#       'name' service name 
     121# 
     122#       Example: 
    123123#         [ 
    124124#          { 
     
    146146# Method: serviceConfiguration 
    147147# 
    148 #       For a given service identifier it returns its service configuration, 
    149 #       that is, the set of protocols and ports. 
     148#       For a given service identifier it returns its service configuration, 
     149#       that is, the set of protocols and ports. 
    150150# 
    151151# Returns: 
    152152# 
    153 #       Array ref of  hash refs which contain: 
    154 #        
    155 #       protocol - it can take one of these: any, tcp, udp, tcp/udp, grep, icmp 
    156 #       source  - it can take:  
    157 #                       "any" 
    158 #                       An integer from 1 to 65536 -> 22 
    159 #                       Two integers separated by colons -> 22:25  
    160 #       destination - same as source 
    161 # 
    162 #       Example: 
    163 # 
    164 #            'protocol' => 'tcp', 
    165 #            'source' => 'any', 
     153#       Array ref of  hash refs which contain: 
     154#        
     155#       protocol - it can take one of these: any, tcp, udp, tcp/udp, grep, icmp 
     156#       source  - it can take:  
     157#                       "any" 
     158#                       An integer from 1 to 65536 -> 22 
     159#                       Two integers separated by colons -> 22:25  
     160#       destination - same as source 
     161# 
     162#       Example: 
     163# 
     164#            'protocol' => 'tcp', 
     165#            'source' => 'any', 
    166166#       'destination' => '21:22', 
    167167sub serviceConfiguration 
     
    194194# Method: addService  
    195195# 
    196 #   Add a service to the services table  
     196#   Add a service to the services table  
    197197# 
    198198# Parameters: 
     
    202202#   name        - service's name 
    203203#   description - service's description 
    204 #       protocol    - it can take one of these: any, tcp, udp, tcp/udp, grep, icmp 
    205 #       sourcePort  - it can take:  
     204#       protocol    - it can take one of these: any, tcp, udp, tcp/udp, grep, icmp 
     205#       sourcePort  - it can take:  
    206206#                   "any" 
    207207#                    An integer from 1 to 65536 -> 22 
    208208#                   Two integers separated by colons -> 22:25  
    209 #       destinationPort - same as source 
     209#       destinationPort - same as source 
    210210#   internal - boolean, internal services can't be modified from the UI 
    211211#   readOnly - boolean, set the row unremovable from the UI 
    212212#   translationDomain - eBox module domain for i18n 
    213213# 
    214 #       Example: 
     214#       Example: 
    215215# 
    216216#       'name' => 'ssh', 
    217217#       'description' => 'secure shell'. 
    218 #           'protocol' => 'tcp', 
    219 #           'sourcePort' => 'any', 
     218#           'protocol' => 'tcp', 
     219#           'sourcePort' => 'any', 
    220220#       'destinationPort' => '21:22', 
    221221# 
     
    232232# Method: addMultipleService  
    233233# 
    234 #   Add a multi protocol service to the services table   
     234#   Add a multi protocol service to the services table   
    235235# 
    236236# Parameters: 
     
    245245#   services - array ref of hash ref containing: 
    246246# 
    247 #           protocol    - it can take one of these: any, tcp, udp,  
    248 #                                                   tcp/udp, grep, icmp 
    249 #           sourcePort  - it can take:  "any" 
     247#           protocol    - it can take one of these: any, tcp, udp,  
     248#                                                   tcp/udp, grep, icmp 
     249#           sourcePort  - it can take:  "any" 
    250250#                                   An integer from 1 to 65536 -> 22 
    251251#                                   Two integers separated by colons -> 22:25  
    252 #           destinationPort - same as source 
    253 # 
    254 # 
    255 #       Example: 
     252#           destinationPort - same as source 
     253# 
     254# 
     255#       Example: 
    256256# 
    257257#       'name' => 'ssh', 
     
    259259#       'services' => [  
    260260#                       { 
    261 #                               'protocol' => 'tcp', 
    262 #                               'sourcePort' => 'any', 
     261#                               'protocol' => 'tcp', 
     262#                               'sourcePort' => 'any', 
    263263#                           'destinationPort' => '21:22' 
    264264#                        }, 
    265265#                        { 
    266 #                               'protocol' => 'tcp', 
    267 #                               'sourcePort' => 'any', 
     266#                               'protocol' => 'tcp', 
     267#                               'sourcePort' => 'any', 
    268268#                           'destinationPort' => '21:22' 
    269269#                        } 
     
    282282# Method: setService  
    283283# 
    284 #   Set a existing service to the services table         
     284#   Set a existing service to the services table         
    285285# 
    286286# Parameters: 
     
    290290#   name        - service's name 
    291291#   description - service's description 
    292 #       protocol    - it can take one of these: any, tcp, udp, tcp/udp, grep, icmp 
    293 #       sourcePort  - it can take:  
     292#       protocol    - it can take one of these: any, tcp, udp, tcp/udp, grep, icmp 
     293#       sourcePort  - it can take:  
    294294#                   "any" 
    295295#                    An integer from 1 to 65536 -> 22 
    296296#                   Two integers separated by colons -> 22:25  
    297 #       destinationPort - same as source 
     297#       destinationPort - same as source 
    298298#   internal - boolean, internal services can't be modified from the UI 
    299299#   readOnly - boolean, set the row unremovable from the UI 
    300300# 
    301 #       Example: 
     301#       Example: 
    302302# 
    303303#       'name' => 'ssh', 
    304304#       'description' => 'secure shell'. 
    305 #           'protocol' => 'tcp', 
    306 #           'sourcePort' => 'any', 
     305#           'protocol' => 'tcp', 
     306#           'sourcePort' => 'any', 
    307307#       'destinationPort' => '21:22', 
    308308sub setService  
     
    315315# Method: setAdministrationPort 
    316316# 
    317 #       Set administration port on service 
    318 # 
    319 # Parameters: 
    320 # 
    321 #       port - port 
    322 #        
     317#       Set administration port on service 
     318# 
     319# Parameters: 
     320# 
     321#       port - port 
     322#        
    323323sub setAdministrationPort 
    324324{ 
     
    327327    checkPort($port, __("port")); 
    328328 
    329         $self->setService('name' => __d('eBox administration'), 
     329        $self->setService('name' => __d('eBox administration'), 
    330330                'description' => __d('eBox Administration port'), 
    331331                'domain' => __d('ebox-services'), 
     
    340340# Method: availablePort  
    341341# 
    342 #       Check if a given port for a given protocol is available. That is, 
    343 #       no internal service uses it. 
     342#       Check if a given port for a given protocol is available. That is, 
     343#       no internal service uses it. 
    344344# 
    345345# Parameters: 
     
    347347#   (POSITIONAL) 
    348348#   protocol   - it can take one of these: tcp, udp 
    349 #   port           - An integer from 1 to 65536 -> 22 
     349#   port           - An integer from 1 to 65536 -> 22 
    350350# 
    351351# Returns: 
     
    361361# Method: removeService  
    362362# 
    363 #  Remove a service from the  services table     
     363#  Remove a service from the  services table     
    364364# 
    365365# Parameters: