src/pyams_utils/interfaces/zeo.py
branchdev-tf
changeset 427 63284c98cdc1
parent 292 b338586588ad
equal deleted inserted replaced
426:2022e4da3ad9 427:63284c98cdc1
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
    10 # FOR A PARTICULAR PURPOSE.
    10 # FOR A PARTICULAR PURPOSE.
    11 #
    11 #
    12 
    12 
    13 __docformat__ = 'restructuredtext'
    13 """PyAMS_utils.interfaces.zeo module
       
    14 
       
    15 This module provides interface definition for a ZEO connection
       
    16 """
       
    17 
       
    18 from zope.interface import Attribute, Interface
       
    19 from zope.schema import Bool, Int, Password, TextLine
    14 
    20 
    15 
    21 
    16 # import standard library
    22 __docformat__ = 'restructuredtext'
    17 
       
    18 # import interfaces
       
    19 
       
    20 # import packages
       
    21 from zope.interface import Interface, Attribute
       
    22 from zope.schema import TextLine, Int, Password, Bool
       
    23 
    23 
    24 from pyams_utils import _
    24 from pyams_utils import _
    25 
    25 
    26 
    26 
    27 class IZEOConnection(Interface):
    27 class IZEOConnection(Interface):
    49     username = TextLine(title=_("ZEO user name"),
    49     username = TextLine(title=_("ZEO user name"),
    50                         description=_("User name on ZEO server; only for ZEO server before 5.0"),
    50                         description=_("User name on ZEO server; only for ZEO server before 5.0"),
    51                         required=False)
    51                         required=False)
    52 
    52 
    53     password = Password(title=_("ZEO password"),
    53     password = Password(title=_("ZEO password"),
    54                         description=_("User password on ZEO server; only for ZEO server before 5.0"),
    54                         description=_(
       
    55                             "User password on ZEO server; only for ZEO server before 5.0"),
    55                         required=False)
    56                         required=False)
    56 
    57 
    57     server_realm = TextLine(title=_("ZEO server realm"),
    58     server_realm = TextLine(title=_("ZEO server realm"),
    58                             description=_("Realm name on ZEO server; only for ZEO server before 5.0"),
    59                             description=_(
       
    60                                 "Realm name on ZEO server; only for ZEO server before 5.0"),
    59                             required=False)
    61                             required=False)
    60 
    62 
    61     blob_dir = TextLine(title=_("BLOBs directory"),
    63     blob_dir = TextLine(title=_("BLOBs directory"),
    62                         description=_("Directory path for blob data"),
    64                         description=_("Directory path for blob data"),
    63                         required=False)
    65                         required=False)
    64 
    66 
    65     shared_blob_dir = Bool(title=_("Shared BLOBs directory ?"),
    67     shared_blob_dir = Bool(title=_("Shared BLOBs directory ?"),
    66                            description=_("""Flag whether the blob_dir is a server-shared filesystem """
    68                            description=_(
    67                                          """that should be used instead of transferring blob data over zrpc."""),
    69                                "Flag whether the blob_dir is a server-shared filesystem "
       
    70                                "that should be used instead of transferring blob data over zrpc."),
    68                            required=True,
    71                            required=True,
    69                            default=False)
    72                            default=False)
    70 
    73 
    71     connection = Attribute(_("Opened ZEO connection"))
    74     connection = Attribute(_("Opened ZEO connection"))
    72 
    75