Skip to content

Instantly share code, notes, and snippets.

View ephur's full-sized avatar

Richard Maynard ephur

  • San Antonio, TX
View GitHub Profile
### Keybase proof
I hereby claim:
* I am ephur on github.
* I am ephur (https://keybase.io/ephur) on keybase.
* I have a public key ASArKwfPeJ4SehioPRWTUzZDs9FT9GuC7iC8lBhGlv7g3wo
To claim this, I am signing this object:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
import os
import sys
import ConfigParser
import Xlib.display
import subprocess
py36-unit create: /home/ephur/Projects/or/gilt/.tox/py36-unit
py36-unit installdeps: -rrequirements.txt, -rtest-requirements.txt
py36-unit inst: /home/ephur/Projects/or/gilt/.tox/dist/gilt-python-1.1.1.dev5.zip
py36-unit installed: appdirs==1.4.3,click==6.7,colorama==0.3.9,coverage==4.4.1,fasteners==0.14.1,flake8==3.3.0,gilt-python==1.1.1.dev5,giturlparse.py==0.0.5,mccabe==0.6.1,monotonic==1.3,packaging==16.8,pbr==3.0.1,py==1.4.33,pycodestyle==2.3.1,pyflakes==1.5.0,pyparsing==2.2.0,pytest==3.1.0,pytest-cov==2.5.1,pytest-helpers-namespace==2016.7.10,pytest-mock==1.6.0,PyYAML==3.12,sh==1.12.13,six==1.10.0
py36-unit runtests: PYTHONHASHSEED='467649316'
py36-unit runtests: commands[0] | py.test --runslow -vv --cov-report=term-missing --cov=/home/ephur/Projects/or/gilt/gilt/ --no-cov-on-fail
==================================================================== test session starts =====================================================================
platform linux -- Python 3.6.1, pytest-3.1.0, py-1.4.33, pluggy-0.4
<http-connection-pools xmlns="http://docs.openrepose.org/repose/http-connection-pool/v1.0">
<!-- Configuration for the default pool. Any users of the service will by default, retrieve HTTP connections
using this default pool configuration.
-->
<pool id="default"
default="true"
chunked-encoding="false"
http.conn-manager.max-total="500"
http.conn-manager.max-per-route="500"
<?xml version="1.0" encoding="UTF-8"?>
<validators
multi-role-match="false"
xmlns="http://docs.openrepose.org/repose/validator/v1.0">
<validator
role="apigw"
wadl="wadl/image-api/src/v2/os-image-v2.wadl"
check-elements="true"
check-plain-params="true"
do-xsd-grammar-transform="true"
2015-03-27 18:13:25,722 6196 [Event Kernel Thread] DEBUG org.openrepose.core.services.event.PowerProxyEventKernel - Dispatching event: ApplicationDeploymentEvent.APPLICATION_COLLECTION_MODIFIED
2015-03-27 18:13:25,723 6197 [Event Kernel Thread] INFO org.openrepose.powerfilter.PowerFilter - repose:node1 -- Application collection has been modified. Application that changed: [filter-bundle, extensions-filter-bundle]
2015-03-27 18:13:25,724 6198 [Event Kernel Thread] INFO org.openrepose.powerfilter.filtercontext.FilterContextFactory - Getting child application context for org.openrepose.filters.openstackidentityv3.OpenStackIdentityV3Filter using classloader java.net.FactoryURLClassLoader@16c24a50
2015-03-27 18:13:25,726 6200 [Event Kernel Thread] DEBUG org.openrepose.core.spring.CoreSpringProvider - Creating Filter Context using parent context: Root WebApplicationContext
2015-03-27 18:13:25,729 6203 [Event Kernel Thread] DEBUG org.openrepose.core.spring.CoreSpringProvider - Filter Context scan package: org.open
for region in servers:
for server in servers[region]:
server_check = self.__server_okay_to_delete(server, constraints)
if server_check['bool'] is not True:
self._log.info("%s:NOT_DELETED:%s:%s:%s:%s" % (job_name, ddi, server.id, region, server_check['msg']))
continue
try:
# @TODO (ephur): Uncomment the line below to make this thing delete all the things
# self._regions[region].servers.delete(server.id)
self._log.info("%s:DELETED:%s:%s:%s:%s" % (job_name, ddi, server.id, region, self._flavors[int(server.flavor['id'])]))
""" Verify File """
@app.route('/file/verify/<hash>',methods=["POST"])
def post_file_verify(hash):
filename = request.form["filename"]
if host_audit.host.verify_file(hash,filename):
return("",200)
else:
return("",500)
@ephur
ephur / gist:5102966
Created March 6, 2013 20:54
make testing/dev easy for joist.....
#!/usr/bin/env bpython -i
#####
#
# Just put this here so I can bpython -i ./b.py and simplify my life...
#
#####
import sys
import ConfigParser
import json
[(Exit 0) (ephur@Richards-MacBook-Pro:~)]
[(2503)] > time for i in `seq 1 20`; do curl jsonip.com; done
{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}{"ip":"71.40.122.214","about":"/about"}
real 7.283 user 0.284 sys 0.107 pcpu 5.37
[(Exit 0) (ephur@Richards-MacBook-Pro:~)]
[(2503)] > time for i in `seq 1 20`; do curl icanhazip