Пример #1
0
 def get(self):
     status = 200
     log_monitor.install()
     log_monitor.get_rasps_from_csv()
     log_monitor.get_stacks_from_csv()
     stacks = stacks_handler.get_stacks()
     if len(stacks) == 0:
         status = 404
     response = {'stacks': [json.loads(stack) for stack in stacks]}
     print(response)
     respond(self, response, status)
Пример #2
0
 def get(self):
         status = 200
         log_monitor.install()
         log_monitor.get_rasps_from_csv()
         log_monitor.get_stacks_from_csv()
         stacks = stacks_handler.get_stacks()
         if len(stacks) == 0:
                status = 404
         response = {'stacks': [json.loads(stack) for stack in stacks]}
         print(response)
         respond(self, response, status)
Пример #3
0
import logging
import struct
from tornado.escape import json_encode
import sys
import socket
import os
import datetime
from newInstall import log_monitor
from newInstall import global_settings
from configparser import ConfigParser
from handlers import rasps_handler
from handlers import stacks_handler
from newInstall import stack_power

global_settings.init()
log_monitor.get_rasps_from_csv()
log_monitor.get_stacks_from_csv()

PORT = 1026

# instantiate
config = ConfigParser()

# parse existing file
config.read('configuration.ini')


class UDPStream(object):
    def __init__(self, socket, in_ioloop=None):
        self.socket = socket
        self._state = None
Пример #4
0
import logging
import struct
from tornado.escape import json_encode
import sys
import socket
import os
import datetime
from newInstall import log_monitor
from newInstall import global_settings
from configparser import ConfigParser
from handlers import rasps_handler
from handlers import stacks_handler
from newInstall import stack_power

global_settings.init()
log_monitor.get_rasps_from_csv()
log_monitor.get_stacks_from_csv()

PORT = 1026

# instantiate
config = ConfigParser()

# parse existing file
config.read('configuration.ini')

class UDPStream(object):
	def __init__(self, socket, in_ioloop=None):
		self.socket = socket
		self._state = None
		self._read_callback = None