SourceForge.net Logo

CGRU

LinkedIn
Since 1.6.7 (at 2012.12.03) site moved to cgru.info

Afanasy Paths Map


Afanasy has an ability to map paths. Every client can have a paths map file to translate paths to server and from server.

Paths map desribed in pathmap* file(s).

When job constructs (on the client side) all commands and working directories are translated from client to server. When task starts (on the client side) all commands and working directories are translated from server to client. Server does know nothing about paths map.

At first Afanasy searches pathsmap files at home in "~./afanasy/pathmap*", so every user can customize paths. Then in a current directory ".", and every client can have some paths map. And at last in Afanasy root directory "AF_ROOT", which can be the same (network) for everyone during job submission. Each next file append previous paths.

Client read this file(s) each time task starts. If there is no such file(s), or everything in it commented, paths will not be mapped at all.

Paths map file example:


   #     Client:                 Server:

   \\server\projects\          /cg/projects/   

Paths map file syntax:

# : comment
Client path server_path : entry
Last space(s) is separator, so sever path can't contain spaces.
Empty or containing only spaces lines are ignored.
Spaces an the beginning or at the end of line are ignored.
On MS Windows platform client paths changed to lower case.

MS Windows platform issues:

  • When client searches a pattern it converts paths in lower case. So no matter how client wrote a path '\\server\projects\', '\\SERVER\PROJECTS\', '\\SERVER\projects\' or '\\server\PROJECTS\'.
  • All separators in client path are translated to '\' even if application uses Unix slashes. Some applications allows client to use and '\' and '/' slashes, so pattern will be matched in any case, even in mixed slashes.
  • Module (Python Class) can works in 'UnixSeparators' mode. During translation from server to client it uses '\' slashes for client paths. For example NUKE uses only '\' slashes on any platform.

Real working paths map file:


   #     Client:             Server:
   
   P:\tdh\                 /bz/prj/tdh/
   P:\                     /bz/prj/
   \\stor\projects\        /bz/prj/
   \\stor\tdh\             /bz/prj/tdh/
   
   T:\cgru\                /bz/etc/cgru/
   T:\                     /bz/etc/
   \\soft\config\          /bz/etc/
   
   C:\bz\bin\cgru\         /bz/bin/cgru/
   
   # For tests:
   C:\bz\bin\cgru\         /cg/tools/cgru/
   C:\bz\bin\cgru\afanasy\ /cg/tools/cgru/afanasy/trunk/   

Notice that 'tdh' project has two windows shares: '\\stor\projects\tdh' and '\\stor\tdh'. Some windows users have 'STOR' and others have 'stor' as the same fileserver name. And it works!

Since 1.6.7 (at 2012.12.03) site moved to cgru.info
SourceForge.net Project

CGRU

Libre Graphics World