l.s.d.policy : module documentation

Part of lp.services.database

Launchpad database policies.
Function storm_cache_factory Return a Storm Cache of the type and size specified in dbconfig.
Function get_connected_store Retrieve a store from the IZStorm Utility and ensure it is connected.
Class BaseDatabasePolicy Base class for database policies.
Class DatabaseBlockedPolicy IDatabasePolicy that blocks all access to the database.
Class MasterDatabasePolicy IDatabasePolicy that selects the MASTER_FLAVOR by default.
Class SlaveDatabasePolicy IDatabasePolicy that selects the SLAVE_FLAVOR by default.
Class SlaveOnlyDatabasePolicy IDatabasePolicy that only allows access to SLAVE_FLAVOR stores.
Function LaunchpadDatabasePolicyFactory Return the Launchpad IDatabasePolicy for the current appserver state.
Class LaunchpadDatabasePolicy Default database policy for web requests.
Function WebServiceDatabasePolicyFactory Return the Launchpad IDatabasePolicy for the current appserver state.
Function _now Return current utc time as a datetime with no timezone info.
def _now():
Return current utc time as a datetime with no timezone info.

This is a global method to allow the test suite to override.

def storm_cache_factory():
Return a Storm Cache of the type and size specified in dbconfig.
def get_connected_store(name, flavor):
Retrieve a store from the IZStorm Utility and ensure it is connected.
Raisesstorm.exceptions.DisconnectionErrorOn failures.
def LaunchpadDatabasePolicyFactory(request):
Return the Launchpad IDatabasePolicy for the current appserver state.
def WebServiceDatabasePolicyFactory(request):
Return the Launchpad IDatabasePolicy for the current appserver state.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.