X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fceph-detect-init%2Fceph_detect_init%2Fmain.py;fp=src%2Fceph%2Fsrc%2Fceph-detect-init%2Fceph_detect_init%2Fmain.py;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=320ae1703206dcafe6c1a0796089f64a51943f62;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/ceph-detect-init/ceph_detect_init/main.py b/src/ceph/src/ceph-detect-init/ceph_detect_init/main.py deleted file mode 100644 index 320ae17..0000000 --- a/src/ceph/src/ceph-detect-init/ceph_detect_init/main.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (C) 2015 -# Copyright (C) 2015 SUSE LINUX GmbH -# -# Author: Alfredo Deza -# Author: Owen Synge -# Author: Loic Dachary -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Library Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Library Public License for more details. -# -import argparse -import logging - -import ceph_detect_init -from ceph_detect_init import exc - - -def parser(): - parser = argparse.ArgumentParser( - 'ceph-detect-init', - ) - parser.add_argument( - "-v", - "--verbose", - action="store_true", - default=None, - ) - parser.add_argument( - "--use-rhceph", - action="store_true", - default=False, - ) - parser.add_argument( - "--default", - default=None, - ) - return parser - - -def run(argv=None, namespace=None): - args = parser().parse_args(argv, namespace) - - if args.verbose: - logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', - level=logging.DEBUG) - try: - print(ceph_detect_init.get(args.use_rhceph).init) - except exc.UnsupportedPlatform: - if args.default: - print(args.default) - else: - raise - - return 0