[Zope-CVS] CVS: Packages/SFTPGateway/src/sftpgateway - component.xml:1.1 main.py:1.4 schema.xml:1.4

Fred L. Drake, Jr. fred at zope.com
Tue Dec 23 15:39:48 EST 2003


Update of /cvs-repository/Packages/SFTPGateway/src/sftpgateway
In directory cvs.zope.org:/tmp/cvs-serv10546/src/sftpgateway

Modified Files:
	main.py schema.xml 
Added Files:
	component.xml 
Log Message:
Refactor the configuration schema so we can eventually use zdaemon for the
ctl script.


=== Added File Packages/SFTPGateway/src/sftpgateway/component.xml ===
<component>
  <sectiontype name="sftp-gateway">

    <key name="sftp-server"
         default="localhost:22"
         datatype="inet-address">
      <description>
        Host name and port to which the SFTP server should bind.
      </description>
    </key>

    <key name="ftp-server"
         required="yes"
         datatype="inet-address">
      <description>
        Host name and port of the FTP server.  This can be any FTP
        server; it does not have to be Zope.
      </description>
    </key>

    <key name="private-host-key"
         required="yes">
      <description>
        Path name to the private host key.  This should be the same key
        as used by any other SSH servers on the host platform; many
        clients don't expect to find different host keys used on
        different ports
      </description>
    </key>

    <key name="public-host-key">
      <description>
        Path name to the public host key.  If not specified, the name of
        the private host key with the string '.pub' appended will be
        used.
      </description>
    </key>

    <key name="attribute-cache-lifetime"
         datatype="integer"
         default="0">
      <description>
        SFTP Gateway keeps a cache of file and directory attributes.
        This setting controls how long entries are kept in the cache; it
        is the number of seconds entries can be cached.
        Once an entry has remained in the cache longer than this setting
        allows, it will be dropped and additional requests for those
        attributes will cause them to be loaded from the server.

        A value of 0 (the default) will cause attribute values not to be
        cached.
      </description>
    </key>

  </sectiontype>
</component>


=== Packages/SFTPGateway/src/sftpgateway/main.py 1.3 => 1.4 ===
--- Packages/SFTPGateway/src/sftpgateway/main.py:1.3	Wed Dec 17 14:54:07 2003
+++ Packages/SFTPGateway/src/sftpgateway/main.py	Tue Dec 23 15:39:48 2003
@@ -32,13 +32,13 @@
                 if p in sys.path:
                     sys.path.remove(p)
             sys.path[:0] = path
-        pubkeyfn = self.configroot.public_host_key
+        pubkeyfn = self.public_host_key
         if not pubkeyfn:
             pubkeyfn = self.private_host_key + ".pub"
         self.public_host_key = pubkeyfn
 
     def __getattr__(self, name):
-        return getattr(self.configroot, name)
+        return getattr(self.configroot.gateway, name)
 
 
 def main(argv=None):


=== Packages/SFTPGateway/src/sftpgateway/schema.xml 1.3 => 1.4 ===
--- Packages/SFTPGateway/src/sftpgateway/schema.xml:1.3	Wed Dec 17 14:56:33 2003
+++ Packages/SFTPGateway/src/sftpgateway/schema.xml	Tue Dec 23 15:39:48 2003
@@ -1,21 +1,11 @@
 <schema>
+  <import package="sftpgateway"/>
 
-  <key name="sftp-server"
-       default="localhost:22"
-       datatype="inet-address">
-    <description>
-      Host name and port to which the SFTP server should bind.
-    </description>
-  </key>
-
-  <key name="ftp-server"
-       required="yes"
-       datatype="inet-address">
-    <description>
-      Host name and port of the FTP server.  This can be any FTP
-      server; it does not have to be Zope.
-    </description>
-  </key>
+  <section name="*"
+           type="sftp-gateway"
+           attribute="gateway"
+           required="yes"
+           />
 
   <multikey name="path"
             datatype="string">
@@ -29,39 +19,5 @@
       using this directive doesn't work for you.
     </description>
   </multikey>
-
-  <key name="private-host-key"
-       required="yes">
-    <description>
-      Path name to the private host key.  This should be the same key
-      as used by any other SSH servers on the host platform; many
-      clients don't expect to find different host keys used on
-      different ports
-    </description>
-  </key>
-
-  <key name="public-host-key">
-    <description>
-      Path name to the public host key.  If not specified, the name of
-      the private host key with the string '.pub' appended will be
-      used.
-    </description>
-  </key>
-
-  <key name="attribute-cache-lifetime"
-       datatype="integer"
-       default="0">
-    <description>
-      SFTP Gateway keeps a cache of file and directory attributes.
-      This setting controls how long entries are kept in the cache; it
-      is the number of seconds entries can be cached.
-      Once an entry has remained in the cache longer than this setting
-      allows, it will be dropped and additional requests for those
-      attributes will cause them to be loaded from the server.
-
-      A value of 0 (the default) will cause attribute values not to be
-      cached.
-    </description>
-  </key>
 
 </schema>




More information about the Zope-CVS mailing list