Skip to content

Instantly share code, notes, and snippets.

@dstanek
dstanek / di_by_hand.py
Last active August 29, 2015 14:04
DI by hand
import abc
class Logger(object):
__metaclass__ abc.ABCMeta
@abstractmethod
def log_it(self, message, *args, **kwargs):
raise NotImplemented
@dstanek
dstanek / di_with_sg.py
Created July 21, 2014 18:39
DI with snake-guice
import abc
class Logger(object):
__metaclass__ abc.ABCMeta
@abstractmethod
def log_it(self, message, *args, **kwargs):
raise NotImplemented

Policy-Endpoint Associations

Create association with endpoint: PUT /OS-ENDPOINT-POLICY/endpoints/{endpoint_id}/policy

Creates an association between the policy and the endpoint. If another association already existed for the specified endpoint, this will replace that association.

Request:

Title

Python Koans - An Introduction To Python

Abstract

Python is a fun, dynamic, flexible language for solving all kinds of problems. It's used everywhere from modest scripts to large systems, powering things like websites, games, film production tools, scientific analysis, and even space programs. Best of all, it's a language that "fits your brain".

This session is a mostly self guided introduction to Python through koans. What’s a koan you ask? It’s a small puzzle or exercise expressed as a test, designed to build your knowledge of the Python syntax and idioms incrementially.

Header a

header c

header d ----------

def _require_single_keyword_arg(self, **kwargs):
provided_params = [name for name, value in kwargs.iteritems() if value]
if not provided_params: raise VE('Something must be passed in')
if len(provided_params) != 1:
msg = _('Only a single keyword arg allowed: received %s') % ', '.join(provided_params)
raise exception.ValidationError(msg)
import collections
import re
import routes
from keystone import assignment
from keystone import auth
from keystone import catalog
from keystone.common import controller
from keystone import credential

Dynamic Policy for Access Control

time

2015-05-18 11:15:00-07:00

location

Room 211,

Who can do what? In OpenStack, it is the Policy engine that controls these decisions. A secure deployment means moving beyond the default policy provided with the base distribution. But how do you write policy rules that reflect your security decisions? This presentation, Adam Young, a core Keystone developer from the Red Hat Identity Management team, explain the access control policy mechanism fr...

Enabling Real-world Interoperable Hybrid Cloud Use Cases Using OpenStack's Federated Identity Capabilities

[dashboard]
title = Things I Need To DO!
description = A dashboard to help me focus my review efforts
foreach = is:watched is:open limit:10 NOT label:Workflow-1
[section "Needs a review"]
query = NOT label:Code-Review<=-1,self NOT label:Code-Review>=1,self NOT owner:self
[section "Needs me to do something"]
query = owner:self (label:Workflow<=-1 OR label:Verified-1 OR label:Code-Review<=-1)
@dstanek
dstanek / gist:1773749
Created February 8, 2012 20:56
My git woes
localbox:~% ssh my-linode-account "git init --bare /tmp/myrepo.git"
dstanek@my-linode-account's password:
Initialized empty Git repository in /tmp/myrepo.git/
localbox:Projects/my_awesome_project% git push ssh://my-linode-account/tmp/myrepo.git master
dstanek@my-linode-account's password:
Counting objects: 162, done.
Compressing objects: 100% (161/161), done.
Writing objects: 100% (162/162), 39.62 KiB, done.
Total 162 (delta 78), reused 0 (delta 0)
To ssh://my-linode-account/tmp/myrepo.git