Trees | Indices | Help |
---|
|
1 #!/usr/bin/python2 2 3 4 # Copyright (c) 1999--2018 Red Hat, Inc. Distributed under GPLv2. 5 # 6 # Author: Adrian Likins <alikins@redhat.com> 7 8 9 # imports are a bit weird here to avoid name collions on "harware" 10 from up2date_client import hardware 11 from up2date_client import up2dateAuth 12 from up2date_client import rpcServer 13 argVerbose = 0 14 15 __rhnexport__ = [ 16 'refresh_list' ] 17 18 # resync hardware information with the server profile20 if cache_only: 21 return (0, "no-ops for caching", {}) 22 23 # read all hardware in 24 hardwareList = hardware.Hardware() 25 26 s = rpcServer.getServer() 27 28 if argVerbose > 1: 29 print("Called refresh_hardware") 30 31 try: 32 s.registration.refresh_hw_profile(up2dateAuth.getSystemId(), 33 hardwareList) 34 except: 35 print("ERROR: sending hardware database for System Profile") 36 return (12, "Error refreshing system hardware", {}) 37 38 return (0, "hardware list refreshed", {})3941 print(refresh_list())42 43 if __name__ == "__main__": 44 main() 45
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Mar 4 07:37:51 2020 | http://epydoc.sourceforge.net |