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
from trove.guestagent.strategies.backup import base | |
from eventlet.green import subprocess | |
class CassandraDump(base.BackupRunner): | |
""" Implementation of Backup Strategy for CassandraDump """ | |
__strategy_name__ = 'cassandradump' | |
# The '-' will redirect the output to stdout for streaming | |
cmd = ('sudo tar cpfP - ' |
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
print 'FOO' |
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: |
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
$ 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
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
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
$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
#!/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
#!/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 |