示例#1
0
文件: policy.py 项目: bigswitch/snac
    def __init__(self, ctxt):
        Component.__init__(self, ctxt)

        self.authenticator = None
        self.sepl_enforcer = None
        self.nat_enforcer = None
        self.flow_util = None
        self.stats = None
        self.policystore = None
        self._dm = None
        self.init_policy = None
        self.simple_config = None
        self.uel = None

        self.user = None
        self.timestamp = None

        self.rules = {}
        self.priority = 0
        self.policy_id = random.randint(0, compile.U32_MAX)
        self.rid_counter = random.randint(0, compile.U32_MAX)
        self.rule_type = ''
        self.protected = False
        self.description = ''
        self.comment = ''

        self.locked = False
示例#2
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self._dm = None
     self._fc = None
     self._policy = None
     self._wsv1 = None
     self._auth = None
示例#3
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self._dm = None
     self._fc = None
     self._policy = None
     self._wsv1 = None
     self._auth = None
示例#4
0
    def __init__(self, ctxt):
        Component.__init__(self, ctxt)

        self.authenticator = None
        self.sepl_enforcer = None
        self.nat_enforcer = None
        self.flow_util = None
        self.stats = None
        self.policystore = None
        self._dm = None
        self.init_policy = None
        self.simple_config = None
        self.uel = None

        self.user = None
        self.timestamp = None

        self.rules = {}
        self.priority = 0
        self.policy_id = random.randint(0, compile.U32_MAX)
        self.rid_counter = random.randint(0, compile.U32_MAX)
        self.rule_type = ''
        self.protected = False
        self.description = ''
        self.comment = ''

        self.locked = False
示例#5
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self._conf_db = nxw_utils.DBConfigParser(self.CONFIG_FILE)
     self._conf_sbd = nxw_utils.ServiceBoDConfigParser(self.CONFIG_FILE)
     self._conf_pce = nxw_utils.NoxConfigParser(self.CONFIG_FILE)
     self._db = None
     self._fpce = None
    def __init__(self, ctxt):
        Component.__init__(self, ctxt)
        self.auth_hosts = []
        self.hosts      = {}
        self.links      = {}
        self.switches   = {}
        self.db_conn    = None
        self.fpce       = nxw_utils.FPCE()
        self.ior        = None
        self.ior_topo   = False
        self.ior_rout   = False
        self.__reasons = {0: "AUTHENTICATION_EVENT",
                          1: "AUTO_AUTHENTICATION",
                          2: "NWADDR_AUTO_ADD",
                          3: "DEAUTHENTICATION_EVENT",
                          4: "NWADDR_AUTO_REMOVE",
                          5: "INTERNAL_LOCATION",
                          6: "BINDING_CHANGE",
                          7: "HARD_TIMEOUT",
                          8: "IDLE_TIMEOUT",
                          9: "SWITCH_LEAVE",
                          10: "LOCATION_LEAVE",
                          11: "HOST_DELETE",
                         }

        conf = nxw_utils.NoxConfigParser(TopologyMgr.CONFIG_FILE)
        self.pce_client = nxw_utils.PCEClient(conf.address,
                                              conf.port,
                                              int(conf.size))
        self.pce_client.create()
示例#7
0
 def __init__(self, ctxt, name):
     Component.__init__(self, ctxt, name)
     self.ndb = self.resolve(API)
     self.cache = {}  # cache of recently seen entries
     # entries not seen for this period of time will be removed from cache & NDB
     self.timeout_sec = 5 * 60 # default 
     # precision of how frequently we check for time-outs
     self.timer_interval_sec = self.timeout_sec / 10 # default 
     self.debug = False
     self.init_table_info()
示例#8
0
 def __init__(self, ctxt, name):
     Component.__init__(self, ctxt, name)
     self.ndb = self.resolve(API)
     self.cache = {}  # cache of recently seen entries
     # entries not seen for this period of time will be removed from cache & NDB
     self.timeout_sec = 5 * 60  # default
     # precision of how frequently we check for time-outs
     self.timer_interval_sec = self.timeout_sec / 10  # default
     self.debug = False
     self.init_table_info()
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.routing = None
     
     # Subscribers for json messages
     #(eg. self.subscribers["highlight"] = [guistream]
     self.subscribers = {}
     
     # list of routes installations that are waiting for barrier_replies
     # (holds barrier xids and packet out info)
     self.pending_routes = []
示例#10
0
    def __init__(self, ctxt):
        Component.__init__(self, ctxt)
        self.routing = None

        # Subscribers for json messages
        #(eg. self.subscribers["highlight"] = [guistream]
        self.subscribers = {}

        # list of routes installations that are waiting for barrier_replies
        # (holds barrier xids and packet out info)
        self.pending_routes = []
