def get_power_types():
 power_types = []
 power_template = re.compile('fence_(.*)')
 fence_files = (glob.glob('/usr/sbin/fence_*') + glob.glob('/sbin/fence_*'))
 for x in fence_files:
  templated_x = power_template.search(x).group(1)
  if (templated_x not in power_types):
   power_types.append(templated_x)
 power_types.sort()
 return power_types

def get_power_types ( ) : power_types = [ ] power_template = re . compile ( 'fence_(.*)' ) fence_files = ( glob . glob ( '/usr/sbin/fence_*' ) + glob . glob ( '/sbin/fence_*' ) ) for x in fence_files : templated_x = power_template . search ( x ) . group ( 1 ) if ( templated_x not in power_types ) : power_types . append ( templated_x ) power_types . sort ( ) return power_types
get possible power management types @return list possible power management types .