]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-daemon: all imports to top
authorSage Weil <sage@redhat.com>
Fri, 4 Oct 2019 19:24:26 +0000 (14:24 -0500)
committerSage Weil <sage@redhat.com>
Sat, 5 Oct 2019 19:28:50 +0000 (14:28 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-daemon

index b9b3504e2a5b8cb50beecfa0187ffc0a717d57d5..f047d42f18a36865c86af139154957b78fe15aa1 100755 (executable)
@@ -34,10 +34,12 @@ import configparser
 import json
 import logging
 import os
+import socket
 import subprocess
 import sys
 import tempfile
 import time
+import uuid
 from distutils.spawn import find_executable
 
 try:
@@ -61,15 +63,12 @@ def pathify(p):
     return p
 
 def get_hostname():
-    import socket
     return socket.gethostname()
 
 def make_fsid():
-    import uuid
     return str(uuid.uuid1())
 
 def is_fsid(s):
-    import uuid
     try:
         uuid.UUID(s)
     except:
@@ -167,7 +166,6 @@ def create_daemon_dirs(fsid, daemon_type, daemon_id, uid, gid,
 
 def get_config_and_keyring():
     if args.config_and_keyring:
-        import json
         if args.config_and_keyring == '-':
             try:
                 j = injected_stdin