Ejemplo n.º 1
0
 def __init__(self, config_dict, rpc_client, hostname):
     self.br_integ = config_dict.get('integration_bridge')
     self.br_ex = config_dict.get('external_bridge')
     self.root_helper = config_dict.get('root_helper')
     self.host_id = config_dict.get('host_id')
     self.node_list = config_dict['node_list']
     self.node_uplink_list = config_dict['node_uplink_list']
     # Check for error?? fixme(padkrish)
     self.que = VdpMsgPriQue()
     self.err_que = VdpMsgPriQue()
     self.phy_uplink = None
     self.veth_intf = None
     self.restart_uplink_called = False
     self.ovs_vdp_obj_dict = {}
     self.rpc_clnt = rpc_client
     self.host_name = hostname
     self.uplink_det_compl = False
     self.process_uplink_ongoing = False
     self.uplink_down_cnt = 0
     self.is_os_run = False
     self.static_uplink = False
     self.static_uplink_port = None
     self.static_uplink_first = True
     self.bulk_vm_rcvd_flag = False
     self.bulk_vm_check_cnt = 0
     self.vdp_mgr_lock = utils.lock()
     self.read_static_uplink()
     self.start()
     self.topo_disc = topo_disc.TopoDisc(self.topo_disc_cb,
                                         self.root_helper)
Ejemplo n.º 2
0
 def __init__(self, uplink, integ_br, ext_br, root_helper,
              vdp_vlan_cb, vdp_mode=constants.VDP_SEGMENT_MODE):
     # self.root_helper = 'sudo'
     self.root_helper = root_helper
     self.uplink = uplink
     self.integ_br = integ_br
     self.ext_br = ext_br
     self.vdp_mode = vdp_mode
     self.local_vlan_map = {}
     self.lldpad_info = {}
     self.lldp_local_veth_port = None
     self.lldp_ovs_veth_port = None
     self.ovs_vdp_lock = sys_utils.lock()
     self.phy_peer_port_num = cconstants.INVALID_OFPORT
     self.int_peer_port_num = cconstants.INVALID_OFPORT
     self.int_peer_port = None
     self.phy_peer_port = None
     self.ext_br_obj = None
     self.integ_br_obj = None
     self.vdp_vlan_cb = vdp_vlan_cb
     self.uplink_fail_reason = ""
     self.setup_lldpad = self.setup_lldpad_ports()
     if not self.setup_lldpad:
         return
     flow_check_periodic_task = sys_utils.PeriodicTask(
         cconstants.FLOW_CHECK_INTERVAL, self._flow_check_handler)
     self.flow_check_periodic_task = flow_check_periodic_task
     flow_check_periodic_task.run()
Ejemplo n.º 3
0
    def __init__(self, port_name, phy_uplink, root_helper, is_ncb=True,
                 is_nb=False):
        '''Constructor.

        param port_name: Port where LLDP/EVB needs to be cfgd
        param phy_uplink: Physical Interface
        param root_helper: utility to use when running shell cmds.
        param is_ncb: Should LLDP be cfgd on Nearest Customer Bridge
        param is_nb: Should LLDP be cfgd on Nearest Bridge
        '''
        # Re-enable this once support becomes available in lldpad.
        # fixme(padkrish)
        # cfg.CONF.register_opts(OPTS)
        self.port_name = port_name
        self.phy_uplink = phy_uplink
        self.is_ncb = is_ncb
        self.is_nb = is_nb
        self.root_helper = root_helper
        self.mutex_lock = sys_utils.lock()
        self.read_vdp_cfg()
        self.vdp_vif_map = {}
        self.oui_vif_map = {}
        self.enable_lldp()
        sync_timeout_val = int(self.vdp_opts['vdp_sync_timeout'])
        vdp_periodic_task = sys_utils.PeriodicTask(sync_timeout_val,
                                                   self._vdp_refrsh_hndlr)
        self.vdp_periodic_task = vdp_periodic_task
        vdp_periodic_task.run()
Ejemplo n.º 4
0
    def __init__(self,
                 port_name,
                 phy_uplink,
                 root_helper,
                 is_ncb=True,
                 is_nb=False):
        """Initialize Routine.

        param port_name: Port where LLDP/EVB needs to be cfgd
        param phy_uplink: Physical Interface
        param root_helper: utility to use when running shell cmds.
        param is_ncb: Should LLDP be cfgd on Nearest Customer Bridge
        param is_nb: Should LLDP be cfgd on Nearest Bridge
        """
        # Re-enable this once support becomes available in lldpad.
        # fixme(padkrish)
        # cfg.CONF.register_opts(OPTS)
        self.port_name = port_name
        self.phy_uplink = phy_uplink
        self.is_ncb = is_ncb
        self.is_nb = is_nb
        self.root_helper = root_helper
        self.mutex_lock = sys_utils.lock()
        self.read_vdp_cfg()
        self.vdp_vif_map = {}
        self.oui_vif_map = {}
        self.enable_lldp()
        sync_timeout_val = int(self.vdp_opts['vdp_sync_timeout'])
        vdp_periodic_task = sys_utils.PeriodicTask(sync_timeout_val,
                                                   self._vdp_refrsh_hndlr)
        self.vdp_periodic_task = vdp_periodic_task
        vdp_periodic_task.run()
Ejemplo n.º 5
0
 def __init__(self, tenant_id):
     """Initialize. """
     self.rules = {}
     self.policies = {}
     self.tenant_id = tenant_id
     self.rule_cnt = 0
     self.policy_cnt = 0
     self.active_pol_id = None
     self.fw_created = False
     self.fw_drvr_status = False
     self.fw_id = None
     self.fw_type = None
     self.tenant_name = None
     self.fw_name = None
     self.mutex_lock = sys_utils.lock()
Ejemplo n.º 6
0
 def __init__(self, tenant_id):
     """Initialize. """
     self.rules = {}
     self.policies = {}
     self.tenant_id = tenant_id
     self.rule_cnt = 0
     self.policy_cnt = 0
     self.active_pol_id = None
     self.fw_created = False
     self.fw_drvr_status = False
     self.fw_id = None
     self.fw_type = None
     self.tenant_name = None
     self.fw_name = None
     self.mutex_lock = sys_utils.lock()