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 -*- | |
import novaclient | |
import sys | |
import time | |
# User Configuration | |
USERNAME="" | |
API_KEY="" | |
AUTH_URL="https://lon.auth.api.rackspacecloud.com/v1.0" |
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
import os | |
import cloudfiles | |
import novaclient | |
# File to be placed in ~/.ipython/cloud.py | |
# In your shell env file (ie: ~/.bashrc) | |
# | |
# alias icloud='ipython -p cloud' | |
# export UK_RCLOUD_USER="" |
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
import httplib | |
import urlparse | |
import json | |
import os | |
def get_auth(username, key, auth_url): | |
u = urlparse.urlparse(auth_url) | |
cls = u.scheme == 'https' and httplib.HTTPSConnection or \ | |
httplib.HTTPConnection |
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
import os | |
US_RCLOUD_USER = os.environ.get("US_RCLOUD_USER") | |
US_RCLOUD_KEY = os.environ.get("US_RCLOUD_KEY") | |
US_RCLOUD_AURL = os.environ.get("US_RCLOUD_AURL") | |
UK_RCLOUD_USER = os.environ.get("UK_RCLOUD_USER") | |
UK_RCLOUD_KEY = os.environ.get("UK_RCLOUD_KEY") | |
UK_RCLOUD_AURL = os.environ.get("UK_RCLOUD_AURL") | |
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
import novaclient | |
from novaclient.v1_1 import client | |
import logging | |
ch = logging.StreamHandler() | |
novaclient.client._logger.setLevel(logging.DEBUG) | |
novaclient.client._logger.addHandler(ch) |
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
from IPython.frontend.terminal.embed import InteractiveShellEmbed | |
shell = InteractiveShellEmbed(); shell() |
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 | |
set -e | |
set -x | |
# Add tenant | |
keystone-manage tenant add admin | |
# Add user admin with password secrete to tenant admin | |
keystone-manage user add admin secrete admin |
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 | |
set -e | |
set -x | |
# Add tenant | |
keystone-manage tenant add admin | |
# Add user admin with password secrete to tenant admin | |
keystone-manage user add admin secrete admin |
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 | |
set -e | |
#CONFIGURE THIS | |
AUTH_URL= | |
SUPER_ADMIN_KEY= | |
[[ -z ${AUTH_URL} || -z ${SUPER_ADMIN_KEY} ]] && { echo "Configure this script by vim $0 and adjust the variable at the top"; exit 1 ;} | |
account="$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 | |
"""Simple script to update DNS record with Rackspace CLoud DNS | |
Usage: python updatedomain.py fqdn newip | |
- The domain of the fqdn need to be already registered with Rackspace Cloud. | |
You need to have the python-clouddns package install from github : | |
http://github.com/rackspace/python-clouddns |