This file contains hidden or 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
# test_server.py | |
import webob | |
from paste import httpserver | |
def app(environ, start_response): | |
request = webob.Request(environ) | |
print request | |
start_response("200 OK", [("Content-Type", "text/plain")]) | |
for name,value in request.POST.items(): |
This file contains hidden or 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
# test_client.py | |
import hmac | |
from time import time | |
from hashlib import sha1 | |
import requests | |
MODE = "VM" |
This file contains hidden or 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 | |
TOKEN=56fa2267946c42dbbc4b6fbcb017650e | |
URL=https:/URL/STORAGE50GO | |
FILE=/tmp/monfichier.jpg | |
filename=$(basename ${FILE}) | |
curl -H "X-Auth-Token: ${TOKEN}" ${URL} |
This file contains hidden or 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
# test_client.py | |
import hmac | |
from time import time | |
from hashlib import sha1 | |
import requests | |
MODE = "VM" |
This file contains hidden or 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
# Proxy | |
NameVirtualHost *:8080 | |
Listen 8080 | |
<VirtualHost *:8080> | |
ServerName proxy-server | |
LimitRequestBody 5368709122 | |
WSGIDaemonProcess proxy-server processes=5 threads=1 | |
WSGIProcessGroup proxy-server | |
WSGIScriptAlias / /var/www/swift/proxy-server.wsgi | |
LimitRequestFields 200 |
This file contains hidden or 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
# -*- encoding: utf-8 -*- | |
__author__ = "Chmouel Boudjnah <[email protected]>" | |
from swiftclient import client as swiftclient | |
from swift.common.bufferedhttp import http_connect_raw | |
from swift.common.http import is_success | |
from swift.container.sync import _Iter2FileLikeObject | |
from eventlet import Timeout | |
import urllib2 | |
GET_VM = 'vmm' |
This file contains hidden or 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 | |
ADMIN_ID=$(keystone user-list|sed -n '/ admin / { s/^..//;s/ .*//; p}') | |
RESELLER_ID=$(keystone role-list|sed -n '/ ResellerAdmin / { s/^..//;s/ .*//; p}') | |
TENANT_ID=$(keystone tenant-list|sed -n '/ admin / { s/^..//;s/ .*//; p}') | |
keystone user-role-add --user-id ${ADMIN_ID} --role-id ${RESELLER_ID} --tenant-id ${TENANT_ID} |
This file contains hidden or 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
[alias] | |
ghub = !sh -c 'git clone http://github.com/$1' - |
This file contains hidden or 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 | |
# -*- encoding: utf-8 -*- | |
__author__ = "Chmouel Boudjnah <[email protected]>" | |
import os | |
import sys | |
import optparse | |
import json | |
import socket | |
import pprint | |
import urlparse |
This file contains hidden or 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/python | |
# Chmouel Boudjnah <[email protected]> | |
# source devstack/eucarc first | |
import boto | |
import sys | |
import boto.s3.connection | |
import boto.s3.key | |
import boto.exception | |
import StringIO | |
import os |