Commit 7c527504 authored by Jason Frisvold's avatar Jason Frisvold
Browse files

- Remove NOTES - Moved to gitlab wiki

parent 4f8cc180
Python Daemon Package - https://pypi.python.org/pypi/python-daemon/
Server - back end master system
- Push schedule
- Retrieve data
- Parse & store data (thread?)
Server Tools
- Add new task
- Edit task
- Remove task
Reporting
- Create reports
- GUI interface
- Automated reports?
Client - "cloud" component
- Spawn tasks
- Handle concurrent tasks
Server to Server communication - Protocol Buffers??
http://google-opensource.blogspot.com/2008/07/protocol-buffers-googles-data.html
http://code.google.com/p/protobuf/
http://code.activestate.com/recipes/278731/
https://bitbucket.org/vinay.sajip/python-gnupg
Slim framework for the web interface? https://github.com/codeguy/Slim
Spawn log requires data from cloud and spawn tables. Disable only? Or duplicate data?
https://pythonhosted.org/netaddr/index.html
https://stackoverflow.com/questions/250283/how-to-scp-in-python
example code for gpg binary execution :
def encrypt_file(fname, recipient=None, gpg_exe='/usr/bin/gpg', **kwds):
"""
"""
fd, tmpfname = tempfile.mkstemp()
os.close(fd)
cmd = (gpg_exe, '--batch', '--yes', '--output', tmpfname, '-e', '-r', recipient, '-a', fname)
logging.debug("Command is: %s" % str(cmd))
rc, stdout, stderr = exec_cmd(cmd)
if rc != 0:
parts = ["Error encrypting file '%s'." % fname]
if stdout:
parts.append(stdout)
if stderr:
parts.append(stderr)
msg = '\n'.join(parts)
logging.warn(msg)
return None
return tmpfname
def decrypt_file(fname, outname, gpg_exe='/usr/bin/gpg', gpg_pwd=None, **kwds):
"""
"""
parts = os.path.splitext(outname)
if parts[1].lower() in ('.gpg', '.asc'):
outname = parts[0]
cmd = ("/usr/bin/gpg", "--batch", "--no-tty", "--passphrase-fd", "0", "--ignore-crc-error", "-o", outname, fname)
logging.debug("Command is: %s" % str(cmd))
rc, stdout, stderr = exec_cmd(cmd, stdin=gpg_pwd)
if rc != 0:
parts = ["Error decrypting file '%s'." % fname]
if stdout:
parts.append(stdout)
if stderr:
parts.append(stderr)
msg = '\n'.join(parts)
logging.warn(msg)
return None
return outname
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment