Repository: napalm-automation/napalm

Issue:
Junos: missing PR after reunification
There may be some PR that were merged in `napalm-junos` that are missing in the `junos` driver after the reunification. In particular https://github.com/napalm-automation/napalm-junos/pull/216, there may be others... Thanks!


Discussion:

Resolving patch:
diff --git a/napalm/junos/junos.py b/napalm/junos/junos.py
--- a/napalm/junos/junos.py
+++ b/napalm/junos/junos.py
@@ -88,6 +88,7 @@ def __init__(self, hostname, username, password, timeout=60, optional_args=None)
         if self.key_file:
             self.device = Device(hostname,
                                  user=username,
+                                 password=password,
                                  ssh_private_key_file=self.key_file,
                                  ssh_config=self.ssh_config_file,
                                  port=self.port)
@@ -788,6 +789,17 @@ def _match(txt, pattern):
             ]
             return '\n'.join(matched)
 
+        def _find(txt, pattern):
+            '''
+            Search for first occurrence of pattern.
+            '''
+            rgx = '^.*({pattern})(.*)$'.format(pattern=pattern)
+            match = re.search(rgx, txt, re.I | re.M | re.DOTALL)
+            if match:
+                return '{pattern}{rest}'.format(pattern=pattern, rest=match.group(2))
+            else:
+                return '\nPattern not found'
+
         def _process_pipe(cmd, txt):
             '''
             Process CLI output from Juniper device that
@@ -801,6 +813,7 @@ def _process_pipe(cmd, txt):
             _OF_MAP['last'] = _last
             _OF_MAP['trim'] = _trim
             _OF_MAP['count'] = _count
+            _OF_MAP['find'] = _find
             # the operations order matter in this case!
             exploded_cmd = cmd.split('|')
             pipe_oper_args = {}


Test patch:
diff --git a/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/expected_result.json b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/expected_result.json
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/expected_result.json
@@ -0,0 +1,101 @@
+{
+  "global": {
+        "peers": {
+            "10.92.51.2": {
+                "address_family": {
+                    "ipv4": {
+                        "accepted_prefixes": 3, 
+                        "received_prefixes": 3, 
+                        "sent_prefixes": 6
+                    }, 
+                    "ipv6": {
+                        "accepted_prefixes": -1, 
+                        "received_prefixes": -1, 
+                        "sent_prefixes": -1
+                    }
+                }, 
+                "description": "Leaf1_Underlay", 
+                "is_enabled": true, 
+                "is_up": true, 
+                "local_as": 65000, 
+                "remote_as": 65001, 
+                "remote_id": "10.92.99.91", 
+                "uptime": 61468
+            }, 
+            "10.92.52.2": {
+                "address_family": {
+                    "ipv4": {
+                        "accepted_prefixes": 4, 
+                        "received_prefixes": 4, 
+                        "sent_prefixes": 5
+                    }, 
+                    "ipv6": {
+                        "accepted_prefixes": -1, 
+                        "received_prefixes": -1, 
+                        "sent_prefixes": -1
+                    }
+                }, 
+                "description": "Leaf2_Underlay", 
+                "is_enabled": true, 
+                "is_up": true, 
+                "local_as": 65000, 
+                "remote_as": 65002, 
+                "remote_id": "10.92.99.92", 
+                "uptime": 320020
+            }, 
+            "10.92.99.91": {
+                "address_family": {
+                    "evpn": {
+                        "accepted_prefixes": 5, 
+                        "received_prefixes": 5, 
+                        "sent_prefixes": 0
+                    }, 
+                    "ipv4": {
+                        "accepted_prefixes": -1, 
+                        "received_prefixes": -1, 
+                        "sent_prefixes": -1
+                    }, 
+                    "ipv6": {
+                        "accepted_prefixes": -1, 
+                        "received_prefixes": -1, 
+                        "sent_prefixes": -1
+                    }
+                }, 
+                "description": "Leaf1_Overlay", 
+                "is_enabled": true, 
+                "is_up": true, 
+                "local_as": 65005, 
+                "remote_as": 65005, 
+                "remote_id": "10.92.99.91", 
+                "uptime": 61458
+            }, 
+            "10.92.99.92": {
+                "address_family": {
+                    "evpn": {
+                        "accepted_prefixes": 3, 
+                        "received_prefixes": 3, 
+                        "sent_prefixes": 0
+                    }, 
+                    "ipv4": {
+                        "accepted_prefixes": -1, 
+                        "received_prefixes": -1, 
+                        "sent_prefixes": -1
+                    }, 
+                    "ipv6": {
+                        "accepted_prefixes": -1, 
+                        "received_prefixes": -1, 
+                        "sent_prefixes": -1
+                    }
+                }, 
+                "description": "Leaf2_Overlay", 
+                "is_enabled": true, 
+                "is_up": true, 
+                "local_as": 65005, 
+                "remote_as": 65005, 
+                "remote_id": "10.92.99.92", 
+                "uptime": 320013
+            }
+        }, 
+        "router_id": "10.91.1.1"
+    }
+}
diff --git a/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/facts.yml b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/facts.yml
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/facts.yml
@@ -0,0 +1 @@
+version: 17.3R1.10
diff --git a/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-neighbor-information.xml b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-neighbor-information.xml
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-neighbor-information.xml
@@ -0,0 +1,409 @@
+<bgp-information>
+    <bgp-peer style="detail">
+        <peer-address>10.92.51.2+179</peer-address>
+        <peer-as>65001</peer-as>
+        <local-address>10.92.51.1+49867</local-address>
+        <local-as>65000</local-as>
+        <description>Leaf1_Underlay</description>
+        <peer-group>underlay</peer-group>
+        <peer-cfg-rti>master</peer-cfg-rti>
+        <peer-fwd-rti>master</peer-fwd-rti>
+        <peer-type>External</peer-type>
+        <peer-state>Established</peer-state>
+        <peer-flags>Sync</peer-flags>
+        <last-state>OpenConfirm</last-state>
+        <last-event>RecvKeepAlive</last-event>
+        <last-error>None</last-error>
+        <bgp-option-information xmlns="http://xml.juniper.net/junos/17.3R1/junos-routing">
+            <export-policy>
+                send-direct
+            </export-policy>
+            <bgp-options>Multihop Preference Ttl AddressFamily PeerAS Multipath Refresh</bgp-options>
+            <bgp-options2>AdvertisePeerAs AcceptRemoteNextHop PeerSpecficLoopsAllowed</bgp-options2>
+            <bgp-options-extended></bgp-options-extended>
+            <address-families>inet-unicast</address-families>
+            <holdtime>90</holdtime>
+            <preference>170</preference>
+        </bgp-option-information>
+        <flap-count>0</flap-count>
+        <peer-id>10.92.99.91</peer-id>
+        <local-id>10.91.1.1</local-id>
+        <active-holdtime>90</active-holdtime>
+        <keepalive-interval>30</keepalive-interval>
+        <group-index>0</group-index>
+        <peer-index>1</peer-index>
+        <snmp-index>0</snmp-index>
+        <bgp-peer-iosession>
+            <iosession-thread-name>bgpio-0</iosession-thread-name>
+            <iosession-state>Enabled</iosession-state>
+        </bgp-peer-iosession>
+        <bgp-bfd>
+            <bfd-configuration-state>disabled</bfd-configuration-state>
+            <bfd-operational-state>down</bfd-operational-state>
+        </bgp-bfd>
+        <peer-restart-nlri-configured>inet-unicast</peer-restart-nlri-configured>
+        <nlri-type-peer>inet-unicast</nlri-type-peer>
+        <nlri-type-session>inet-unicast</nlri-type-session>
+        <peer-refresh-capability>2</peer-refresh-capability>
+        <peer-stale-route-time-configured>300</peer-stale-route-time-configured>
+        <peer-no-restart/>
+        <peer-restart-flags-received>Notification</peer-restart-flags-received>
+        <peer-restart-nlri-negotiated>inet-unicast</peer-restart-nlri-negotiated>
+        <peer-end-of-rib-received>inet-unicast</peer-end-of-rib-received>
+        <peer-end-of-rib-sent>inet-unicast</peer-end-of-rib-sent>
+        <peer-end-of-rib-scheduled></peer-end-of-rib-scheduled>
+        <peer-no-llgr-restarter/>
+        <peer-4byte-as-capability-advertised>65001</peer-4byte-as-capability-advertised>
+        <peer-addpath-not-supported/>
+        <bgp-rib style="detail">
+            <name>inet.0</name>
+            <rib-bit>20000</rib-bit>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <send-state>in sync</send-state>
+            <active-prefix-count>1</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+            <advertised-prefix-count>6</advertised-prefix-count>
+        </bgp-rib>
+        <last-received>500723</last-received>
+        <last-sent>64120</last-sent>
+        <last-checked>500723</last-checked>
+        <input-messages>2370</input-messages>
+        <input-updates>2</input-updates>
+        <input-refreshes>0</input-refreshes>
+        <input-octets>45072</input-octets>
+        <output-messages>2358</output-messages>
+        <output-updates>3</output-updates>
+        <output-refreshes>0</output-refreshes>
+        <output-octets>44933</output-octets>
+        <bgp-output-queue>
+            <number>1</number>
+            <count>0</count>
+            <table-name>inet.0</table-name>
+            <rib-adv-nlri>inet-unicast</rib-adv-nlri>
+        </bgp-output-queue>
+    </bgp-peer>
+    <bgp-peer style="detail">
+        <peer-address>10.92.52.2+179</peer-address>
+        <peer-as>65002</peer-as>
+        <local-address>10.92.52.1+62210</local-address>
+        <local-as>65000</local-as>
+        <description>Leaf2_Underlay</description>
+        <peer-group>underlay</peer-group>
+        <peer-cfg-rti>master</peer-cfg-rti>
+        <peer-fwd-rti>master</peer-fwd-rti>
+        <peer-type>External</peer-type>
+        <peer-state>Established</peer-state>
+        <peer-flags>Sync</peer-flags>
+        <last-state>OpenConfirm</last-state>
+        <last-event>RecvKeepAlive</last-event>
+        <last-error>Hold Timer Expired Error</last-error>
+        <bgp-option-information xmlns="http://xml.juniper.net/junos/17.3R1/junos-routing">
+            <export-policy>
+                send-direct
+            </export-policy>
+            <bgp-options>Multihop Preference Ttl AddressFamily PeerAS Multipath Refresh</bgp-options>
+            <bgp-options2>AdvertisePeerAs AcceptRemoteNextHop PeerSpecficLoopsAllowed</bgp-options2>
+            <bgp-options-extended></bgp-options-extended>
+            <address-families>inet-unicast</address-families>
+            <holdtime>90</holdtime>
+            <preference>170</preference>
+        </bgp-option-information>
+        <flap-count>1</flap-count>
+        <last-flap-event>HoldTime</last-flap-event>
+        <bgp-error>
+            <name>Hold Timer Expired Error</name>
+            <send-count>1</send-count>
+            <receive-count>0</receive-count>
+        </bgp-error>
+        <bgp-error>
+            <name>Cease</name>
+            <send-count>0</send-count>
+            <receive-count>2</receive-count>
+        </bgp-error>
+        <peer-id>10.92.99.92</peer-id>
+        <local-id>10.91.1.1</local-id>
+        <active-holdtime>90</active-holdtime>
+        <keepalive-interval>30</keepalive-interval>
+        <group-index>0</group-index>
+        <peer-index>0</peer-index>
+        <snmp-index>1</snmp-index>
+        <bgp-peer-iosession>            
+            <iosession-thread-name>bgpio-0</iosession-thread-name>
+            <iosession-state>Enabled</iosession-state>
+        </bgp-peer-iosession>
+        <bgp-bfd>
+            <bfd-configuration-state>disabled</bfd-configuration-state>
+            <bfd-operational-state>down</bfd-operational-state>
+        </bgp-bfd>
+        <peer-restart-nlri-configured>inet-unicast</peer-restart-nlri-configured>
+        <nlri-type-peer>inet-unicast</nlri-type-peer>
+        <nlri-type-session>inet-unicast</nlri-type-session>
+        <peer-refresh-capability>2</peer-refresh-capability>
+        <peer-stale-route-time-configured>300</peer-stale-route-time-configured>
+        <peer-no-restart/>
+        <peer-restart-flags-received>Notification</peer-restart-flags-received>
+        <peer-restart-nlri-negotiated>inet-unicast</peer-restart-nlri-negotiated>
+        <peer-end-of-rib-received>inet-unicast</peer-end-of-rib-received>
+        <peer-end-of-rib-sent>inet-unicast</peer-end-of-rib-sent>
+        <peer-end-of-rib-scheduled></peer-end-of-rib-scheduled>
+        <peer-no-llgr-restarter/>
+        <peer-4byte-as-capability-advertised>65002</peer-4byte-as-capability-advertised>
+        <peer-addpath-not-supported/>
+        <bgp-rib style="detail">
+            <name>inet.0</name>
+            <rib-bit>20000</rib-bit>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <send-state>in sync</send-state>
+            <active-prefix-count>2</active-prefix-count>
+            <received-prefix-count>4</received-prefix-count>
+            <accepted-prefix-count>4</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+            <advertised-prefix-count>5</advertised-prefix-count>
+        </bgp-rib>
+        <last-received>500723</last-received>
+        <last-sent>64191</last-sent>
+        <last-checked>500723</last-checked>
+        <input-messages>11916</input-messages>
+        <input-updates>11</input-updates>
+        <input-refreshes>0</input-refreshes>
+        <input-octets>226684</input-octets>
+        <output-messages>11848</output-messages>
+        <output-updates>11</output-updates>
+        <output-refreshes>0</output-refreshes>
+        <output-octets>225455</output-octets>
+        <bgp-output-queue>
+            <number>1</number>
+            <count>0</count>
+            <table-name>inet.0</table-name>
+            <rib-adv-nlri>inet-unicast</rib-adv-nlri>
+        </bgp-output-queue>
+    </bgp-peer>
+    <bgp-peer style="detail">
+        <peer-address>10.92.99.91+179</peer-address>
+        <peer-as>65005</peer-as>
+        <local-address>10.91.1.1+60103</local-address>
+        <local-as>65005</local-as>
+        <description>Leaf1_Overlay</description>
+        <peer-group>evpn</peer-group>
+        <peer-cfg-rti>master</peer-cfg-rti>
+        <peer-fwd-rti>master</peer-fwd-rti>
+        <peer-type>Internal</peer-type>
+        <route-reflector-client/>
+        <peer-state>Established</peer-state>
+        <peer-flags>Sync</peer-flags>
+        <last-state>OpenConfirm</last-state>
+        <last-event>RecvKeepAlive</last-event>
+        <last-error>Hold Timer Expired Error</last-error>
+        <bgp-option-information xmlns="http://xml.juniper.net/junos/17.3R1/junos-routing">
+            <bgp-options>Multihop Preference LocalAddress Ttl Cluster AddressFamily Multipath LocalAS Rib-group Refresh</bgp-options>
+            <bgp-options2></bgp-options2>
+            <bgp-options-extended></bgp-options-extended>
+            <address-families>evpn</address-families>
+            <local-address>10.91.1.1</local-address>
+            <holdtime>90</holdtime>
+            <preference>170</preference>
+            <local-as>65005</local-as>
+            <local-system-as>65000</local-system-as>
+        </bgp-option-information>
+        <flap-count>2</flap-count>
+        <last-flap-event>HoldTime</last-flap-event>
+        <bgp-error>
+            <name>Hold Timer Expired Error</name>
+            <send-count>2</send-count>
+            <receive-count>0</receive-count>
+        </bgp-error>
+        <peer-id>10.92.99.91</peer-id>
+        <local-id>10.91.1.1</local-id>
+        <active-holdtime>90</active-holdtime>
+        <keepalive-interval>30</keepalive-interval>
+        <group-index>1</group-index>
+        <peer-index>1</peer-index>
+        <snmp-index>2</snmp-index>
+        <bgp-peer-iosession>
+            <iosession-thread-name>bgpio-0</iosession-thread-name>
+            <iosession-state>Enabled</iosession-state>
+        </bgp-peer-iosession>
+        <bgp-bfd>
+            <bfd-configuration-state>disabled</bfd-configuration-state>
+            <bfd-operational-state>down</bfd-operational-state>
+        </bgp-bfd>
+        <peer-restart-nlri-configured>evpn</peer-restart-nlri-configured>
+        <nlri-type-peer>evpn</nlri-type-peer>
+        <nlri-type-session>evpn</nlri-type-session>
+        <peer-refresh-capability>2</peer-refresh-capability>
+        <peer-stale-route-time-configured>300</peer-stale-route-time-configured>
+        <peer-no-restart/>
+        <peer-restart-flags-received>Notification</peer-restart-flags-received>
+        <peer-restart-nlri-negotiated>evpn</peer-restart-nlri-negotiated>
+        <peer-end-of-rib-received>evpn</peer-end-of-rib-received>
+        <peer-end-of-rib-sent>evpn</peer-end-of-rib-sent>
+        <peer-end-of-rib-scheduled></peer-end-of-rib-scheduled>
+        <peer-no-llgr-restarter/>
+        <peer-4byte-as-capability-advertised>65005</peer-4byte-as-capability-advertised>
+        <peer-addpath-not-supported/>
+        <bgp-rib style="detail">
+            <name>bgp.evpn.0</name>
+            <rib-bit>30000</rib-bit>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>in sync</send-state>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+            <advertised-prefix-count>15</advertised-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="detail">
+            <name>default-switch.evpn.0</name>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>not advertising</send-state>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="detail">
+            <name>__default_evpn__.evpn.0</name>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>not advertising</send-state>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <last-received>500723</last-received>
+        <last-sent>197</last-sent>
+        <last-checked>500723</last-checked>
+        <input-messages>2801</input-messages>
+        <input-updates>433</input-updates>
+        <input-refreshes>0</input-refreshes>
+        <input-octets>81631</input-octets>
+        <output-messages>2576</output-messages>
+        <output-updates>221</output-updates>
+        <output-refreshes>0</output-refreshes>
+        <output-octets>65340</output-octets>
+        <bgp-output-queue>
+            <number>2</number>
+            <count>0</count>
+            <table-name>bgp.evpn.0</table-name>
+            <rib-adv-nlri>evpn</rib-adv-nlri>
+        </bgp-output-queue>
+    </bgp-peer>
+    <bgp-peer style="detail">
+        <peer-address>10.92.99.92+57881</peer-address>
+        <peer-as>65005</peer-as>
+        <local-address>10.91.1.1+179</local-address>
+        <local-as>65005</local-as>
+        <description>Leaf2_Overlay</description>
+        <peer-group>evpn</peer-group>
+        <peer-cfg-rti>master</peer-cfg-rti>
+        <peer-fwd-rti>master</peer-fwd-rti>
+        <peer-type>Internal</peer-type>
+        <route-reflector-client/>
+        <peer-state>Established</peer-state>
+        <peer-flags>Sync</peer-flags>
+        <last-state>OpenConfirm</last-state>
+        <last-event>RecvKeepAlive</last-event>
+        <last-error>Hold Timer Expired Error</last-error>
+        <bgp-option-information xmlns="http://xml.juniper.net/junos/17.3R1/junos-routing">
+            <bgp-options>Multihop Preference LocalAddress Ttl Cluster AddressFamily Multipath LocalAS Rib-group Refresh</bgp-options>
+            <bgp-options2></bgp-options2>
+            <bgp-options-extended></bgp-options-extended>
+            <address-families>evpn</address-families>
+            <local-address>10.91.1.1</local-address>
+            <holdtime>90</holdtime>
+            <preference>170</preference>
+            <local-as>65005</local-as>
+            <local-system-as>65000</local-system-as>
+        </bgp-option-information>
+        <flap-count>1</flap-count>
+        <last-flap-event>HoldTime</last-flap-event>
+        <bgp-error>
+            <name>Hold Timer Expired Error</name>
+            <send-count>1</send-count>
+            <receive-count>0</receive-count>
+        </bgp-error>
+        <peer-id>10.92.99.92</peer-id>  
+        <local-id>10.91.1.1</local-id>
+        <active-holdtime>90</active-holdtime>
+        <keepalive-interval>30</keepalive-interval>
+        <group-index>1</group-index>
+        <peer-index>0</peer-index>
+        <snmp-index>3</snmp-index>
+        <bgp-peer-iosession>
+            <iosession-thread-name>bgpio-0</iosession-thread-name>
+            <iosession-state>Enabled</iosession-state>
+        </bgp-peer-iosession>
+        <bgp-bfd>
+            <bfd-configuration-state>disabled</bfd-configuration-state>
+            <bfd-operational-state>down</bfd-operational-state>
+        </bgp-bfd>
+        <peer-restart-nlri-configured>evpn</peer-restart-nlri-configured>
+        <nlri-type-peer>evpn</nlri-type-peer>
+        <nlri-type-session>evpn</nlri-type-session>
+        <peer-refresh-capability>2</peer-refresh-capability>
+        <peer-stale-route-time-configured>300</peer-stale-route-time-configured>
+        <peer-no-restart/>
+        <peer-restart-flags-received>Notification</peer-restart-flags-received>
+        <peer-restart-nlri-negotiated>evpn</peer-restart-nlri-negotiated>
+        <peer-end-of-rib-received>evpn</peer-end-of-rib-received>
+        <peer-end-of-rib-sent>evpn</peer-end-of-rib-sent>
+        <peer-end-of-rib-scheduled></peer-end-of-rib-scheduled>
+        <peer-no-llgr-restarter/>
+        <peer-4byte-as-capability-advertised>65005</peer-4byte-as-capability-advertised>
+        <peer-addpath-not-supported/>
+        <bgp-rib style="detail">
+            <name>bgp.evpn.0</name>
+            <rib-bit>30000</rib-bit>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>in sync</send-state>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+            <advertised-prefix-count>17</advertised-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="detail">
+            <name>default-switch.evpn.0</name>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>not advertising</send-state>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="detail">
+            <name>__default_evpn__.evpn.0</name>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>not advertising</send-state>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <last-received>500723</last-received>
+        <last-sent>163</last-sent>
+        <last-checked>500723</last-checked>
+        <input-messages>12158</input-messages>
+        <input-updates>252</input-updates>
+        <input-refreshes>0</input-refreshes>
+        <input-octets>247532</input-octets>
+        <output-messages>12388</output-messages>
+        <output-updates>551</output-updates>
+        <output-refreshes>0</output-refreshes>
+        <output-octets>277428</output-octets>
+        <bgp-output-queue>
+            <number>2</number>
+            <count>0</count>
+            <table-name>bgp.evpn.0</table-name>
+            <rib-adv-nlri>evpn</rib-adv-nlri>
+        </bgp-output-queue>
+    </bgp-peer>
+</bgp-information>
diff --git a/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-neighbor-informationmaster.xml b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-neighbor-informationmaster.xml
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-neighbor-informationmaster.xml
@@ -0,0 +1,410 @@
+<bgp-information>
+    <bgp-peer style="detail">
+        <peer-address>10.92.51.2+179</peer-address>
+        <peer-as>65001</peer-as>
+        <local-address>10.92.51.1+49867</local-address>
+        <local-as>65000</local-as>
+        <description>Leaf1_Underlay</description>
+        <peer-group>underlay</peer-group>
+        <peer-cfg-rti>master</peer-cfg-rti>
+        <peer-fwd-rti>master</peer-fwd-rti>
+        <peer-type>External</peer-type>
+        <peer-state>Established</peer-state>
+        <peer-flags>Sync</peer-flags>
+        <last-state>OpenConfirm</last-state>
+        <last-event>RecvKeepAlive</last-event>
+        <last-error>None</last-error>
+        <bgp-option-information xmlns="http://xml.juniper.net/junos/17.3R1/junos-routing">
+            <export-policy>
+                send-direct
+            </export-policy>
+            <bgp-options>Multihop Preference Ttl AddressFamily PeerAS Multipath Refresh</bgp-options>
+            <bgp-options2>AdvertisePeerAs AcceptRemoteNextHop PeerSpecficLoopsAllowed</bgp-options2>
+            <bgp-options-extended></bgp-options-extended>
+            <address-families>inet-unicast</address-families>
+            <holdtime>90</holdtime>
+            <preference>170</preference>
+        </bgp-option-information>
+        <flap-count>0</flap-count>
+        <peer-id>10.92.99.91</peer-id>
+        <local-id>10.91.1.1</local-id>
+        <active-holdtime>90</active-holdtime>
+        <keepalive-interval>30</keepalive-interval>
+        <group-index>0</group-index>
+        <peer-index>1</peer-index>
+        <snmp-index>0</snmp-index>
+        <bgp-peer-iosession>
+            <iosession-thread-name>bgpio-0</iosession-thread-name>
+            <iosession-state>Enabled</iosession-state>
+        </bgp-peer-iosession>
+        <bgp-bfd>
+            <bfd-configuration-state>disabled</bfd-configuration-state>
+            <bfd-operational-state>down</bfd-operational-state>
+        </bgp-bfd>
+        <peer-restart-nlri-configured>inet-unicast</peer-restart-nlri-configured>
+        <nlri-type-peer>inet-unicast</nlri-type-peer>
+        <nlri-type-session>inet-unicast</nlri-type-session>
+        <peer-refresh-capability>2</peer-refresh-capability>
+        <peer-stale-route-time-configured>300</peer-stale-route-time-configured>
+        <peer-no-restart/>
+        <peer-restart-flags-received>Notification</peer-restart-flags-received>
+        <peer-restart-nlri-negotiated>inet-unicast</peer-restart-nlri-negotiated>
+        <peer-end-of-rib-received>inet-unicast</peer-end-of-rib-received>
+        <peer-end-of-rib-sent>inet-unicast</peer-end-of-rib-sent>
+        <peer-end-of-rib-scheduled></peer-end-of-rib-scheduled>
+        <peer-no-llgr-restarter/>
+        <peer-4byte-as-capability-advertised>65001</peer-4byte-as-capability-advertised>
+        <peer-addpath-not-supported/>
+        <bgp-rib style="detail">
+            <name>inet.0</name>
+            <rib-bit>20000</rib-bit>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <send-state>in sync</send-state>
+            <active-prefix-count>1</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+            <advertised-prefix-count>6</advertised-prefix-count>
+        </bgp-rib>
+        <last-received>499028</last-received>
+        <last-sent>62425</last-sent>
+        <last-checked>499028</last-checked>
+        <input-messages>2309</input-messages>
+        <input-updates>2</input-updates>
+        <input-refreshes>0</input-refreshes>
+        <input-octets>43913</input-octets>
+        <output-messages>2297</output-messages>
+        <output-updates>3</output-updates>
+        <output-refreshes>0</output-refreshes>
+        <output-octets>43774</output-octets>
+        <bgp-output-queue>
+            <number>1</number>
+            <count>0</count>
+            <table-name>inet.0</table-name>
+            <rib-adv-nlri>inet-unicast</rib-adv-nlri>
+        </bgp-output-queue>
+    </bgp-peer>
+    <bgp-peer style="detail">
+        <peer-address>10.92.52.2+179</peer-address>
+        <peer-as>65002</peer-as>
+        <local-address>10.92.52.1+62210</local-address>
+        <local-as>65000</local-as>
+        <description>Leaf2_Underlay</description>
+        <peer-group>underlay</peer-group>
+        <peer-cfg-rti>master</peer-cfg-rti>
+        <peer-fwd-rti>master</peer-fwd-rti>
+        <peer-type>External</peer-type>
+        <peer-state>Established</peer-state>
+        <peer-flags>Sync</peer-flags>
+        <last-state>OpenConfirm</last-state>
+        <last-event>RecvKeepAlive</last-event>
+        <last-error>Hold Timer Expired Error</last-error>
+        <bgp-option-information xmlns="http://xml.juniper.net/junos/17.3R1/junos-routing">
+            <export-policy>
+                send-direct
+            </export-policy>
+            <bgp-options>Multihop Preference Ttl AddressFamily PeerAS Multipath Refresh</bgp-options>
+            <bgp-options2>AdvertisePeerAs AcceptRemoteNextHop PeerSpecficLoopsAllowed</bgp-options2>
+            <bgp-options-extended></bgp-options-extended>
+            <address-families>inet-unicast</address-families>
+            <holdtime>90</holdtime>
+            <preference>170</preference>
+        </bgp-option-information>
+        <flap-count>1</flap-count>
+        <last-flap-event>HoldTime</last-flap-event>
+        <bgp-error>
+            <name>Hold Timer Expired Error</name>
+            <send-count>1</send-count>
+            <receive-count>0</receive-count>
+        </bgp-error>
+        <bgp-error>
+            <name>Cease</name>
+            <send-count>0</send-count>
+            <receive-count>2</receive-count>
+        </bgp-error>
+        <peer-id>10.92.99.92</peer-id>
+        <local-id>10.91.1.1</local-id>
+        <active-holdtime>90</active-holdtime>
+        <keepalive-interval>30</keepalive-interval>
+        <group-index>0</group-index>
+        <peer-index>0</peer-index>
+        <snmp-index>1</snmp-index>
+        <bgp-peer-iosession>            
+            <iosession-thread-name>bgpio-0</iosession-thread-name>
+            <iosession-state>Enabled</iosession-state>
+        </bgp-peer-iosession>
+        <bgp-bfd>
+            <bfd-configuration-state>disabled</bfd-configuration-state>
+            <bfd-operational-state>down</bfd-operational-state>
+        </bgp-bfd>
+        <peer-restart-nlri-configured>inet-unicast</peer-restart-nlri-configured>
+        <nlri-type-peer>inet-unicast</nlri-type-peer>
+        <nlri-type-session>inet-unicast</nlri-type-session>
+        <peer-refresh-capability>2</peer-refresh-capability>
+        <peer-stale-route-time-configured>300</peer-stale-route-time-configured>
+        <peer-no-restart/>
+        <peer-restart-flags-received>Notification</peer-restart-flags-received>
+        <peer-restart-nlri-negotiated>inet-unicast</peer-restart-nlri-negotiated>
+        <peer-end-of-rib-received>inet-unicast</peer-end-of-rib-received>
+        <peer-end-of-rib-sent>inet-unicast</peer-end-of-rib-sent>
+        <peer-end-of-rib-scheduled></peer-end-of-rib-scheduled>
+        <peer-no-llgr-restarter/>
+        <peer-4byte-as-capability-advertised>65002</peer-4byte-as-capability-advertised>
+        <peer-addpath-not-supported/>
+        <bgp-rib style="detail">
+            <name>inet.0</name>
+            <rib-bit>20000</rib-bit>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <send-state>in sync</send-state>
+            <active-prefix-count>2</active-prefix-count>
+            <received-prefix-count>4</received-prefix-count>
+            <accepted-prefix-count>4</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+            <advertised-prefix-count>5</advertised-prefix-count>
+        </bgp-rib>
+        <last-received>499028</last-received>
+        <last-sent>62496</last-sent>
+        <last-checked>499028</last-checked>
+        <input-messages>11854</input-messages>
+        <input-updates>11</input-updates>
+        <input-refreshes>0</input-refreshes>
+        <input-octets>225506</input-octets>
+        <output-messages>11786</output-messages>
+        <output-updates>11</output-updates>
+        <output-refreshes>0</output-refreshes>
+        <output-octets>224277</output-octets>
+        <bgp-output-queue>
+            <number>1</number>
+            <count>0</count>
+            <table-name>inet.0</table-name>
+            <rib-adv-nlri>inet-unicast</rib-adv-nlri>
+        </bgp-output-queue>
+    </bgp-peer>
+    <bgp-peer style="detail">
+        <peer-address>10.92.99.91+179</peer-address>
+        <peer-as>65005</peer-as>
+        <local-address>10.91.1.1+60103</local-address>
+        <local-as>65005</local-as>
+        <description>Leaf1_Overlay</description>
+        <peer-group>evpn</peer-group>
+        <peer-cfg-rti>master</peer-cfg-rti>
+        <peer-fwd-rti>master</peer-fwd-rti>
+        <peer-type>Internal</peer-type>
+        <route-reflector-client/>
+        <peer-state>Established</peer-state>
+        <peer-flags>Sync</peer-flags>
+        <last-state>OpenConfirm</last-state>
+        <last-event>RecvKeepAlive</last-event>
+        <last-error>Hold Timer Expired Error</last-error>
+        <bgp-option-information xmlns="http://xml.juniper.net/junos/17.3R1/junos-routing">
+            <bgp-options>Multihop Preference LocalAddress Ttl Cluster AddressFamily Multipath LocalAS Rib-group Refresh</bgp-options>
+            <bgp-options2></bgp-options2>
+            <bgp-options-extended></bgp-options-extended>
+            <address-families>evpn</address-families>
+            <local-address>10.91.1.1</local-address>
+            <holdtime>90</holdtime>
+            <preference>170</preference>
+            <local-as>65005</local-as>
+            <local-system-as>65000</local-system-as>
+        </bgp-option-information>
+        <flap-count>2</flap-count>
+        <last-flap-event>HoldTime</last-flap-event>
+        <bgp-error>
+            <name>Hold Timer Expired Error</name>
+            <send-count>2</send-count>
+            <receive-count>0</receive-count>
+        </bgp-error>
+        <peer-id>10.92.99.91</peer-id>
+        <local-id>10.91.1.1</local-id>
+        <active-holdtime>90</active-holdtime>
+        <keepalive-interval>30</keepalive-interval>
+        <group-index>1</group-index>
+        <peer-index>1</peer-index>
+        <snmp-index>2</snmp-index>
+        <bgp-peer-iosession>
+            <iosession-thread-name>bgpio-0</iosession-thread-name>
+            <iosession-state>Enabled</iosession-state>
+        </bgp-peer-iosession>
+        <bgp-bfd>
+            <bfd-configuration-state>disabled</bfd-configuration-state>
+            <bfd-operational-state>down</bfd-operational-state>
+        </bgp-bfd>
+        <peer-restart-nlri-configured>evpn</peer-restart-nlri-configured>
+        <nlri-type-peer>evpn</nlri-type-peer>
+        <nlri-type-session>evpn</nlri-type-session>
+        <peer-refresh-capability>2</peer-refresh-capability>
+        <peer-stale-route-time-configured>300</peer-stale-route-time-configured>
+        <peer-no-restart/>
+        <peer-restart-flags-received>Notification</peer-restart-flags-received>
+        <peer-restart-nlri-negotiated>evpn</peer-restart-nlri-negotiated>
+        <peer-end-of-rib-received>evpn</peer-end-of-rib-received>
+        <peer-end-of-rib-sent>evpn</peer-end-of-rib-sent>
+        <peer-end-of-rib-scheduled></peer-end-of-rib-scheduled>
+        <peer-no-llgr-restarter/>
+        <peer-4byte-as-capability-advertised>65005</peer-4byte-as-capability-advertised>
+        <peer-addpath-not-supported/>
+        <bgp-rib style="detail">
+            <name>bgp.evpn.0</name>
+            <rib-bit>30000</rib-bit>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>in sync</send-state>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+            <advertised-prefix-count>15</advertised-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="detail">
+            <name>default-switch.evpn.0</name>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>not advertising</send-state>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="detail">
+            <name>__default_evpn__.evpn.0</name>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>not advertising</send-state>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <last-received>499028</last-received>
+        <last-sent>304</last-sent>
+        <last-checked>499028</last-checked>
+        <input-messages>2727</input-messages>
+        <input-updates>421</input-updates>
+        <input-refreshes>0</input-refreshes>
+        <input-octets>79439</input-octets>
+        <output-messages>2508</output-messages>
+        <output-updates>215</output-updates>
+        <output-refreshes>0</output-refreshes>
+        <output-octets>63613</output-octets>
+        <bgp-output-queue>
+            <number>2</number>
+            <count>0</count>
+            <table-name>bgp.evpn.0</table-name>
+            <rib-adv-nlri>evpn</rib-adv-nlri>
+        </bgp-output-queue>
+    </bgp-peer>
+    <bgp-peer style="detail">
+        <peer-address>10.92.99.92+57881</peer-address>
+        <peer-as>65005</peer-as>
+        <local-address>10.91.1.1+179</local-address>
+        <local-as>65005</local-as>
+        <description>Leaf2_Overlay</description>
+        <peer-group>evpn</peer-group>
+        <peer-cfg-rti>master</peer-cfg-rti>
+        <peer-fwd-rti>master</peer-fwd-rti>
+        <peer-type>Internal</peer-type>
+        <route-reflector-client/>
+        <peer-state>Established</peer-state>
+        <peer-flags>Sync</peer-flags>
+        <last-state>OpenConfirm</last-state>
+        <last-event>RecvKeepAlive</last-event>
+        <last-error>Hold Timer Expired Error</last-error>
+        <bgp-option-information xmlns="http://xml.juniper.net/junos/17.3R1/junos-routing">
+            <bgp-options>Multihop Preference LocalAddress Ttl Cluster AddressFamily Multipath LocalAS Rib-group Refresh</bgp-options>
+            <bgp-options2></bgp-options2>
+            <bgp-options-extended></bgp-options-extended>
+            <address-families>evpn</address-families>
+            <local-address>10.91.1.1</local-address>
+            <holdtime>90</holdtime>
+            <preference>170</preference>
+            <local-as>65005</local-as>
+            <local-system-as>65000</local-system-as>
+        </bgp-option-information>
+        <flap-count>1</flap-count>
+        <last-flap-event>HoldTime</last-flap-event>
+        <bgp-error>
+            <name>Hold Timer Expired Error</name>
+            <send-count>1</send-count>
+            <receive-count>0</receive-count>
+        </bgp-error>
+        <peer-id>10.92.99.92</peer-id>  
+        <local-id>10.91.1.1</local-id>
+        <active-holdtime>90</active-holdtime>
+        <keepalive-interval>30</keepalive-interval>
+        <group-index>1</group-index>
+        <peer-index>0</peer-index>
+        <snmp-index>3</snmp-index>
+        <bgp-peer-iosession>
+            <iosession-thread-name>bgpio-0</iosession-thread-name>
+            <iosession-state>Enabled</iosession-state>
+        </bgp-peer-iosession>
+        <bgp-bfd>
+            <bfd-configuration-state>disabled</bfd-configuration-state>
+            <bfd-operational-state>down</bfd-operational-state>
+        </bgp-bfd>
+        <peer-restart-nlri-configured>evpn</peer-restart-nlri-configured>
+        <nlri-type-peer>evpn</nlri-type-peer>
+        <nlri-type-session>evpn</nlri-type-session>
+        <peer-refresh-capability>2</peer-refresh-capability>
+        <peer-stale-route-time-configured>300</peer-stale-route-time-configured>
+        <peer-no-restart/>
+        <peer-restart-flags-received>Notification</peer-restart-flags-received>
+        <peer-restart-nlri-negotiated>evpn</peer-restart-nlri-negotiated>
+        <peer-end-of-rib-received>evpn</peer-end-of-rib-received>
+        <peer-end-of-rib-sent>evpn</peer-end-of-rib-sent>
+        <peer-end-of-rib-scheduled></peer-end-of-rib-scheduled>
+        <peer-no-llgr-restarter/>
+        <peer-4byte-as-capability-advertised>65005</peer-4byte-as-capability-advertised>
+        <peer-addpath-not-supported/>
+        <bgp-rib style="detail">
+            <name>bgp.evpn.0</name>
+            <rib-bit>30000</rib-bit>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>in sync</send-state>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+            <advertised-prefix-count>17</advertised-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="detail">
+            <name>default-switch.evpn.0</name>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>not advertising</send-state>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="detail">
+            <name>__default_evpn__.evpn.0</name>
+            <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+            <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+            <send-state>not advertising</send-state>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <last-received>499029</last-received>
+        <last-sent>274</last-sent>
+        <last-checked>499029</last-checked>
+        <input-messages>12089</input-messages>
+        <input-updates>246</input-updates>
+        <input-refreshes>0</input-refreshes>
+        <input-octets>245828</input-octets>
+        <output-messages>12313</output-messages>
+        <output-updates>539</output-updates>
+        <output-refreshes>0</output-refreshes>
+        <output-octets>275133</output-octets>
+        <bgp-output-queue>
+            <number>2</number>
+            <count>0</count>
+            <table-name>bgp.evpn.0</table-name>
+            <rib-adv-nlri>evpn</rib-adv-nlri>
+        </bgp-output-queue>
+    </bgp-peer>
+</bgp-information>
+
diff --git a/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-summary-information.xml b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-summary-information.xml
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-summary-information.xml
@@ -0,0 +1,146 @@
+<bgp-information>
+    <group-count>2</group-count>
+    <peer-count>4</peer-count>
+    <down-peer-count>0</down-peer-count>
+    <bgp-rib style="brief">
+        <name>inet.0</name>
+        <total-prefix-count>7</total-prefix-count>
+        <received-prefix-count>7</received-prefix-count>
+        <accepted-prefix-count>7</accepted-prefix-count>
+        <active-prefix-count>3</active-prefix-count>
+        <suppressed-prefix-count>0</suppressed-prefix-count>
+        <history-prefix-count>0</history-prefix-count>
+        <damped-prefix-count>0</damped-prefix-count>
+        <total-external-prefix-count>7</total-external-prefix-count>
+        <active-external-prefix-count>3</active-external-prefix-count>
+        <accepted-external-prefix-count>7</accepted-external-prefix-count>
+        <suppressed-external-prefix-count>0</suppressed-external-prefix-count>
+        <total-internal-prefix-count>0</total-internal-prefix-count>
+        <active-internal-prefix-count>0</active-internal-prefix-count>
+        <accepted-internal-prefix-count>0</accepted-internal-prefix-count>
+        <suppressed-internal-prefix-count>0</suppressed-internal-prefix-count>
+        <pending-prefix-count>0</pending-prefix-count>
+        <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+    </bgp-rib>
+    <bgp-rib style="brief">
+        <name>bgp.evpn.0</name>
+        <total-prefix-count>3</total-prefix-count>
+        <received-prefix-count>3</received-prefix-count>
+        <accepted-prefix-count>3</accepted-prefix-count>
+        <active-prefix-count>3</active-prefix-count>
+        <suppressed-prefix-count>0</suppressed-prefix-count>
+        <history-prefix-count>0</history-prefix-count>
+        <damped-prefix-count>0</damped-prefix-count>
+        <total-external-prefix-count>0</total-external-prefix-count>
+        <active-external-prefix-count>0</active-external-prefix-count>
+        <accepted-external-prefix-count>0</accepted-external-prefix-count>
+        <suppressed-external-prefix-count>0</suppressed-external-prefix-count>
+        <total-internal-prefix-count>3</total-internal-prefix-count>
+        <active-internal-prefix-count>3</active-internal-prefix-count>
+        <accepted-internal-prefix-count>3</accepted-internal-prefix-count>
+        <suppressed-internal-prefix-count>0</suppressed-internal-prefix-count>
+        <pending-prefix-count>0</pending-prefix-count>
+        <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+        <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+    </bgp-rib>
+    <bgp-peer style="terse" heading="Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...">
+        <peer-address>10.92.51.2</peer-address>
+        <peer-as>65001</peer-as>
+        <input-messages>332</input-messages>
+        <output-messages>331</output-messages>
+        <route-queue-count>0</route-queue-count>
+        <flap-count>0</flap-count>
+        <elapsed-time seconds="8918">2:28:38</elapsed-time>
+        <description>Leaf1_Underlay</description>
+        <peer-state format="Establ">Established</peer-state>
+        <bgp-rib style="terse">
+            <name>inet.0</name>
+            <active-prefix-count>2</active-prefix-count>
+            <received-prefix-count>4</received-prefix-count>
+            <accepted-prefix-count>4</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+    </bgp-peer>
+    <bgp-peer style="terse">
+        <peer-address>10.92.52.2</peer-address>
+        <peer-as>65002</peer-as>        
+        <input-messages>339</input-messages>
+        <output-messages>337</output-messages>
+        <route-queue-count>0</route-queue-count>
+        <flap-count>1</flap-count>
+        <elapsed-time seconds="9072">2:31:12</elapsed-time>
+        <description>Leaf2_Underlay</description>
+        <peer-state format="Establ">Established</peer-state>
+        <bgp-rib style="terse">
+            <name>inet.0</name>
+            <active-prefix-count>1</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+    </bgp-peer>
+    <bgp-peer style="terse">
+        <peer-address>10.92.99.91</peer-address>
+        <peer-as>65005</peer-as>
+        <input-messages>332</input-messages>
+        <output-messages>336</output-messages>
+        <route-queue-count>0</route-queue-count>
+        <flap-count>0</flap-count>
+        <elapsed-time seconds="8913">2:28:33</elapsed-time>
+        <description>Leaf1_Overlay</description>
+        <peer-state format="Establ">Established</peer-state>
+        <bgp-rib style="terse">
+            <name>__default_evpn__.evpn.0</name>
+            <active-prefix-count>0</active-prefix-count>
+            <received-prefix-count>0</received-prefix-count>
+            <accepted-prefix-count>0</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="terse">
+            <name>bgp.evpn.0</name>
+            <active-prefix-count>1</active-prefix-count>
+            <received-prefix-count>1</received-prefix-count>
+            <accepted-prefix-count>1</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="terse">
+            <name>default-switch.evpn.0</name>
+            <active-prefix-count>1</active-prefix-count>
+            <received-prefix-count>1</received-prefix-count>
+            <accepted-prefix-count>1</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+    </bgp-peer>
+    <bgp-peer style="terse">
+        <peer-address>10.92.99.92</peer-address>
+        <peer-as>65005</peer-as>
+        <input-messages>339</input-messages>
+        <output-messages>344</output-messages>
+        <route-queue-count>0</route-queue-count>
+        <flap-count>1</flap-count>
+        <elapsed-time seconds="9068">2:31:08</elapsed-time>
+        <description>Leaf2_Overlay</description>
+        <peer-state format="Establ">Established</peer-state>
+        <bgp-rib style="terse">
+            <name>__default_evpn__.evpn.0</name>
+            <active-prefix-count>0</active-prefix-count>
+            <received-prefix-count>0</received-prefix-count>
+            <accepted-prefix-count>0</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="terse">
+            <name>bgp.evpn.0</name>     
+            <active-prefix-count>2</active-prefix-count>
+            <received-prefix-count>2</received-prefix-count>
+            <accepted-prefix-count>2</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="terse">
+            <name>default-switch.evpn.0</name>
+            <active-prefix-count>2</active-prefix-count>
+            <received-prefix-count>2</received-prefix-count>
+            <accepted-prefix-count>2</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+    </bgp-peer>
+</bgp-information>
diff --git a/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-summary-informationmaster.xml b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-summary-informationmaster.xml
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-bgp-summary-informationmaster.xml
@@ -0,0 +1,146 @@
+<bgp-information>
+    <group-count>2</group-count>
+    <peer-count>4</peer-count>
+    <down-peer-count>0</down-peer-count>
+    <bgp-rib style="brief">
+        <name>inet.0</name>
+        <total-prefix-count>7</total-prefix-count>
+        <received-prefix-count>7</received-prefix-count>
+        <accepted-prefix-count>7</accepted-prefix-count>
+        <active-prefix-count>3</active-prefix-count>
+        <suppressed-prefix-count>0</suppressed-prefix-count>
+        <history-prefix-count>0</history-prefix-count>
+        <damped-prefix-count>0</damped-prefix-count>
+        <total-external-prefix-count>7</total-external-prefix-count>
+        <active-external-prefix-count>3</active-external-prefix-count>
+        <accepted-external-prefix-count>7</accepted-external-prefix-count>
+        <suppressed-external-prefix-count>0</suppressed-external-prefix-count>
+        <total-internal-prefix-count>0</total-internal-prefix-count>
+        <active-internal-prefix-count>0</active-internal-prefix-count>
+        <accepted-internal-prefix-count>0</accepted-internal-prefix-count>
+        <suppressed-internal-prefix-count>0</suppressed-internal-prefix-count>
+        <pending-prefix-count>0</pending-prefix-count>
+        <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+    </bgp-rib>
+    <bgp-rib style="brief">
+        <name>bgp.evpn.0</name>
+        <total-prefix-count>8</total-prefix-count>
+        <received-prefix-count>8</received-prefix-count>
+        <accepted-prefix-count>8</accepted-prefix-count>
+        <active-prefix-count>8</active-prefix-count>
+        <suppressed-prefix-count>0</suppressed-prefix-count>
+        <history-prefix-count>0</history-prefix-count>
+        <damped-prefix-count>0</damped-prefix-count>
+        <total-external-prefix-count>0</total-external-prefix-count>
+        <active-external-prefix-count>0</active-external-prefix-count>
+        <accepted-external-prefix-count>0</accepted-external-prefix-count>
+        <suppressed-external-prefix-count>0</suppressed-external-prefix-count>
+        <total-internal-prefix-count>8</total-internal-prefix-count>
+        <active-internal-prefix-count>8</active-internal-prefix-count>
+        <accepted-internal-prefix-count>8</accepted-internal-prefix-count>
+        <suppressed-internal-prefix-count>0</suppressed-internal-prefix-count>
+        <pending-prefix-count>0</pending-prefix-count>
+        <bgp-rib-state>BGP restart is complete</bgp-rib-state>
+        <vpn-rib-state>VPN restart is complete</vpn-rib-state>
+    </bgp-rib>
+    <bgp-peer style="terse" heading="Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...">
+        <peer-address>10.92.51.2</peer-address>
+        <peer-as>65001</peer-as>
+        <input-messages>2271</input-messages>
+        <output-messages>2259</output-messages>
+        <route-queue-count>0</route-queue-count>
+        <flap-count>0</flap-count>
+        <elapsed-time seconds="61468">17:04:28</elapsed-time>
+        <description>Leaf1_Underlay</description>
+        <peer-state format="Establ">Established</peer-state>
+        <bgp-rib style="terse">
+            <name>inet.0</name>
+            <active-prefix-count>1</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+    </bgp-peer>
+    <bgp-peer style="terse">
+        <peer-address>10.92.52.2</peer-address>
+        <peer-as>65002</peer-as>        
+        <input-messages>11815</input-messages>
+        <output-messages>11748</output-messages>
+        <route-queue-count>0</route-queue-count>
+        <flap-count>1</flap-count>
+        <elapsed-time seconds="320020">3d 16:53:40</elapsed-time>
+        <description>Leaf2_Underlay</description>
+        <peer-state format="Establ">Established</peer-state>
+        <bgp-rib style="terse">
+            <name>inet.0</name>
+            <active-prefix-count>2</active-prefix-count>
+            <received-prefix-count>4</received-prefix-count>
+            <accepted-prefix-count>4</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+    </bgp-peer>
+    <bgp-peer style="terse">
+        <peer-address>10.92.99.91</peer-address>
+        <peer-as>65005</peer-as>
+        <input-messages>2684</input-messages>
+        <output-messages>2467</output-messages>
+        <route-queue-count>0</route-queue-count>
+        <flap-count>2</flap-count>
+        <elapsed-time seconds="61458">17:04:18</elapsed-time>
+        <description>Leaf1_Overlay</description>
+        <peer-state format="Establ">Established</peer-state>
+        <bgp-rib style="terse">
+            <name>bgp.evpn.0</name>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="terse">
+            <name>default-switch.evpn.0</name>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="terse">
+            <name>__default_evpn__.evpn.0</name>
+            <active-prefix-count>5</active-prefix-count>
+            <received-prefix-count>5</received-prefix-count>
+            <accepted-prefix-count>5</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+    </bgp-peer>
+    <bgp-peer style="terse">
+        <peer-address>10.92.99.92</peer-address>
+        <peer-as>65005</peer-as>
+        <input-messages>12047</input-messages>
+        <output-messages>12271</output-messages>
+        <route-queue-count>0</route-queue-count>
+        <flap-count>1</flap-count>
+        <elapsed-time seconds="320013">3d 16:53:33</elapsed-time>
+        <description>Leaf2_Overlay</description>
+        <peer-state format="Establ">Established</peer-state>
+        <bgp-rib style="terse">
+            <name>bgp.evpn.0</name>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="terse">
+            <name>default-switch.evpn.0</name>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+        <bgp-rib style="terse">
+            <name>__default_evpn__.evpn.0</name>
+            <active-prefix-count>3</active-prefix-count>
+            <received-prefix-count>3</received-prefix-count>
+            <accepted-prefix-count>3</accepted-prefix-count>
+            <suppressed-prefix-count>0</suppressed-prefix-count>
+        </bgp-rib>
+    </bgp-peer>
+</bgp-information>
diff --git a/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-instance-information.xml b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-instance-information.xml
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_bgp_neighbors/use-send-state-pr209/get-instance-information.xml
@@ -0,0 +1,24 @@
+<instance-information style="terse">
+    <instance-core>
+        <instance-name>master</instance-name>
+        <instance-type>forwarding</instance-type>
+        <instance-rib>
+            <irib-name>inet.0</irib-name>
+            <irib-active-count>12</irib-active-count>
+            <irib-holddown-count>0</irib-holddown-count>
+            <irib-hidden-count>0</irib-hidden-count>
+        </instance-rib>
+        <instance-rib>
+            <irib-name>inet6.0</irib-name>
+            <irib-active-count>2</irib-active-count>
+            <irib-holddown-count>0</irib-holddown-count>
+            <irib-hidden-count>0</irib-hidden-count>
+        </instance-rib>
+        <instance-rib>
+            <irib-name>evpn.0</irib-name>
+            <irib-active-count>20</irib-active-count>
+            <irib-holddown-count>0</irib-holddown-count>
+            <irib-hidden-count>0</irib-hidden-count>
+        </instance-rib>
+    </instance-core>
+</instance-information>
diff --git a/test/unit/mocked_data/test_get_environment/normal/get-power-usage-information-detail.xml b/test/unit/mocked_data/test_get_environment/normal/get-power-usage-information-detail.xml
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_environment/normal/get-power-usage-information-detail.xml
@@ -0,0 +1,4 @@
+<power-usage-information>
+   <power-usage-item>
+   </power-usage-item>
+</power-usage-information>
diff --git a/test/unit/mocked_data/test_get_environment/virtualchassis/get-power-usage-information-detail.xml b/test/unit/mocked_data/test_get_environment/virtualchassis/get-power-usage-information-detail.xml
new file mode 100644
--- /dev/null
+++ b/test/unit/mocked_data/test_get_environment/virtualchassis/get-power-usage-information-detail.xml
@@ -0,0 +1,4 @@
+<power-usage-information>
+   <power-usage-item>
+   </power-usage-item>
+</power-usage-information>