summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-07-04 23:54:03 +0000
committerGerrit Code Review <review@openstack.org>2013-07-04 23:54:03 +0000
commit539d7e5a41f5a700914d439cc393d11f265587db (patch)
treeafcb135f35372f1c709dcdf6664b62a7273e0e30 /tools
parent541cf77d340a28e753bc06b2625e65449e7694be (diff)
parent2f1378ebeaf6188963540a814d9ff418473796bc (diff)
downloadceilometer-539d7e5a41f5a700914d439cc393d11f265587db.tar.gz
Merge "Fix flake8 errors"
Diffstat (limited to 'tools')
-rwxr-xr-xtools/conf/check_uptodate.sh2
-rwxr-xr-xtools/make_test_data.py22
-rwxr-xr-xtools/notificationclient.py26
-rwxr-xr-xtools/release-bugs.py2
-rwxr-xr-xtools/show_data.py12
5 files changed, 32 insertions, 32 deletions
diff --git a/tools/conf/check_uptodate.sh b/tools/conf/check_uptodate.sh
index 10a75b99..0e04a3a3 100755
--- a/tools/conf/check_uptodate.sh
+++ b/tools/conf/check_uptodate.sh
@@ -2,7 +2,7 @@
TMPFILE=`mktemp`
trap "rm -f ${TMPFILE}" EXIT
tools/conf/generate_sample.sh "${TMPFILE}"
-if ! cmp -s "${TMPFILE}" etc/ceilometer/ceilometer.conf.sample
+if ! diff "${TMPFILE}" etc/ceilometer/ceilometer.conf.sample
then
echo "E: ceilometer.conf.sample is not up to date, please run tools/conf/generate_sample.sh"
exit 42
diff --git a/tools/make_test_data.py b/tools/make_test_data.py
index c24c2115..bd1af6c1 100755
--- a/tools/make_test_data.py
+++ b/tools/make_test_data.py
@@ -38,56 +38,56 @@ def main():
parser = argparse.ArgumentParser(
description='generate metering data',
- )
+ )
parser.add_argument(
'--interval',
default=10,
type=int,
help='the period between events, in minutes',
- )
+ )
parser.add_argument(
'--start',
default=31,
help='the number of days in the past to start timestamps',
- )
+ )
parser.add_argument(
'--end',
default=2,
help='the number of days into the future to continue timestamps',
- )
+ )
parser.add_argument(
'--type',
choices=('gauge', 'cumulative'),
default='gauge',
help='counter type',
- )
+ )
parser.add_argument(
'--unit',
default=None,
help='counter unit',
- )
+ )
parser.add_argument(
'--project',
help='project id of owner',
- )
+ )
parser.add_argument(
'--user',
help='user id of owner',
- )
+ )
parser.add_argument(
'resource',
help='the resource id for the meter data',
- )
+ )
parser.add_argument(
'counter',
help='the counter name for the meter data',
- )
+ )
parser.add_argument(
'volume',
help='the amount to attach to the meter',
type=int,
default=1,
- )
+ )
args = parser.parse_args()
# Set up logging to use the console
diff --git a/tools/notificationclient.py b/tools/notificationclient.py
index bb5839c7..33dbcd7b 100755
--- a/tools/notificationclient.py
+++ b/tools/notificationclient.py
@@ -91,24 +91,24 @@ def send_messages(connection, topic, input):
def main():
rpc.register_opts(cfg.CONF)
cfg.CONF.register_opts([
- cfg.StrOpt('datafile',
- default=None,
- help='Data file to read or write',
- ),
- cfg.BoolOpt('record',
- help='Record events',
- ),
- cfg.BoolOpt('replay',
- help='Replay events',
- ),
- ])
+ cfg.StrOpt('datafile',
+ default=None,
+ help='Data file to read or write',
+ ),
+ cfg.BoolOpt('record',
+ help='Record events',
+ ),
+ cfg.BoolOpt('replay',
+ help='Replay events',
+ ),
+ ])
remaining_args = cfg.CONF(sys.argv)
- utils.monkey_patch()
+ #utils.monkey_patch()
parser = argparse.ArgumentParser(
description='record or play back notification events',
- )
+ )
parser.add_argument('mode',
choices=('record', 'replay', 'monitor'),
help='operating mode',
diff --git a/tools/release-bugs.py b/tools/release-bugs.py
index 02cd28ce..a7835283 100755
--- a/tools/release-bugs.py
+++ b/tools/release-bugs.py
@@ -36,7 +36,7 @@ PRE_RELEASE_STATUS = "Fix Released"
RELEASE_PROMPT = (
"Found {bug_count} '{pre_release_status}' bugs for milestone "
"{milestone_title}. Mark them 'Fix Released'? [y/n]: "
- )
+)
def main():
diff --git a/tools/show_data.py b/tools/show_data.py
index af4cfc6a..d3abfc9f 100755
--- a/tools/show_data.py
+++ b/tools/show_data.py
@@ -66,9 +66,9 @@ def show_total_resources(db, args):
print u
for meter in ['disk', 'cpu', 'instance']:
stats = db.get_statistics(storage.SampleFilter(
- user=u,
- meter=meter,
- ))
+ user=u,
+ meter=meter,
+ ))
if meter in ['cpu', 'disk']:
total = stats['max']
else:
@@ -85,7 +85,7 @@ def show_raw(db, args):
for sample in db.get_samples(storage.SampleFilter(
user=u,
resource=resource['resource_id'],
- )):
+ )):
print fmt % sample
@@ -107,7 +107,7 @@ COMMANDS = {
'resources': show_resources,
'total_resources': show_total_resources,
'raw': show_raw,
- }
+}
def main(argv):
@@ -116,7 +116,7 @@ def main(argv):
# NOTE(dhellmann): Read the configuration file(s) for the
#ceilometer collector by default.
default_config_files=['/etc/ceilometer/ceilometer.conf'],
- )
+ )
storage.register_opts(cfg.CONF)
db = storage.get_connection(cfg.CONF)
command = extra_args[0] if extra_args else 'help'