Skip to content
chanke edited this page Oct 23, 2012 · 11 revisions

Welcome to the afspy wiki!

afspy should/will become comprehensive python bindings to AFS.
Both a low-level procedural API and a high-level service-oriented API are provided.

Architecture :

The two main patterns are Data-Acess-Object and Facade.
The objects (like Volume etc) themselves are empty and are filled by a service using the DAOs.
You get an object by calling a service.

low-level: Data Access Object (DAO-layer)

Talk to openAFS-servers and Clients.

Could be implemented using CTypes and libafsrpc.so and libafsauthent.so, but it is just executing normal shell commands like vos etc. and parses the output.

high-level (services and objects)

Services call different DAO and other services to provide python object representing an entity within AFS.

  • FsServer : returns !fileserver object
  • DBServer : returns DatabaseServer Object.
  • VLDB : provides information about the VLDB
  • PTDB : provides info about PTDB
  • Volume : information about a Volume

Applications

On top of the mid-level, provide services like :

  • Empty a server onto other servers
  • check if all Volumes have a certain number of RO-copies
  • check a server for offline volumes
  • list/remove all volumes by regex
  • BulkCreate Volumes
  • See if all servers actually have all the partitions they should have according to VLDB
  • Get Cell overview

other

  • Filesystem DAO : extends os.file, provides information about status in openAFS