Skip to content

Instantly share code, notes, and snippets.

@lbragstad
lbragstad / parse.py
Last active September 7, 2018 14:25
User Survey Parser
#!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
'filename',
help=('User survey results as a file with each line being a list of '
'responses per user.')
)
@lbragstad
lbragstad / cleanup-in-library.py
Last active September 5, 2018 17:21
Limit enforcement of subclassed resources
from oslo_limit import limit
def create_server(self, context, server):
claim_quantity = server.get('cores')
claim = limit.ProjectClaim('cores', context.project_id, quantity=claim_quantity)
# Verification after executing the claim is the default behavior, but calling it out
# explicitly here for the sake of the example.
with limit.Enforcer(claim, callback=self.calculate_cores_for_project, verify=True) as enforcer:
@lbragstad
lbragstad / bgmccollum-directions
Last active August 19, 2023 00:46
Deploying OpenStack Queens with OpenStack-Ansible (Manual)
# Decide a Range of IP Address Your Router Will Manage, and a Range of IP Address Neutron Will Manage
# Adjust To Accomodate For Any Static Assignments (Such as 192.168.1.1 for Your Router)
# Ensure These IP Address Ranges, and Any Static Assignments Do Not Overlap
#
# For Example:
#
# Home Network Subnet: 192.168.1.0/24
# Router Static: 192.168.1.1
# Laptop Static: 192.168.1.2
# OSA-AIO Static: 192.168.1.3
@lbragstad
lbragstad / interfaces
Last active July 30, 2018 17:10
OpenStack-Ansible All-in-One
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
@lbragstad
lbragstad / notes.md
Last active June 5, 2018 15:08
edge meeting notes

Edge Computing Meeting

Date: 2018-06-05 9:00

Notes

  • Would like to start with OPNFV use cases
  • Testing
    • Multiple labs located globally that can be used for test resources
  • OPNFV can help give us hardware to test on
@lbragstad
lbragstad / example.py
Last active May 10, 2018 21:32
oslo.limit example usage
from oslo_limit import limit
LIMIT_ENFORCER = limit.Enforcer()
def create_foobar(self, context, foobar):
# check if project is over the limit prior to creating the resource
claim = 1
resource_name = 'foobars'
@lbragstad
lbragstad / reading-list.md
Last active April 23, 2019 13:19
Reading List

The contents of this gist have been moved to my bookshelf.

@lbragstad
lbragstad / interfaces
Last active May 8, 2018 15:19
ubuntu networking issues
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto eth1
iface eth1 inet manual
@lbragstad
lbragstad / newsletter.ini
Created May 4, 2018 21:34
newletter dashboard
[dashboard]
title = Keystone Newsletter
description =
foreach =
[section "open specs"]
query = project:openstack/keystone-specs status:open label:Verified+1 NOT label:Code-Review<=-1 NOT label:Verified-1 NOT label:Workflow-1
[section "recently merged patches"]
query = is:merged NOT age:7days AND (project:openstack/keystone OR project:openstack/keystone-specs OR project:openstack/keystone-tempest-plugin OR project:openstack/keystoneauth OR project:openstack/keystonemiddleware OR project:openstack/pycadf OR project:openstack/python-keystoneclient OR project:openstack/ldappool OR project:openstack/oslo.policy)
@lbragstad
lbragstad / report.conf
Last active April 27, 2018 13:57
April Bug Report
[report]
projects = keystone keystoneauth keystonemiddleware python-keystoneclient
start_date = 'March 27, 2018 12:00 AM CST'
end_date = 'April 27, 2018 12:00 AM CST'