def _build_dp_interfaces(self, dp_index, **kwargs):
    interfaces = {}
    egress_port = kwargs.get('egress_port')
    tagged_vlans = kwargs.get('tagged_vlans')
    lacp = kwargs.get('lacp')
    if egress_port:
        self._add_egress_interface(interfaces, egress_port, tagged_vlans, lacp)
    tap_vlan = kwargs.get('tap_vlan')
    if tap_vlan:
        self._add_tap_interface(interfaces, tap_vlan)
    dps = kwargs.get('dps')
    if dps:
        self._add_flat_link_interfaces(interfaces, dps, dp_index)
    t2_dps = kwargs.get('t2_dps')
    if t2_dps:
        self._add_t1_stack_interfaces(interfaces, dp_index, t2_dps)
    t1_dps = kwargs.get('t1_dps')
    if t1_dps:
        self._add_t2_stack_interfaces(interfaces, dp_index, t1_dps)
    access_ports = kwargs.get('access_ports')
    access_port_start = kwargs.get('access_port_start', ACCESS_PORT_START_DEFAULT)
    native_vlan = kwargs.get('native_vlan')
    port_acl = kwargs.get('port_acl')
    if access_ports:
        self._add_access_interfaces(interfaces, access_ports, access_port_start, native_vlan, port_acl)
    return interfaces
def _build_dp_interfaces(self, dp_index, **kwargs):
    interfaces = {}
    egress_port = kwargs.get('egress_port')
    tagged_vlans = kwargs.get('tagged_vlans')
    lacp = kwargs.get('lacp')
    if egress_port:
        self._add_egress_interface(interfaces, egress_port, tagged_vlans, lacp)
    tap_vlan = kwargs.get('tap_vlan')
    if tap_vlan:
        self._add_tap_interface(interfaces, tap_vlan)
    dps = kwargs.get('dps')
    if dps:
        self._add_flat_link_interfaces(interfaces, dps, dp_index)
    t2_dps = kwargs.get('t2_dps')
    if t2_dps:
        self._add_t1_stack_interfaces(interfaces, dp_index, t2_dps)
    t1_dps = kwargs.get('t1_dps')
    if t1_dps:
        self._add_t2_stack_interfaces(interfaces, dp_index, t1_dps)
    access_ports = kwargs.get('access_ports')
    access_port_start = kwargs.get('access_port_start', ACCESS_PORT_START_DEFAULT)
    native_vlan = kwargs.get('native_vlan')
    port_acl = kwargs.get('port_acl')
    if access_ports:
        self._add_access_interfaces(interfaces, access_ports, access_port_start, native_vlan, port_acl)
    return interfaces