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
""" Usage example: | |
python create_volumes.py --config-file /etc/cinder/cinder.conf vol_count user_id tenant_id | |
""" | |
import sys | |
from oslo_config import cfg | |
from cinder import context | |
from cinder.db import api |
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 | |
for ip in `fuel node | grep cinder | awk '{print $9}'`; | |
do | |
echo $ip | |
scp ubuntu-fuel-6.0-stable-1313.tar.gz $ip:/root | |
echo "deb file:///root/ubuntu-fuel-6.0-stable-1272/ubuntu ./" >> /etc/apt/sources.list | |
ssh $ip 'apt-get update' | |
ssh $ip 'apt-get upgrade -y' | |
ssh $ip 'service cinder-volume restart' |
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
/etc/apache2/sites-available/25-apache_api_proxy.conf | |
<Proxy *> | |
Order Deny,Allow | |
Allow from all | |
</Proxy> | |
# iptables -I INPUT -p tcp --dport 8888 -m comment --comment "Proxy for API" -j ACCEPT | |
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 time | |
from selenium import webdriver | |
def open_blog(): | |
driver = webdriver.Firefox() | |
driver.get('http://blog.e0ne.info/') | |
time.sleep(5) | |
driver.quit() |
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
#!/usr/bin/env bash | |
drop_db=0 | |
case "$1" in | |
-d|--drop-db) drop_db=1;; | |
esac | |
if [ $drop_db -eq 1 ]; then | |
sudo -u postgres dropdb nailgun |
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
diff --git a/nailgun/nailgun/fixtures/sample_environment.json b/nailgun/nailgun/fixtures/sample_environment.json | |
index 7693356..0c32e20 100644 | |
--- a/nailgun/nailgun/fixtures/sample_environment.json | |
+++ b/nailgun/nailgun/fixtures/sample_environment.json | |
@@ -780,7 +780,7 @@ | |
{ | |
"model": "VBOX HARDDISK", | |
"name": "sda", | |
- "disk": "sda", | |
+ "disk": "disk/by-path/pci-0000:00:06.0-scsi-0:0:0:0", |
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
# Original source: | |
# http://howto.pui.ch/post/37471155682/ | |
# set-timeout-for-a-shell-command-in-python | |
import datetime | |
import os | |
import time | |
import signal | |
import subprocess |
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
#!/usr/bin/env python | |
import sys, os, time, atexit | |
from signal import SIGTERM | |
from subprocess import call | |
class Daemon: | |
""" | |
A generic daemon class. |
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
#!/usr/bin/env bash | |
nova list | grep $1 | awk '{system("nova show " $2)}' | grep ':host' |
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
#!/usr/bin/env bash | |
nova list | grep $1 | awk '{system("nova delete " $2)}' |