I hereby claim:
- I am fabiand on github.
- I am fabiand (https://keybase.io/fabiand) on keybase.
- I have a public key ASDFpvAiVJbqU0BD9fd2yA7RA-IdHOT8bLf4OA_WQaQe3go
To claim this, I am signing this object:
# python -m SimpleHTTPPutServer 8080 | |
import SimpleHTTPServer | |
import BaseHTTPServer | |
class SputHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def do_PUT(self): | |
print self.headers | |
length = int(self.headers["Content-Length"]) | |
path = self.translate_path(self.path) | |
with open(path, "wb") as dst: |
import pexpect | |
image = "fedora-20.img" | |
user = "root" | |
password = "changeme" | |
# Define the qemu cmd to run | |
# The important bit is to redirect the serial to stdio | |
cmd = "qemu-kvm" | |
cmd += " -m 1024 -serial stdio -net user -net nic" |
NODEISO=$1 | |
IMGBASEIMG=$2 | |
in_node() { | |
guestfish --ro -a $NODEISO run : mount /dev/sda1 / : mount-loop /LiveOS/squashfs.img /isolinux : mount-loop /isolinux/LiveOS/ext3fs.img / : sh "$@" ; | |
} | |
in_imgbased() { | |
guestfish --ro -a $IMGBASEIMG run : mount /dev/HostVG/Image-0.0 / : sh "$@" ; | |
} |
docker-pid() { docker inspect --format="{{.State.Pid}}" $1 ; } | |
DSTCT=${1} | |
DSTPID=$(docker-pid $DSTCT) | |
UNCONNECTEDETH=$(nmcli -t -f device,type,connection device | egrep "ethernet:--$" | cut -d ":" -f1) | |
for NIC in $UNCONNECTEDETH | |
do | |
echo "Moving '$NIC' to netns of '$DSTPID'" |
@contextmanager | |
def download_iso(w): | |
# do download | |
yield path_to_w | |
# do removal | |
with downloaded_iso("centos") as isopath: | |
# do stuff | |
##### THIS IS EQUAL TO |
#!/usr/bin/bash | |
err() { echo "ERROR $@" >&2 ; } | |
info() { echo "INFO $@" ; } | |
usage() { echo -e "Usage: $0 OVAFILENAME [<guestfish arguments>]\nExtracts the given OVA, runs guestfish on the image, and creates an OVA again after quitting guestfish." ; } | |
[[ ! -f "$1" ]] && { usage ; exit 1 ; } | |
set -ex | |
export LC_ALL=C | |
TOPDIR=$PWD/rpms | |
ROOT=$PWD/root | |
REPO="$TOPDIR" | |
setup() { | |
rm -rf "$TOPDIR" "$ROOT" |
set -ex | |
export LC_ALL=C | |
TOPDIR=$PWD/rpms | |
ROOT=$PWD/root | |
REPO="$TOPDIR" | |
setup() { | |
rm -rf "$TOPDIR" "$ROOT" |
Story: | |
After a class is declared, a Network object can be created, which is getting | |
associated to such a class. The network object itself contains the logical | |
netowkr informations - eventually even IPAM needs to be discussed. | |
An interface on a VM is getting connected to a network. | |
--- | |
kind: Network | |
metadata: |
I hereby claim:
To claim this, I am signing this object: