def get_plug_point_class_instances():
 global pp_class_instances
 if (pp_class_instances is None):
  pp_class_instances = []
  pp_classes = []
  try:
   slps = resources.global_env().get_stack_lifecycle_plugins()
   pp_classes = [cls for (name, cls) in slps]
  except Exception:
   LOG.exception(_LE('failed to get lifecycle plug point classes'))
  for ppc in pp_classes:
   try:
    pp_class_instances.append(ppc())
   except Exception:
    LOG.exception(_LE('failed to instantiate stack lifecycle class %s'), ppc)
  try:
   pp_class_instances = sorted(pp_class_instances, key=(lambda ppci: ppci.get_ordinal()))
  except Exception:
   LOG.exception(_LE('failed to sort lifecycle plug point classes'))
 return pp_class_instances

def get_plug_point_class_instances ( ) : global pp_class_instances if ( pp_class_instances is None ) : pp_class_instances = [ ] pp_classes = [ ] try : slps = resources . global_env ( ) . get_stack_lifecycle_plugins ( ) pp_classes = [ cls for ( name , cls ) in slps ] except Exception : LOG . exception ( _LE ( 'failed to get lifecycle plug point classes' ) ) for ppc in pp_classes : try : pp_class_instances . append ( ppc ( ) ) except Exception : LOG . exception ( _LE ( 'failed to instantiate stack lifecycle class %s' ) , ppc ) try : pp_class_instances = sorted ( pp_class_instances , key = ( lambda ppci : ppci . get_ordinal ( ) ) ) except Exception : LOG . exception ( _LE ( 'failed to sort lifecycle plug point classes' ) ) return pp_class_instances
instances of classes that implements pre/post stack operation methods .