Skip to content

Instantly share code, notes, and snippets.

;$TTL 86400
$TTL 10
;@ IN SOA example-cloud.local. root.localhost. (
; 1 ; Serial
; 604800 ; Refresh
; 86400 ; Retry
; 2419200 ; Expire
; 86400 ) ; Negative Cache TTL
@ IN SOA RegionOne.example-cloud.local. root.localhost. (
1 ; Serial
@dstanek
dstanek / test_quick.py
Created September 28, 2012 21:04 — forked from moschlar/test_quick.py
Badass speedup of simple tg site tests
# -*- coding: utf-8 -*-
"""
This test module will run setUp and tearDown only *once* for all test cases in this module.
This is very convenient for users who want to just test multiple urls whether they are reachable and respond with the correct http response code.
"""
import logging
log = logging.getLogger(__name__)
from os import path
What?
-----
Functional tests are black box tests that we can use to specify what makes Keystone.
1. Base tests that all Keystone implementations must pass
2. Optional tests specific to a setup (Federation)
3. They are not run using the Keystone client
4. They can be pointed to any cloud that you wish to test (shouldn't be a production cloud)

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.

@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
@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
}
{
"rules": [
{
"local": {
"user": "name"
},
"remote": [
{
"type": "UserName"
}
{
"rules": [
{
"local": {
"user": {
"name": "@@UserName@@"
}
},
"remote": [
{
@dstanek
dstanek / codemash-python-koans.rst
Last active January 6, 2016 21:15
Codemash 2016: Python Koans
@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()