<s> '''<STR_LIT>''' <EOL> from __future__ import absolute_import <EOL> import os <EOL> import re <EOL> import uuid <EOL> import logging <EOL> import salt . utils <EOL> import salt . utils . fsutils <EOL> from salt . exceptions import CommandExecutionError <EOL> import salt . ext . six as six <EOL> log = logging . getLogger ( __name__ ) <EOL> def __virtual__ ( ) : <EOL> '''<STR_LIT>''' <EOL> return not salt . utils . is_windows ( ) and __grains__ . get ( '<STR_LIT>' ) == '<STR_LIT>' <EOL> def version ( ) : <EOL> '''<STR_LIT>''' <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" ) <EOL> if out . get ( '<STR_LIT>' ) : <EOL> raise CommandExecutionError ( out [ '<STR_LIT>' ] ) <EOL> return { '<STR_LIT:version>' : out [ '<STR_LIT>' ] . split ( "<STR_LIT:U+0020>" , <NUM_LIT:1> ) [ - <NUM_LIT:1> ] } <EOL> def _parse_btrfs_info ( data ) : <EOL> '''<STR_LIT>''' <EOL> ret = { } <EOL> for line in [ line for line in data . split ( "<STR_LIT:\n>" ) if line ] [ : - <NUM_LIT:1> ] : <EOL> if line . startswith ( "<STR_LIT>" ) : <EOL> line = re . sub ( r"<STR_LIT>" , "<STR_LIT>" , line ) <EOL> label , uuid_ = [ tkn . strip ( ) for tkn in line . split ( "<STR_LIT>" ) ] <EOL> ret [ '<STR_LIT:label>' ] = label != '<STR_LIT:none>' and label or None <EOL> ret [ '<STR_LIT>' ] = uuid_ <EOL> continue <EOL> if line . startswith ( "<STR_LIT>" ) : <EOL> dev_data = re . split ( r"<STR_LIT>" , line . strip ( ) ) <EOL> dev_id = dev_data [ - <NUM_LIT:1> ] <EOL> ret [ dev_id ] = { <EOL> '<STR_LIT>' : dev_data [ <NUM_LIT:1> ] , <EOL> '<STR_LIT:size>' : dev_data [ <NUM_LIT:3> ] , <EOL> '<STR_LIT>' : dev_data [ <NUM_LIT:5> ] , <EOL> } <EOL> return ret <EOL> def info ( device ) : <EOL> '''<STR_LIT>''' <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( device ) ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> return _parse_btrfs_info ( out [ '<STR_LIT>' ] ) <EOL> def devices ( ) : <EOL> '''<STR_LIT>''' <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> return salt . utils . fsutils . _blkid_output ( out [ '<STR_LIT>' ] , fs_type = '<STR_LIT>' ) <EOL> def _defragment_mountpoint ( mountpoint ) : <EOL> '''<STR_LIT>''' <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( mountpoint ) ) <EOL> return { <EOL> '<STR_LIT>' : mountpoint , <EOL> '<STR_LIT>' : not out [ '<STR_LIT>' ] , <EOL> '<STR_LIT>' : out [ '<STR_LIT>' ] or False , <EOL> '<STR_LIT>' : False , <EOL> } <EOL> def defragment ( path ) : <EOL> '''<STR_LIT>''' <EOL> is_device = salt . utils . fsutils . _is_device ( path ) <EOL> mounts = salt . utils . fsutils . _get_mounts ( "<STR_LIT>" ) <EOL> if is_device and not mounts . get ( path ) : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( path ) ) <EOL> result = [ ] <EOL> if is_device : <EOL> for mount_point in mounts [ path ] : <EOL> result . append ( _defragment_mountpoint ( mount_point [ '<STR_LIT>' ] ) ) <EOL> else : <EOL> is_mountpoint = False <EOL> for mountpoints in six . itervalues ( mounts ) : <EOL> for mpnt in mountpoints : <EOL> if path == mpnt [ '<STR_LIT>' ] : <EOL> is_mountpoint = True <EOL> break <EOL> d_res = _defragment_mountpoint ( path ) <EOL> if not is_mountpoint and not d_res [ '<STR_LIT>' ] and "<STR_LIT>" in d_res [ '<STR_LIT>' ] : <EOL> d_res [ '<STR_LIT>' ] = "<STR_LIT>" <EOL> if not is_mountpoint : <EOL> d_res [ '<STR_LIT>' ] = False <EOL> d_res [ '<STR_LIT>' ] = os . path . exists ( path ) and path or False <EOL> result . append ( d_res ) <EOL> return result <EOL> def features ( ) : <EOL> '''<STR_LIT>''' <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> ret = { } <EOL> for line in [ re . sub ( r"<STR_LIT>" , "<STR_LIT:U+0020>" , line ) for line in out [ '<STR_LIT>' ] . split ( "<STR_LIT:\n>" ) if "<STR_LIT>" in line ] : <EOL> option , description = line . split ( "<STR_LIT>" , <NUM_LIT:1> ) <EOL> ret [ option ] = description <EOL> return ret <EOL> def _usage_overall ( raw ) : <EOL> '''<STR_LIT>''' <EOL> data = { } <EOL> for line in raw . split ( "<STR_LIT:\n>" ) [ <NUM_LIT:1> : ] : <EOL> keyset = [ item . strip ( ) for item in re . sub ( r"<STR_LIT>" , "<STR_LIT:U+0020>" , line ) . split ( "<STR_LIT::>" , <NUM_LIT:1> ) if item . strip ( ) ] <EOL> if len ( keyset ) == <NUM_LIT:2> : <EOL> key = re . sub ( r"<STR_LIT>" , "<STR_LIT>" , keyset [ <NUM_LIT:0> ] ) . replace ( "<STR_LIT:U+0020>" , "<STR_LIT:_>" ) . lower ( ) <EOL> if key in [ '<STR_LIT>' , '<STR_LIT>' ] : <EOL> subk = keyset [ <NUM_LIT:1> ] . split ( "<STR_LIT:(>" ) <EOL> data [ key ] = subk [ <NUM_LIT:0> ] . strip ( ) <EOL> subk = subk [ <NUM_LIT:1> ] . replace ( "<STR_LIT:)>" , "<STR_LIT>" ) . split ( "<STR_LIT>" ) <EOL> data [ "<STR_LIT>" . format ( key , subk [ <NUM_LIT:0> ] ) ] = subk [ <NUM_LIT:1> ] <EOL> else : <EOL> data [ key ] = keyset [ <NUM_LIT:1> ] <EOL> return data <EOL> def _usage_specific ( raw ) : <EOL> '''<STR_LIT>''' <EOL> get_key = lambda val : dict ( [ tuple ( val . split ( "<STR_LIT::>" ) ) , ] ) <EOL> raw = raw . split ( "<STR_LIT:\n>" ) <EOL> section , size , used = raw [ <NUM_LIT:0> ] . split ( "<STR_LIT:U+0020>" ) <EOL> section = section . replace ( "<STR_LIT:U+002C>" , "<STR_LIT:_>" ) . replace ( "<STR_LIT::>" , "<STR_LIT>" ) . lower ( ) <EOL> data = { } <EOL> data [ section ] = { } <EOL> for val in [ size , used ] : <EOL> data [ section ] . update ( get_key ( val . replace ( "<STR_LIT:U+002C>" , "<STR_LIT>" ) ) ) <EOL> for devices in raw [ <NUM_LIT:1> : ] : <EOL> data [ section ] . update ( get_key ( re . sub ( r"<STR_LIT>" , "<STR_LIT::>" , devices . strip ( ) ) ) ) <EOL> return data <EOL> def _usage_unallocated ( raw ) : <EOL> '''<STR_LIT>''' <EOL> ret = { } <EOL> for line in raw . split ( "<STR_LIT:\n>" ) [ <NUM_LIT:1> : ] : <EOL> keyset = re . sub ( r"<STR_LIT>" , "<STR_LIT:U+0020>" , line . strip ( ) ) . split ( "<STR_LIT:U+0020>" ) <EOL> if len ( keyset ) == <NUM_LIT:2> : <EOL> ret [ keyset [ <NUM_LIT:0> ] ] = keyset [ <NUM_LIT:1> ] <EOL> return ret <EOL> def usage ( path ) : <EOL> '''<STR_LIT>''' <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( path ) ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> ret = { } <EOL> for section in out [ '<STR_LIT>' ] . split ( "<STR_LIT>" ) : <EOL> if section . startswith ( "<STR_LIT>" ) : <EOL> ret [ '<STR_LIT>' ] = _usage_overall ( section ) <EOL> elif section . startswith ( "<STR_LIT>" ) : <EOL> ret [ '<STR_LIT>' ] = _usage_unallocated ( section ) <EOL> else : <EOL> ret . update ( _usage_specific ( section ) ) <EOL> return ret <EOL> def mkfs ( * devices , ** kwargs ) : <EOL> '''<STR_LIT>''' <EOL> if not devices : <EOL> raise CommandExecutionError ( "<STR_LIT>" ) <EOL> mounts = salt . utils . fsutils . _get_mounts ( "<STR_LIT>" ) <EOL> for device in devices : <EOL> if mounts . get ( device ) : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( device ) ) <EOL> cmd = [ "<STR_LIT>" ] <EOL> dto = kwargs . get ( "<STR_LIT>" ) <EOL> mto = kwargs . get ( "<STR_LIT>" ) <EOL> if len ( devices ) == <NUM_LIT:1> : <EOL> if dto : <EOL> cmd . append ( "<STR_LIT>" ) <EOL> if mto : <EOL> cmd . append ( "<STR_LIT>" ) <EOL> else : <EOL> if dto : <EOL> cmd . append ( "<STR_LIT>" . format ( dto ) ) <EOL> if mto : <EOL> cmd . append ( "<STR_LIT>" . format ( mto ) ) <EOL> for key , option in [ ( "<STR_LIT>" , "<STR_LIT>" ) , ( "<STR_LIT>" , "<STR_LIT:label>" ) , ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , ( "<STR_LIT>" , "<STR_LIT>" ) , ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) ] : <EOL> if option == '<STR_LIT:label>' and option in kwargs : <EOL> kwargs [ '<STR_LIT:label>' ] = "<STR_LIT>" . format ( kwargs [ "<STR_LIT:label>" ] ) <EOL> if kwargs . get ( option ) : <EOL> cmd . append ( "<STR_LIT>" . format ( key , kwargs . get ( option ) ) ) <EOL> if kwargs . get ( "<STR_LIT>" ) : <EOL> cmd . append ( "<STR_LIT>" . format ( kwargs . get ( "<STR_LIT>" ) is True and uuid . uuid1 ( ) or kwargs . get ( "<STR_LIT>" ) ) ) <EOL> if kwargs . get ( "<STR_LIT>" ) : <EOL> cmd . append ( "<STR_LIT>" ) <EOL> if not kwargs . get ( "<STR_LIT>" ) : <EOL> cmd . append ( "<STR_LIT>" ) <EOL> cmd . extend ( devices ) <EOL> out = __salt__ [ '<STR_LIT>' ] ( '<STR_LIT:U+0020>' . join ( cmd ) ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> ret = { '<STR_LIT>' : out [ '<STR_LIT>' ] } <EOL> ret . update ( __salt__ [ '<STR_LIT>' ] ( devices [ <NUM_LIT:0> ] ) ) <EOL> return ret <EOL> def resize ( mountpoint , size ) : <EOL> '''<STR_LIT>''' <EOL> if size == '<STR_LIT>' : <EOL> if not salt . utils . fsutils . _is_device ( mountpoint ) : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( mountpoint ) ) <EOL> if not salt . utils . fsutils . _get_mounts ( "<STR_LIT>" ) . get ( mountpoint ) : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( mountpoint ) ) <EOL> elif len ( size ) < <NUM_LIT:3> or size [ <NUM_LIT:0> ] not in '<STR_LIT>' or size [ - <NUM_LIT:1> ] not in '<STR_LIT>' or re . sub ( r"<STR_LIT>" , "<STR_LIT>" , size [ <NUM_LIT:1> : ] [ : - <NUM_LIT:1> ] ) : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( size ) ) <EOL> out = __salt__ [ '<STR_LIT>' ] ( '<STR_LIT>' . format ( size , mountpoint ) ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> ret = { '<STR_LIT>' : out [ '<STR_LIT>' ] } <EOL> ret . update ( __salt__ [ '<STR_LIT>' ] ( mountpoint ) ) <EOL> return ret <EOL> def _fsck_ext ( device ) : <EOL> '''<STR_LIT>''' <EOL> msgs = { <EOL> <NUM_LIT:0> : '<STR_LIT>' , <EOL> <NUM_LIT:1> : '<STR_LIT>' , <EOL> <NUM_LIT:2> : '<STR_LIT>' , <EOL> <NUM_LIT:4> : '<STR_LIT>' , <EOL> <NUM_LIT:8> : '<STR_LIT>' , <EOL> <NUM_LIT:16> : '<STR_LIT>' , <EOL> <NUM_LIT:32> : '<STR_LIT>' , <EOL> <NUM_LIT> : '<STR_LIT>' , <EOL> } <EOL> return msgs . get ( __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( device ) ) [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def convert ( device , permanent = False , keeplf = False ) : <EOL> '''<STR_LIT>''' <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> devices = salt . utils . fsutils . _blkid_output ( out [ '<STR_LIT>' ] ) <EOL> if not devices . get ( device ) : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( device ) ) <EOL> if not devices [ device ] [ "<STR_LIT:type>" ] in [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( <EOL> device , devices [ device ] [ "<STR_LIT:type>" ] ) ) <EOL> mountpoint = salt . utils . fsutils . _get_mounts ( devices [ device ] [ "<STR_LIT:type>" ] ) . get ( <EOL> device , [ { '<STR_LIT>' : None } ] ) [ <NUM_LIT:0> ] . get ( '<STR_LIT>' ) <EOL> if mountpoint == '<STR_LIT:/>' : <EOL> raise CommandExecutionError ( """<STR_LIT>""" ) <EOL> salt . utils . fsutils . _verify_run ( __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( device ) ) ) <EOL> ret = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : _fsck_ext ( device ) , <EOL> '<STR_LIT>' : mountpoint , <EOL> '<STR_LIT:type>' : devices [ device ] [ "<STR_LIT:type>" ] , <EOL> } <EOL> } <EOL> salt . utils . fsutils . _verify_run ( __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( device ) ) ) <EOL> salt . utils . fsutils . _verify_run ( __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( device , mountpoint ) ) ) <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> devices = salt . utils . fsutils . _blkid_output ( out [ '<STR_LIT>' ] ) <EOL> ret [ '<STR_LIT>' ] = { <EOL> '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : mountpoint , <EOL> '<STR_LIT:type>' : devices [ device ] [ "<STR_LIT:type>" ] , <EOL> } <EOL> image_path = "<STR_LIT>" . format ( mountpoint ) <EOL> orig_fstype = ret [ '<STR_LIT>' ] [ '<STR_LIT:type>' ] <EOL> if not os . path . exists ( image_path ) : <EOL> raise CommandExecutionError ( <EOL> "<STR_LIT>" . format ( image_path ) ) <EOL> if not permanent : <EOL> ret [ '<STR_LIT>' ] [ '<STR_LIT>' . format ( orig_fstype ) ] = image_path <EOL> ret [ '<STR_LIT>' ] [ '<STR_LIT>' . format ( orig_fstype ) ] = os . popen ( <EOL> "<STR_LIT>" . format ( image_path ) ) . read ( ) . strip ( ) <EOL> else : <EOL> ret [ '<STR_LIT>' ] [ '<STR_LIT>' . format ( orig_fstype ) ] = '<STR_LIT>' <EOL> ret [ '<STR_LIT>' ] [ '<STR_LIT>' . format ( orig_fstype ) ] = '<STR_LIT>' <EOL> salt . utils . fsutils . _verify_run ( __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( image_path ) ) ) <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( mountpoint ) ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> ret [ '<STR_LIT>' ] [ '<STR_LIT>' ] = out [ '<STR_LIT>' ] <EOL> lost_found = "<STR_LIT>" . format ( mountpoint ) <EOL> if os . path . exists ( lost_found ) and not keeplf : <EOL> salt . utils . fsutils . _verify_run ( __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( lost_found ) ) ) <EOL> return ret <EOL> def _restripe ( mountpoint , direction , * devices , ** kwargs ) : <EOL> '''<STR_LIT>''' <EOL> fs_log = [ ] <EOL> if salt . utils . fsutils . _is_device ( mountpoint ) : <EOL> raise CommandExecutionError ( <EOL> "<STR_LIT>" . format ( mountpoint ) ) <EOL> mounted = False <EOL> for device , mntpoints in six . iteritems ( salt . utils . fsutils . _get_mounts ( "<STR_LIT>" ) ) : <EOL> for mntdata in mntpoints : <EOL> if mntdata [ '<STR_LIT>' ] == mountpoint : <EOL> mounted = True <EOL> break <EOL> if not mounted : <EOL> raise CommandExecutionError ( <EOL> "<STR_LIT>" . format ( mountpoint ) ) <EOL> if not devices : <EOL> raise CommandExecutionError ( "<STR_LIT>" ) <EOL> available_devices = __salt__ [ '<STR_LIT>' ] ( ) <EOL> for device in devices : <EOL> if device not in six . iterkeys ( available_devices ) : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( device ) ) <EOL> cmd = [ '<STR_LIT>' . format ( direction ) ] <EOL> for device in devices : <EOL> cmd . append ( device ) <EOL> if direction == '<STR_LIT>' : <EOL> if kwargs . get ( "<STR_LIT>" ) : <EOL> cmd . append ( "<STR_LIT>" ) <EOL> if kwargs . get ( "<STR_LIT>" ) : <EOL> cmd . append ( "<STR_LIT>" ) <EOL> cmd . append ( mountpoint ) <EOL> out = __salt__ [ '<STR_LIT>' ] ( '<STR_LIT:U+0020>' . join ( cmd ) ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> if out [ '<STR_LIT>' ] : <EOL> fs_log . append ( out [ '<STR_LIT>' ] ) <EOL> if direction == '<STR_LIT>' : <EOL> out = None <EOL> data_conversion = kwargs . get ( "<STR_LIT>" ) <EOL> meta_conversion = kwargs . get ( "<STR_LIT>" ) <EOL> if data_conversion and meta_conversion : <EOL> out = __salt__ [ '<STR_LIT>' ] ( <EOL> "<STR_LIT>" . format ( <EOL> data_conversion , meta_conversion , mountpoint ) ) <EOL> else : <EOL> out = __salt__ [ '<STR_LIT>' ] ( "<STR_LIT>" . format ( mountpoint ) ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> if out [ '<STR_LIT>' ] : <EOL> fs_log . append ( out [ '<STR_LIT>' ] ) <EOL> ret = { } <EOL> if fs_log : <EOL> ret . update ( { '<STR_LIT>' : '<STR_LIT:\n>' . join ( fs_log ) } ) <EOL> ret . update ( __salt__ [ '<STR_LIT>' ] ( mountpoint ) ) <EOL> return ret <EOL> def add ( mountpoint , * devices , ** kwargs ) : <EOL> '''<STR_LIT>''' <EOL> return _restripe ( mountpoint , '<STR_LIT>' , * devices , ** kwargs ) <EOL> def delete ( mountpoint , * devices , ** kwargs ) : <EOL> '''<STR_LIT>''' <EOL> return _restripe ( mountpoint , '<STR_LIT>' , * devices , ** kwargs ) <EOL> def _parse_proplist ( data ) : <EOL> '''<STR_LIT>''' <EOL> out = { } <EOL> for line in data . split ( "<STR_LIT:\n>" ) : <EOL> line = re . split ( r"<STR_LIT>" , line , <NUM_LIT:1> ) <EOL> if len ( line ) == <NUM_LIT:2> : <EOL> out [ line [ <NUM_LIT:0> ] ] = line [ <NUM_LIT:1> ] <EOL> return out <EOL> def properties ( obj , type = None , set = None ) : <EOL> '''<STR_LIT>''' <EOL> if type and type not in [ '<STR_LIT:s>' , '<STR_LIT>' , '<STR_LIT:f>' , '<STR_LIT>' , '<STR_LIT:i>' , '<STR_LIT>' , '<STR_LIT:d>' , '<STR_LIT>' ] : <EOL> raise CommandExecutionError ( "<STR_LIT>" . format ( type ) ) <EOL> cmd = [ '<STR_LIT>' ] <EOL> cmd . append ( '<STR_LIT>' ) <EOL> cmd . append ( set and '<STR_LIT>' or '<STR_LIT:list>' ) <EOL> if type : <EOL> cmd . append ( '<STR_LIT>' . format ( type ) ) <EOL> cmd . append ( obj ) <EOL> if set : <EOL> try : <EOL> for key , value in [ [ item . strip ( ) for item in keyset . split ( "<STR_LIT:=>" ) ] <EOL> for keyset in set . split ( "<STR_LIT:U+002C>" ) ] : <EOL> cmd . append ( key ) <EOL> cmd . append ( value ) <EOL> except Exception as ex : <EOL> raise CommandExecutionError ( ex ) <EOL> out = __salt__ [ '<STR_LIT>' ] ( '<STR_LIT:U+0020>' . join ( cmd ) ) <EOL> salt . utils . fsutils . _verify_run ( out ) <EOL> if not set : <EOL> ret = { } <EOL> for prop , descr in six . iteritems ( _parse_proplist ( out [ '<STR_LIT>' ] ) ) : <EOL> ret [ prop ] = { '<STR_LIT:description>' : descr } <EOL> value = __salt__ [ '<STR_LIT>' ] ( <EOL> "<STR_LIT>" . format ( obj , prop ) ) [ '<STR_LIT>' ] <EOL> ret [ prop ] [ '<STR_LIT:value>' ] = value and value . split ( "<STR_LIT:=>" ) [ - <NUM_LIT:1> ] or "<STR_LIT>" <EOL> return ret </s>
