]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script: remove subman script
authorAlfredo Deza <adeza@redhat.com>
Wed, 23 May 2018 18:57:51 +0000 (14:57 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 13 Jun 2018 19:16:22 +0000 (15:16 -0400)
Based on ceph-disk, most probably unused

Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/script/subman [deleted file]

diff --git a/src/script/subman b/src/script/subman
deleted file mode 100755 (executable)
index c81aa98..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python3
-
-import json
-import os
-import re
-import subprocess
-
-disks = json.loads(subprocess.check_output("ceph-disk list --format json", shell=True).decode("utf-8"))
-used = 0
-
-for disk in disks:
-    for partition in disk.get('partition', []):
-        if partition.get('type') == 'data':
-            df = subprocess.check_output("df --output=used " + partition['path'], shell=True)
-            used += int(re.findall(b'\d+', df)[0])
-
-facts_file = os.environ.get("CEPH_FACTS_FILE", "/etc/rhsm/facts/ceph_usage.facts")
-open(facts_file, 'w').write("""\
-{
-"band.storage.usage": {used}
-}
-""".replace('{used}', str(int(used/(1024*1024*1024)))))