#NEWLINE# def set_permissions( vhost , user , conf = '.*' , write = '.*' , read = '.*' , runas = None ) : #NEWLINE# #INDENT# "\n    Sets permissions for vhost via rabbitmqctl set_permissions\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' rabbitmq.set_permissions 'myvhost' 'myuser'\n    " #NEWLINE# if ( runas is None ) : #NEWLINE# #INDENT# runas = salt . utils . get_user ( ) #NEWLINE# #UNINDENT# res = __salt__ [ 'cmd.run' ] ( [ 'rabbitmqctl' , 'set_permissions' , '-p' , vhost , user , conf , write , read ] , runas = runas , python_shell = False ) #NEWLINE# msg = 'Permissions Set' #NEWLINE# return _format_response ( res , msg )