Package Products :: Package ZenWin :: Module utils
[hide private]
[frames] | no frames]

Source Code for Module Products.ZenWin.utils

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2009 Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 or (at your 
 8  # option) any later version as published by the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13   
14  """ 
15  This module provides common utilities for monitoring Windows devices. 
16  """ 
17   
18  import pysamba.twisted.reactor 
19   
20 -def addNTLMv2Option(parser):
21 """ 22 Adds the --ntlmv2auth option to the provided command-line parser. 23 @param parser: the command-line option parser to add the argument to 24 @type parser: OptionParser 25 """ 26 parser.add_option('--ntlmv2auth', 27 dest='ntlmv2auth', 28 default=False, 29 action="store_true", 30 help="Enable NTLMv2 Authentication for Windows Devices")
31
32 -def setNTLMv2Auth(options):
33 """ 34 Enables or disables NTLMv2 Authentication in the current process based 35 upon the setting of the ntlmv2auth option. 36 @param options: the command-line options object 37 """ 38 flag = False 39 if getattr(options, 'ntlmv2auth', False): 40 flag = True 41 pysamba.twisted.reactor.setNTLMv2Authentication(flag)
42