Return-Path: <fernando@ssf.com.mx>
Delivered-To: luisma@ssf.com.mx
Received: from vishnu.hosting-mexico.net
	by vishnu.hosting-mexico.net (Dovecot) with LMTP id GTeZEo1V7VdtLAkArLfOng
	for <luisma@ssf.com.mx>; Thu, 29 Sep 2016 12:55:25 -0500
Return-path: <fernando@ssf.com.mx>
Envelope-to: luisma@ssf.com.mx
Delivery-date: Thu, 29 Sep 2016 12:55:25 -0500
Received: from fixed-189-247-187-189-247-127.iusacell.net ([187.189.247.127]:2535 helo=[192.168.1.9])
	by vishnu.hosting-mexico.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
	(Exim 4.87)
	(envelope-from <fernando@ssf.com.mx>)
	id 1bpfYH-002WPv-Qs
	for luisma@ssf.com.mx; Thu, 29 Sep 2016 12:55:23 -0500
Subject: CrearColas
References: <549ee7d2-74b1-9ebf-b97a-1e931e0c2589@ssf.com.mx>
To: luisma@ssf.com.mx
From: Fernando <fernando@ssf.com.mx>
X-Forwarded-Message-Id: <549ee7d2-74b1-9ebf-b97a-1e931e0c2589@ssf.com.mx>
Message-ID: <09f68d03-afeb-95ff-cffd-1fa901f4e8d6@ssf.com.mx>
Date: Thu, 29 Sep 2016 12:54:33 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.3.0
MIME-Version: 1.0
In-Reply-To: <549ee7d2-74b1-9ebf-b97a-1e931e0c2589@ssf.com.mx>
Content-Type: multipart/mixed;
 boundary="------------01B31D79F2D64DAB6B3FACB2"

This is a multi-part message in MIME format.
--------------01B31D79F2D64DAB6B3FACB2
Content-Type: multipart/alternative;
 boundary="------------9CFD7FCD5A1881B67E74F55C"


--------------9CFD7FCD5A1881B67E74F55C
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit




-------- Mensaje reenviado --------
Asunto: 	CrearColas
Fecha: 	Thu, 29 Sep 2016 12:35:54 -0500
De: 	Angel <luisangel@ssf.com.mx>
A: 	fernando@ssf.com.mx




--------------9CFD7FCD5A1881B67E74F55C
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 7bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <div class="moz-forward-container"><br>
      <br>
      -------- Mensaje reenviado --------
      <table class="moz-email-headers-table" border="0" cellpadding="0"
        cellspacing="0">
        <tbody>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Asunto:
            </th>
            <td>CrearColas</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Fecha: </th>
            <td>Thu, 29 Sep 2016 12:35:54 -0500</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">De: </th>
            <td>Angel <a class="moz-txt-link-rfc2396E" href="mailto:luisangel@ssf.com.mx">&lt;luisangel@ssf.com.mx&gt;</a></td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">A: </th>
            <td><a class="moz-txt-link-abbreviated" href="mailto:fernando@ssf.com.mx">fernando@ssf.com.mx</a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <pre>
</pre>
    </div>
  </body>
</html>

--------------9CFD7FCD5A1881B67E74F55C--

--------------01B31D79F2D64DAB6B3FACB2
Content-Type: text/x-python;
 name="ColasLinkey.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="ColasLinkey.py"

import os
import requests
import re
import subprocess
import socket
import re




def OQuees(nameCola):
    print("########Creando Colas########")
    cmd = "rabbitmqadmin declare queue name=PushPersistentQueue_%s durable=true " % (nameCola)
    print (cmd)
    os.system(cmd)
    cmd = "rabbitmqadmin declare binding source=scgasparExchange destination=PushPersistentQueue_%s routing_key=PushPersistentQueueBroadcast" % (nameCola)
    os.system(cmd)
    cmd = "rabbitmqadmin declare binding source=scgasparExchange destination=PushPersistentQueue_%s routing_key=PushPersistentQueue_%s" % (nameCola,nameCola)
    print (cmd)
    os.system(cmd)
    cmd = 'rabbitmqadmin declare queue name=PushVolatileQueue_%s durable=true arguments="{\\"x-message-ttl\\":5000}" ' % (nameCola)
    os.system(cmd)
    cmd = "rabbitmqadmin declare binding source=scgasparExchange destination=PushVolatileQueue_%s routing_key=PushVolatileQueueBroadcast" % (nameCola)
    os.system(cmd)
    cmd = "rabbitmqadmin declare binding source=scgasparExchange destination=PushVolatileQueue_%s routing_key=PushVolatileQueue_%s" % (nameCola,nameCola)
    os.system(cmd)


if __name__ == "__main__":

    print("########Copiar colas de Rabbit-MQ########")
    nameCola= raw_input ("\nInserte el linkey de la cola\n")
    OQuees(nameCola)
    

--------------01B31D79F2D64DAB6B3FACB2--
