This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE=$1 | |
USER=$2 | |
EMAIL=$3 | |
realfile=$(readlink -f $FILE) | |
cat << EOF | augtool -Ast "Xml incl ${realfile}" | |
# Remove #empty node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signal | |
import functools | |
async def looping_task(loop, task_num): | |
try: | |
while True: | |
print('{0}:in looping_task'.format(task_num)) | |
await asyncio.sleep(5.0, loop=loop) | |
except asyncio.CancelledError: | |
return "{0}: I was cancelled!".format(task_num) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
SUITE=$1 | |
JENKINS="/home/ngoldin/src/gerrit.ovirt.org/jenkins" | |
LAGO="/home/ngoldin/src/nvgoldin.github.com/lago" | |
REPODIR="/tmp/lago-export" | |
OST="/home/ngoldin/src/gerrit.ovirt.org/ovirt-system-tests" | |
BUILD_CONF="/home/ngoldin/src/nvgoldin.github.com/lago-build-scripts" | |
echo "BUILDING LAGO RPM" | |
pushd "$LAGO" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lago | |
from pytest import fixture | |
@fixture(scope="module") | |
def prefix(): | |
prefix = lago.api.init(conf='../LagoInitFile') | |
prefix.start() | |
yield prefix | |
prefix.destroy() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
polkit.addRule(function(action, subject) { | |
if (action.id == "org.freedesktop.systemd1.manage-units") { | |
if (action.lookup("unit") == "myservice.service") { | |
var verb = action.lookup("verb"); | |
if (verb == "start" || verb == "stop" || verb == "restart") { | |
return polkit.Result.YES; | |
} | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import jenkins | |
import getpass | |
import time | |
""" | |
compare a jenkins job average execution time relative to a build | |
advisable to have: https://wiki.jenkins-ci.org/display/JENKINS/Metrics+Plugin | |
""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: class vm(object): | |
...: def __init__(self, nets): | |
...: self.nets = nets | |
...: | |
In [2]: vms = [ vm(nets=['1', '2']), vm(nets=['2', '9']), vm(nets=['3', '2']) ] | |
In [3]: set((net for vm in vms for net in vm.nets)) | |
Out[3]: {'1', '2', '3', '9'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: import ovirtsdk4 as sdk4 | |
In [2]: sdk4.types | |
--------------------------------------------------------------------------- | |
AttributeError Traceback (most recent call last) | |
<ipython-input-2-3ecb0c730dda> in <module>() | |
----> 1 sdk4.types | |
AttributeError: 'module' object has no attribute 'types' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./run_suite.sh -o /dev/shm/ost basic-suite-master | |
# failure/stop | |
export LAGO_INITFILE_PATH="/home/ngoldin/src/gerrit.ovirt.org/ovirt-system-tests/basic-suite-master/" | |
export LAGO_WORKDIR_PATH="/dev/shm/ost" | |
export SUITE="basic-suite-master" | |
cd /dev/shm/ost | |
PYTHONPATH=$PYTHONPATH:/home/ngoldin/src/gerrit.ovirt.org/ovirt-system-tests/basic-suite-master/ lago ovirt runtest /home/ngoldin/src/gerrit.ovirt.org/ovirt-system-tests/basic-suite-master/test-scenarios/002_bootstrap.py |
OlderNewer