Skip to content

Instantly share code, notes, and snippets.

View remyleone's full-sized avatar
🥑
Working on { Ansible , Packer , Terraform , CLI, SDKs }

Rémy Léone remyleone

🥑
Working on { Ansible , Packer , Terraform , CLI, SDKs }
View GitHub Profile
class AMQPService(multiprocessing.Process):
"""
Base class for all AMQP components
"""
def __init__(self, **kwargs):
# Global environment variables
super().__init__()
self.exchange = get_from_environment("EXCHANGE_NAME", "amq.topic")
self.amqp_url = get_from_environment("AMQP_URL", 'amqp://guest:guest@localhost')
class AMQPService(multiprocessing.Process):
"""
Base class for all AMQP components
"""
def __init__(self, **kwargs):
# Global environment variables
super().__init__()
self.exchange = get_from_environment("EXCHANGE_NAME", "amq.topic")
self.amqp_url = get_from_environment("AMQP_URL", 'amqp://guest:guest@localhost')
[program:agent]
directory = /home/sieben/workspace/finterop/agent
command = python agent.py connect --url amqp://guest:guest@localhost/
killasgroup = true
stopasgroup = true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
class AMQPService(multiprocessing.Process):
"""
"""
def __init__(self):
# Global environment variables
super().__init__()
self.exchange = get_from_environment("EXCHANGE_NAME", "default")
self.amqp_url = get_from_environment("AMQP_URL", 'amqp://guest:guest@localhost')
import pika
import json
amqp_url = "amqp://P4O590UG:BHU4UOD3@finterop-mq.noc.onelab.eu:443/716e74a6-cecb-4839-8b16-04de2752cde6"
question = {
"_api_version": "0.1.32",
"_type": "testcoordination.step.verify.execute",
"description": "Please execute TD_COAP_CORE_01_v01_step_04",
"node": "coap_client",
import pika
import json
amqp_url = "amqp://P4O590UG:BHU4UOD3@finterop-mq.noc.onelab.eu:443/716e74a6-cecb-4839-8b16-04de2752cde6"
question = {
"_api_version": "0.1.32",
"_type": "testcoordination.step.verify.execute",
"description": "Please execute TD_COAP_CORE_01_v01_step_04",
"node": "coap_client",
import pika
amqp_url = "amqp://P4O590UG:BHU4UOD3@finterop-mq.noc.onelab.eu:443/716e74a6-cecb-4839-8b16-04de2752cde6"
# Open a connection to RabbitMQ on localhost using all default parameters
connection = pika.BlockingConnection(pika.URLParameters(amqp_url))
# Open the channel
channel = connection.channel()
import pika
import multiprocessing
import queue
def notify(message,
amqp_url="amqp://guest:guest@localhost/", mandatory=False, exchange="amq.topic"):
print("Notify {routing_key} with {body}".format(repr=message,
routing_key=message.routing_key,
body=message.to_json()))
- name: Update system-wide packages
raw: apt-get update
- name: Install sudo
raw: apt-get install -y python sudo ca-certificates unzip
- name: Copy wireshark
tags: dissector
get_url:
url: https://github.com/sieben/wireshark/archive/master.zip
#!/usr/bin/env python3
# coding: utf-8
# ip tuntap add argus0 mode tun user sieben
import time
import pdb
import binascii
import json
import fcntl
import os