def parse_service_definition_opt():
 results = []
 svc_def_opt = cfg.CONF.DEFAULT_SERVICETYPE.service_definition
 try:
  for svc_def_str in svc_def_opt:
   split = svc_def_str.split(':')
   svc_def = {'service_class': split[0], 'plugin': split[1]}
   try:
    svc_def['driver'] = split[2]
   except IndexError:
    LOG.debug(_('Default service type - no driver for service %(service_class)s and plugin %(plugin)s'), svc_def)
   results.append(svc_def)
  return results
 except (TypeError, IndexError):
  raise q_exc.InvalidConfigurationOption(opt_name='service_definition', opt_value=svc_def_opt)

def parse_service_definition_opt ( ) : results = [ ] svc_def_opt = cfg . CONF . DEFAULT_SERVICETYPE . service_definition try : for svc_def_str in svc_def_opt : split = svc_def_str . split ( ':' ) svc_def = { 'service_class' : split [ 0 ] , 'plugin' : split [ 1 ] } try : svc_def [ 'driver' ] = split [ 2 ] except IndexError : LOG . debug ( _ ( 'Default service type - no driver for service %(service_class)s and plugin %(plugin)s' ) , svc_def ) results . append ( svc_def ) return results except ( TypeError , IndexError ) : raise q_exc . InvalidConfigurationOption ( opt_name = 'service_definition' , opt_value = svc_def_opt )
parse service definition opts and returns result .