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 httplib | |
import multiprocessing | |
import os | |
import re | |
from collections import defaultdict | |
from wsgiref.simple_server import make_server | |
from django.core.handlers.wsgi import WSGIHandler | |
from django.http import HttpResponse |
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
def checkoutPR () { | |
checkout([ | |
$class: 'GitSCM', | |
branches: [[name: 'master']], | |
extensions: [ | |
[$class: 'CheckoutOption'], | |
[$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: true] | |
], | |
userRemoteConfigs: [[ | |
url: 'https://github.com/racker/reach', |
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 | |
# | |
# Generate a list of flags for a set of customer DDI's from a csv file. | |
# | |
# Usage: | |
# python aws.py ddi_file.csv | |
import sys | |
import json |
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 -l | |
YELLOW='\033[1;33m' | |
PURPLE='\033[1;35m' | |
GREEN='\033[1;32m' | |
RED='\033[1;31m' | |
CYAN='\033[1;36m' | |
NC='\033[0m' | |
function f_info() { |
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
$script = <<SCRIPT | |
##!/usr/bin/env bash | |
# | |
# GLOBAL VARIABLES | |
# | |
YELLOW='\033[1;33m' | |
PURPLE='\033[1;35m' | |
GREEN='\033[1;32m' | |
RED='\033[1;31m' |
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 eventlet | |
from trove.taskmanager import api | |
from trove.taskmanager.manager import Manager | |
+from trove.openstack.common import log as logging | |
+ | |
+LOG = logging.getLogger(__name__) | |
class FakeApi(api.API): | |
@@ -35,7 +38,10 @@ class FakeApi(api.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
ck.data.database.Instance.prototype.detach = function () { | |
var haGroup; | |
if (this.isHaGroupMember()) { | |
haGroup = new ck.data.database.HaGroup({id: this.get('ha_id')}); | |
haGroup.setProvider(this.getProvider()); | |
haGroup.detach(this.id()); | |
} else { | |
this.getStore().detach(this.id()); | |
} |
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
$ pip install radon | |
$ radon cc -anc trove | |
trove/tests/util/__init__.py | |
F 84:0 create_dbaas_client - C | |
trove/tests/unittests/util/matchers.py | |
M 376:4 XMLMatches._compare_node - C | |
M 63:4 DictMatches.match - C | |
trove/taskmanager/models.py | |
M 144:4 FreshInstanceTasks.create_instance - C | |
trove/openstack/common/config.py |
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
[DEFAULT] | |
# Show more verbose log output (sets INFO log level output) | |
verbose = True | |
# Show debugging output in logs (sets DEBUG log level output) | |
debug = True | |
# Address to bind the API server | |
bind_host = 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
def execute_backup(self, context, backup_id, runner=RUNNER): | |
### snip | |
### | |
runner_opts = CONF.backup_runner_opts | |
extra_opts = runner_opts.get(runner.backup_type, '') | |
try: |
NewerOlder