Skip to content

Instantly share code, notes, and snippets.

# So, how this all looks in the db:
# id = some_id
# user_id = some_user_id
# expires = some_expiration
# extras = {'user': {'id': some_used_id},
# 'tenant': {'id': some_tenant_id},
# 'token_data': 'token': {'domain': {'id': some_domain_id},
# 'project': {'id': some_project_id},
# 'domain': {'id': some_domain_id},
# 'user': {'id': some_user_id},
Delegated Auth a la Oauth
=========================
It's pronounced "wawth," btw.
Problem Statement
-----------------
Third-Party Service A, we'll call it ScaleMe, needs to launch new servers with
import test_backend_sql
class MysqlIdentityTests(test_backend_sql.SqlIdentityTests):
def setUp(self):
if not os.path.exists('../my_test_mysql.conf'):
raise SkipTest('no test_mysql.conf defined')
@termie
termie / why github
Created May 1, 2013 22:25
github vs gerrit for branch-based collab
Reasons allowing the usage of Github as a collaboration tool
----------------------------------------------------------------------------------------
Background
* Termie is working on a feature that Steve and his company have an
interest in seeing completed.
* While the feature is not done, enough is done that an experienced
developer (Steve) can begin contributing.
ssh-rsa MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz6AijDhOT0pfrJJAbMy7gKMFcvxaa7yXw7D0Ra/haYAyc1MRbu8sfj1Qwvu0RooaVbfiMpB+C+M9kzoe7KWlKKmBqlYjpH0e7lWZG+/TzdiLhaMTroOhDOJ+DfQ5h2v+aki/Izkjf6BnxYVpFkCBtnxsz3Jp9sgIGj5k/7wV2kEym5ez0P3oV5R3cep9pFa7BsdzOHL7BdGO2hEbYc+0n5j519op0m3DFCJ3y12DF85bier24NhCLpt0MdBCL0yZ563EitIW57peUiXl0L30kdfCyZmUW//T95m4XRs0S4JD9691OOqTg9/q1nmdHwQi5lZjAJgTqbDufF6OiQFwzwIDAQAB
@termie
termie / gist:7817384
Last active December 30, 2015 10:39
example code
from fabric import tasks
from fabric.api import env
env.skip_missing_roles = True
# Copied from https://github.com/fabric/fabric with a small change to
# use our class instead of the default
def task(*args, **kwargs):
@termie
termie / gist:7939548
Created December 13, 2013 03:53
error when loading openstack.org/profile
GET https://www.google.com/uds/api/ads/3.0/01478b579c57efb8589bd6564832cfea/search.I.js jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22search%22%2C%22version%22%3A%221.0%22%2C%22…:21
google.(anonymous function).d jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22search%22%2C%22version%22%3A%221.0%22%2C%22…:21
(anonymous function) jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22search%22%2C%22version%22%3A%221.0%22%2C%22…:61
Uncaught ReferenceError: $this is not defined affiliations.js?m=1386092923:407
LoadRemoteAffiliationList.$.ajax.error affiliations.js?m=1386092923:407
options.error affiliations.js?m=1386092923:60
c jquery.js:3048
p.fireWith jquery.js:3160
k jquery.js:8237
@termie
termie / gist:8140539
Created December 27, 2013 00:11
survey scan
Arkonor 10,000 22 km
Bistot 15,000 21 km
Crokite 19,688 16 km
Dark Ochre 10,000 17 km
Gneiss 20,000 12 km
Hedbergite 53,664 13 km
Jaspet 100,000 7,546 m
Omber 150,000 14 km
Plagioclase 150,000 14 km
Plagioclase 150,000 27 km
@termie
termie / gist:9358089
Created March 4, 2014 23:37
testr fail
This file has been truncated, but you can view the full file.
(nova)termie@champs:~/p/nova % ./run_tests.sh nova.tests.integrated
Running `tools/with_venv.sh python -m nova.openstack.common.lockutils python setup.py testr --testr-args='--subunit --concurrency 0 nova.tests.integrated'`
Non-zero exit code (2) from test listing. stdout='\xb3)\x01@_@Tnova.tests.api.ec2.test_api.ApiEc2TestCase.test_authorize_revoke_security_group_cidr J\xf5K\xb3)\x01@b@Wnova.tests.api.ec2.test_api.ApiEc2TestCase.test_authorize_revoke_security_group_cidr_v6\x1eDp\x9e\xb3)\x01@h@]nova.tests.api.ec2.test_api.ApiEc2TestCase.test_authorize_revoke_security_group_foreign_group\xc3\x13H\x14\xb3)\x01@W@Lnova.tests.api.ec2.test_api.ApiEc2TestCase.test_create_delete_security_group\\\xc3,W\xb3)\x01@T@Inova.tests.api.ec2.test_api.ApiEc2TestCase.test_create_duplicate_key_pairYs\x9b\xa1\xb3)\x01@M@Bnova.tests.api.ec2.test_api.ApiEc2TestCase.test_describe_instances\x83\x82\xc4$\xb3)\x01@L@Anova.tests.api.ec2.test_api.ApiEc2TestCase.test_get_all_key_pairs\xb5\xfa<-\xb3)\x01@R@Gnova.tests.api.ec2.test_api.