def load_from_conf_data(conf_data):
 cf_splitter = shlex.shlex(conf_data, posix=True)
 cf_splitter.whitespace = ','
 cf_splitter.whitespace_split = True
 attribs = dict((item.split('=') for item in list(cf_splitter)))
 lpar = LPAR()
 for (key, value) in attribs.items():
  try:
   lpar[key] = value
  except exception.PowerVMLPARAttributeNotFound as e:
   LOG.info((_('Encountered unknown LPAR attribute: %s\nContinuing without storing') % key))
 return lpar

def load_from_conf_data ( conf_data ) : cf_splitter = shlex . shlex ( conf_data , posix = True ) cf_splitter . whitespace = ',' cf_splitter . whitespace_split = True attribs = dict ( ( item . split ( '=' ) for item in list ( cf_splitter ) ) ) lpar = LPAR ( ) for ( key , value ) in attribs . items ( ) : try : lpar [ key ] = value except exception . PowerVMLPARAttributeNotFound as e : LOG . info ( ( _ ( 'Encountered unknown LPAR attribute: %s\nContinuing without storing' ) % key ) ) return lpar
lpar configuration data parser .