def __init__(self, *args, **kwargs): Script.__init__(self, *args, **kwargs) self.runner = None self.mode = '' self.add_argument('--version', action='store_true', help='show version')
def __init__(self, oid, reload_interval=60): Script.__init__(self) self.log = Logger('snmp').default_stream self.reload_interval = reload_interval self.last_reload = None self.add_argument('-g', '--get', help='SNMP GET request') self.add_argument('-n', '--next', help='SNMP GET request') self.add_argument('-t', '--tree', action='store_true', help='Show OID tree') self.tree = Tree(oid)
def __init__(self,oid_map={},index_cache_path=None): Script.__init__(self) self.oid_map = oid_map self.add_argument('-H','--host',help='SNMP host to connect') self.add_argument('-p','--port',type=int,default=161,help='SNMP server port') self.add_argument('-1',dest='snmpv1',action='store_true',help='Use SNMP v1') self.add_argument('-2',dest='snmpv2c',action='store_true',help='Use SNMP v2c') self.add_argument('-3',dest='snmpv3',action='store_true',help='Use SNMP v3') self.add_argument('-C','--community',help='SNMP v1/v2c community') self.add_argument('-U','--username',help='SNMP v3 username') self.add_argument('-a','--authProtocol',help='SNMP v3 auth protocol') self.add_argument('-A','--authPass',help='SNMP v3 auth password') self.add_argument('-x','--privProtocol',help='SNMP v3 priv protocol') self.add_argument('-X','--privPass',help='SNMP v3 priv password') self.add_argument('-t','--timeout',type=int,default=1,help='SNMP query timeout') self.add_argument('-r','--retries',type=int,default=5,help='SNMP query retries') self.add_argument('-f','--cache-path',default=index_cache_path,help='Result index cache path')
def __init__(self, oid_map={}, index_cache_path=None): Script.__init__(self) self.oid_map = oid_map self.add_argument("-H", "--host", help="SNMP host to connect") self.add_argument("-p", "--port", type=int, default=161, help="SNMP server port") self.add_argument("-1", dest="snmpv1", action="store_true", help="Use SNMP v1") self.add_argument("-2", dest="snmpv2c", action="store_true", help="Use SNMP v2c") self.add_argument("-3", dest="snmpv3", action="store_true", help="Use SNMP v3") self.add_argument("-C", "--community", help="SNMP v1/v2c community") self.add_argument("-U", "--username", help="SNMP v3 username") self.add_argument("-a", "--authProtocol", help="SNMP v3 auth protocol") self.add_argument("-A", "--authPass", help="SNMP v3 auth password") self.add_argument("-x", "--privProtocol", help="SNMP v3 priv protocol") self.add_argument("-X", "--privPass", help="SNMP v3 priv password") self.add_argument("-t", "--timeout", type=int, default=1, help="SNMP query timeout") self.add_argument("-r", "--retries", type=int, default=5, help="SNMP query retries") self.add_argument("-f", "--cache-path", default=index_cache_path, help="Result index cache path")
def __init__(self, *args, **kwargs): Script.__init__(self, *args, **kwargs) self.runner = None self.mode = ''