示例#1
0
 def verify_python_module(self,module):
   msg = "... validating %s: " % module
   if common.module_exists(module):
     msg += "available"
     common.logit(msg)
   else:
     common.logit(msg)
     common.logerr("This python module is required and not available.")
示例#2
0
pip install onvif
"""
import logging

logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
logging.basicConfig()
import sys, getopt

sys.path.append("../")
import threading
from scapy.all import *
from Camera import Camera
from netaddr import *
import common  # local lib file for common functions

if common.module_exists("onvif") is False:
    print "Module missing. Try #pip install onvif"
    sys.exit(1)
from onvif import ONVIFCamera

import Cameras as pluginTypes


class Onvif(pluginTypes.Cameras):
    def __init__(self):
        pluginTypes.Cameras.__init__(self)

    # Required
    def _doSetup(self, settings):
        pass