示例#11
0
 def __init__(self, ctxt):
     simple_directory.__init__(self)
     
     # poor man's singleton
     global __instance__
     if __instance__ != None:
         raise Exception("sepl_directory already instantiated")
     Component.__init__(self, ctxt)
     __instance__ = self
     
     self.restricted_names.add(None)
    def __init__(self, ctxt):
        Component.__init__(self, ctxt)
        self.ctypes = PyDatatypes(ctxt)
        self.SWITCH = None
        self.LOCATION = None
        self.HOST = None
        self.HOST_NETID = None
        self.USER = None
        self.ADDRESS = None
        self.GROUP = None
        self.GROUP_MEMBER = None

        self.MAC = None
        self.IPV4_CIDR = None
        self.IPV6 = None
        self.ALIAS = None
示例#13
0
    def __init__(self, ctxt):
        Component.__init__(self, ctxt)
        self.ctypes = PyDatatypes(ctxt)
        self.SWITCH = None
        self.LOCATION = None
        self.HOST = None
        self.HOST_NETID = None
        self.USER = None
        self.ADDRESS = None
        self.GROUP = None
        self.GROUP_MEMBER = None

        self.MAC = None
        self.IPV4_CIDR = None
        self.IPV6 = None
        self.ALIAS = None
示例#14
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.ip_records = defaultdict(list)
示例#15
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.cache = PyData_cache(ctxt)
     Principal_delete_event.register_event_converter(self.ctxt)
示例#16
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.cur_policy_table = 'current_policy'
     self.rule_table = 'policy_rules'
     self.storage = None
     self.conn = None
示例#17
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.routing = None
示例#18
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.cur_policy_table = 'current_policy'
     self.rule_table = 'policy_rules'
     self.policy = None
     self.v1 = None
示例#19
0
 def __init__(self,ctxt):
     Component.__init__(self, ctxt)
     self.cookie_cache = {} 
     self.cookie_times = {} 
示例#20
0
 def __init__(self, ctxt, name):
     Component.__init__(self, ctxt, name)
示例#21
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.db_ = nxw_utils.DBConfigParser(DiscoveryCircuit.FCONFIG)
     self.ccp_ = nxw_utils.CircuitConfigParser(DiscoveryCircuit.FCONFIG)
     self.timeout = self.ccp_.timeout
     self.fsm_ = FSM(self.ccp_.address, self.ccp_.port, self.ccp_.circuit_region)
示例#22
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self._conf_ms = nxw_utils.MediaServConfigParser(self.CONFIG_FILE)
     self._conf_ws = nxw_utils.WebServConfigParser(self.CONFIG_FILE)
     self._media = None
     self._play = None
示例#23
0
文件: pyauth.py 项目: esy2k/openflowq
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.authenticator = PyAuthenticator(ctxt)
示例#24
0
 def __init__(self, ctxt, name):
     Component.__init__(self, ctxt, name)
示例#25
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.routing = None
示例#26
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.cur_policy_table = 'current_policy'
     self.rule_table = 'policy_rules'
     self.policy = None
     self.v1 = None
示例#27
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.log = [] 
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.ip_records = defaultdict(list) 
示例#29
0
 def __init__(self, ctxt):
     Component.__init__(self,ctxt)
     self.proxy = user_event_log_proxy(ctxt)
     self.principal_format_map = None
示例#30
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
示例#31
0
 def __init__(self, methodName, ctxt):
     unittest.TestCase.__init__(self, methodName)
     Component.__init__(self, ctxt)
示例#32
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.log = []
示例#33
0
 def __init__(self, ctxt):
     global inst
     Component.__init__(self, ctxt)
示例#34
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.snapshots = {}
示例#35
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.store = None
     self.bs = None
示例#36
0
 def __init__(self, methodName, ctxt):
     unittest.TestCase.__init__(self, methodName)
     Component.__init__(self, ctxt)
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
示例#38
0
 def __init__(self, ctxt):
       Component.__init__(self,ctxt) 
       self.store = None
       self.bs = None
示例#39
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.routing = PyRouting_module(ctxt)
示例#40
0
 def __init__(self, ctxt):
     global inst
     Component.__init__(self, ctxt)
示例#41
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.flowutil = PyFlow_util(ctxt)
示例#42
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.snapshots = {}
示例#43
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.directorymanager = None
     self.instances = {}
示例#44
0
 def __init__(self, ctxt):
     Component.__init__(self, ctxt)
     self.cur_policy_table = 'current_policy'
     self.rule_table = 'policy_rules'
     self.storage = None
     self.conn = None