Skip to content

Instantly share code, notes, and snippets.

View toabctl's full-sized avatar

Thomas Bechtold toabctl

  • Canonical
  • Berlin/Germany
View GitHub Profile
#!/bin/bash
RPM_PACKAGING_DIR=~/devel/openstack/rpm-packaging
FACTORY_PACKAGING_DIR=~/devel/bs/pub/Cloud/OpenStack/Factory
printf "%-30s %-10s %-10s\n" "suse pkg name" "upstream version" "suse version"
for templatepath in $RPM_PACKAGING_DIR/openstack/*/*.spec.j2; do
# the spec.j2 template name
specj2=$(basename $templatepath)
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2016 SUSE Linux GmbH
# Author: Thomas Bechtold <[email protected]>
from __future__ import print_function
import argparse
@toabctl
toabctl / oslo-config-test.py
Created September 27, 2016 13:20
Print all config options
#!/usr/bin/env python
# Author: Thomas Bechtold <[email protected]>
# License: Apache-2.0
# sample program to demonstrate the --config-file and --config-dir options
from __future__ import print_function
import sys
@toabctl
toabctl / cleanvm
Created November 8, 2016 13:00
Build a cleanvm for CI
#!/usr/bin/env python
# Copyright (c) 2015 SUSE Linux GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#!/usr/bin/env python
# Copyright (c) 2016 SUSE Linux GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software

Keybase proof

I hereby claim:

  • I am toabctl on github.
  • I am toabctl (https://keybase.io/toabctl) on keybase.
  • I have a public key whose fingerprint is 1F26 0C1E 74B2 8F6A EC95 97DB 45EF F8F9 315A A8CA

To claim this, I am signing this object:

#!/bin/bash
# Author: Thomas Bechtold <[email protected]>
# Requirements:
# - obs-service-download_files from https://build.opensuse.org/project/show/openSUSE:Tools
# - rpm-packaging git repo checkout (https://github.com/openstack/rpm-packaging) under BASE_RPM_PACKAGING
# - Cloud:OpenStack:Upstream:Master checkout (https://build.opensuse.org/project/show/Cloud:OpenStack:Upstream:Master)
# under BASE_OBS_PROJECT
# pymod2pkg installation (https://pypi.python.org/pypi/pymod2pkg or https://build.opensuse.org/package/show/devel:languages:python/python-pymod2pkg)
# renderspec installation (https://pypi.python.org/pypi/renderspec or https://build.opensuse.org/package/show/Cloud:OpenStack:Master/python-renderspec)
@toabctl
toabctl / keystone_token_get.py
Created September 8, 2017 08:11
Get a keystone token for time measurements
#!/usr/bin/python
# Copy that script to the node where keystone API is running.
# Use it with:
# PYTHONPATH=. python -m timeit -n 100 -r 1 -s "from keystone_token_get import do_get" "do_get()"
import requests
headers = {'Content-Type': 'application/json'}
data = """
@toabctl
toabctl / picture-fill-location.py
Last active November 17, 2017 13:15
Fill Iptc/Xmp tags based on GPS location and OpenStreetMap data
#!/usr/bin/python3
# Author: Thomas Bechtold <[email protected]>
import argparse
import os
import requests
import time
# GNOME gobject introspection
@toabctl
toabctl / cloud-init-create-seed
Created November 22, 2017 09:17
Create a config drive iso for cloud-init
cat <<EOF > user-data
#cloud-config
debug: True
disable_root: False
ssh_deletekeys: False
ssh_pwauth: True
ssh_authorized_keys:
- ssh-rsa XXX
# users: