#NEWLINE# def info( ) : #NEWLINE# #INDENT# "\n    Return information about the license, if the license is not\n    correctly activated this will return None.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' license.info\n    " #NEWLINE# cmd = 'cscript C:\\Windows\\System32\\slmgr.vbs /dli' #NEWLINE# out = __salt__ [ 'cmd.run' ] ( cmd ) #NEWLINE# match = re . search ( 'Name: (.*)\\r\\nDescription: (.*)\\r\\nPartial Product Key: (.*)\\r\\nLicense Status: (.*)' , out , re . MULTILINE ) #NEWLINE# if ( match is not None ) : #NEWLINE# #INDENT# groups = match . groups ( ) #NEWLINE# return { #NEWLINE# #INDENT# 'name' : groups [ 0 ] , #NEWLINE# 'description' : groups [ 1 ] , #NEWLINE# 'partial_key' : groups [ 2 ] , #NEWLINE# 'licensed' : ( 'Licensed' in groups [ 3 ] ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# return None