'get end state info'

def get_end_state(self):

    if self.bridge_domain_id:
        if (self.bind_vlan_id or self.l2_sub_interface):
            vap_info = self.get_bd_vap_dict()
            self.end_state['bridge_domain_id'] = self.bridge_domain_id
            self.end_state['bind_vlan_list'] = bitmap_to_vlan_list(vap_info.get('vlanList'))
            self.end_state['bind_intf_list'] = vap_info.get('intfList')
    if (self.encapsulation and self.l2_sub_interface):
        l2sub_info = self.get_l2_sub_intf_dict(self.l2_sub_interface)
        self.end_state['l2_sub_interface'] = self.l2_sub_interface
        self.end_state['encapsulation'] = l2sub_info.get('flowType')
        if (self.end_state['encapsulation'] == 'dot1q'):
            self.end_state['ce_vid'] = bitmap_to_vlan_list(l2sub_info.get('dot1qVids'))
        if (self.end_state['encapsulation'] == 'qinq'):
            self.end_state['ce_vid'] = bitmap_to_vlan_list(l2sub_info.get('ceVids'))
            self.end_state['pe_vid'] = l2sub_info.get('peVlanId')
