Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import json
import os
import subprocess
import sys
PYTHON = '/home/dstanek/.py-venvs/simple2/bin/python'
INVENTORY = '/home/dstanek/bin/openstack_inventory.py'
An Ansible playbook for taking a Ubuntu 16.04 node and turning it into a testshib
service provider for testing keystone/horizon federation.
Roles can be found here:
* https://galaxy.ansible.com/dstanek/devstack/
* https://galaxy.ansible.com/dstanek/keystone-sp/
Steps:
1. Create a new VM (Rackspace, Virtualbox, whatever)
2. Run 'ansible-playbook -i "[ip address]," playbook.yml' where [ip address] is your VM's IP.
" pull gist cvimrc.vim every hour and at Chrome startup
set autoupdategist
" don't allow web pages to auto focus on input boxes when they load
set noautofocus
" smooth scrolling
set smoothscroll
let barposition = "bottom"
let blacklists = ["https://inbox.google.com/*"]
@dstanek
dstanek / create-sched.py
Last active April 18, 2016 14:35
Code to take the OpenStack schedule that was downloaded from https://www.openstack.org/api/v1/summits/6/schedule and turn it into something almost usable.
#!/usr/bin/env python3
import collections
import datetime
import json
MIN_INC = 5
EVENT_CONTINUED = object()
EMPTY = object()
@dstanek
dstanek / codemash-python-koans.rst
Last active January 6, 2016 21:15
Codemash 2016: Python Koans
{
"rules": [
{
"local": {
"user": {
"name": "@@UserName@@"
}
},
"remote": [
{
{
"rules": [
{
"local": {
"user": "name"
},
"remote": [
{
"type": "UserName"
}
@dstanek
dstanek / gist:6383436
Created August 29, 2013 21:08
A really simple script that I use to bootstrap devstack on a brand new Rackspace cloud server.
#!/bin/bash
host=$1
pub_key=$2
function help {
echo 'usage: ./bootstrap-devstack.sh host public_key'
echo ' example: ./bootstrap-devstack.sh 1.1.1.1 ~/.ssh/id_dsa.pub'
exit 1
}
@dstanek
dstanek / gist:4381225
Last active December 10, 2015 04:28 — forked from anonymous/gist:4381219
from myapp.forms import MyForm
def my_view(request):
form = MyForm(request.POST or None)
if form.is_valid():
name = form.cleaned_data['name']
email = form.cleaned_data['email']
# do something great with that data

Supplementary Documentation for Keystone Versioned Drivers

This is a crazy rought draft. More like a semi-organized brainstorm.

Goal for Versioned Drivers

To provide a stable API for building drivers. This gives third-party driver writers time (a full cycle) to update their drivers to fulfill new API expectations.

In Keystone we deliver our drivers in the same package as the managers. This makes it much easier for us to deal with changing APIs than for third-party developers.