We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bond parser is not collecting data for currently active primary_slave
current parser is unable to collect data for "Primary Slave" key.

```
Bonding Mode: fault-tolerance (active-backup)
**Primary Slave: eth6 (primary_reselect failure)**
Currently Active Slave: eth7
MII Status: up
MII Polling Interval (ms): 200
Up Delay (ms): 0
Down Delay (ms): 0
```

Requested a PR: https://github.com/RedHatInsights/insights-core/pull/2465

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `insights/parsers/bond.py`
Content:
```
1 """
2 Bond - file ``/proc/net/bonding``
3 =================================
4 
5 Provides plugins access to the network bonding information gathered from
6 all the files starteing with "bond." located in the
7 ``/proc/net/bonding`` directory.
8 
9 Typical content of ``bond.*`` file is::
10 
11     Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)
12 
13     Bonding Mode: IEEE 802.3ad Dynamic link aggregation
14     Transmit Hash Policy: layer2 (0)
15     MII Status: up
16     MII Polling Interval (ms): 500
17     Up Delay (ms): 0
18     Down Delay (ms): 0
19 
20     802.3ad info
21     LACP rate: slow
22     Active Aggregator Info:
23             Aggregator ID: 3
24             Number of ports: 1
25             Actor Key: 17
26             Partner Key: 1
27             Partner Mac Address: 00:00:00:00:00:00
28 
29     Slave Interface: eth1
30     MII Status: up
31     Link Failure Count: 0
32     Permanent HW addr: 00:16:35:5e:42:fc
33     Aggregator ID: 3
34 
35     Slave Interface: eth2
36     MII Status: up
37     Link Failure Count: 0
38     Permanent HW addr: 00:16:35:5e:02:7e
39     Aggregator ID: 2
40 
41 Data is modeled as an array of ``Bond`` objects (``bond`` being a
42 pattern file specification gathering data from files located in
43 ``/proc/net/bonding``.
44 
45 Examples:
46     >>> type(bond_info)
47     <class 'insights.parsers.bond.Bond'>
48     >>> bond_info.bond_mode
49     '4'
50     >>> bond_info.partner_mac_address
51     '00:00:00:00:00:00'
52     >>> bond_info.slave_interface
53     ['eth1', 'eth2']
54     >>> bond_info.aggregator_id
55     ['3', '3', '2']
56     >>> bond_info.xmit_hash_policy
57     'layer2'
58     >>> bond_info.active_slave
59     >>> bond_info.slave_duplex
60     ['full', 'full']
61     >>> bond_info.slave_speed
62     ['1000 Mbps', '1000 Mbps']
63 """
64 
65 from insights import Parser, parser, get_active_lines
66 from insights.specs import Specs
67 from insights.parsers import ParseException
68 
69 
70 """dict: bonding mode parameter string linked to bond type index."""
71 BOND_PREFIX_MAP = {
72     'load balancing (round-robin)': '0',
73     'fault-tolerance (active-backup)': '1',
74     'fault-tolerance (active-backup) (fail_over_mac active)': '1',
75     'load balancing (xor)': '2',
76     'fault-tolerance (broadcast)': '3',
77     'IEEE 802.3ad Dynamic link aggregation': '4',
78     'transmit load balancing': '5',
79     'adaptive load balancing': '6'
80 }
81 
82 
83 @parser(Specs.bond)
84 class Bond(Parser):
85     """
86     Models the ``/proc/net/bonding`` file.
87 
88     Currently used information from ``/proc/net/bonding`` includes
89     the "bond mode" and "partner mac address".
90     """
91 
92     def parse_content(self, content):
93         self._bond_mode = None
94         self._partner_mac_address = None
95         self._active_slave = None
96         self.xmit_hash_policy = None
97         self._arp_polling_interval = None
98         self._arp_ip_target = None
99         self._slave_interface = []
100         self._aggregator_id = []
101         self._mii_status = []
102         self._slave_link_failure_count = []
103         self._slave_speed = []
104         self._slave_duplex = []
105 
106         for line in get_active_lines(content):
107             if line.startswith("Bonding Mode: "):
108                 raw_mode = line.split(":", 1)[1].strip()
109                 self._bond_mode = raw_mode
110                 if raw_mode in BOND_PREFIX_MAP:
111                     self._bond_mode = BOND_PREFIX_MAP[raw_mode]
112                 else:
113                     raise ParseException("Unrecognised bonding mode '{b}'".format(b=raw_mode))
114             elif line.startswith("Partner Mac Address: "):
115                 self._partner_mac_address = line.split(":", 1)[1].strip()
116             elif line.startswith("Slave Interface: "):
117                 self._slave_interface.append(line.split(":", 1)[1].strip())
118             elif line.strip().startswith("Aggregator ID: "):
119                 self._aggregator_id.append(line.strip().split(':', 1)[1].strip())
120             elif line.strip().startswith("Transmit Hash Policy"):
121                 # No need of values in bracket:
122                 # Integer notification (0), (1), (2) of layer2, layer3+4, layer2+3 resp
123                 self.xmit_hash_policy = line.split(":", 1)[1].split()[0]
124             elif line.strip().startswith("Currently Active Slave"):
125                 self._active_slave = line.split(":", 1)[1].split()[0]
126             elif line.strip().startswith("MII Status: "):
127                 self._mii_status.append(line.strip().split(':', 1)[1].strip())
128             elif line.strip().startswith("Link Failure Count: "):
129                 self._slave_link_failure_count.append(line.strip().split(':', 1)[1].strip())
130             elif line.strip().startswith("Speed: "):
131                 self._slave_speed.append(line.strip().split(':', 1)[1].strip())
132             elif line.strip().startswith("Duplex: "):
133                 self._slave_duplex.append(line.strip().split(':', 1)[1].strip())
134             elif line.strip().startswith("ARP Polling Interval (ms):"):
135                 self._arp_polling_interval = line.strip().split(':', 1)[1].strip()
136             elif line.strip().startswith("ARP IP target/s (n.n.n.n form):"):
137                 self._arp_ip_target = line.strip().split(':', 1)[1].strip()
138 
139     @property
140     def bond_mode(self):
141         """Returns the bond mode number as a string, or if there is no
142         known mapping to a number, the raw "Bonding Mode" value.
143         ``None`` is returned if no "Bonding Mode" key is found.
144         """
145         return self._bond_mode
146 
147     @property
148     def partner_mac_address(self):
149         """Returns the value of the "Partner Mac Address" in the bond
150         file if the key/value exists.  If the key is not in the bond
151         file, ``None`` is returned.
152         """
153         return self._partner_mac_address
154 
155     @property
156     def slave_interface(self):
157         """Returns all the slave interfaces of in the bond file wrapped
158         a list if the key/value exists.  If the key is not in the
159         bond file, ``[]`` is returned.
160         """
161         return self._slave_interface
162 
163     @property
164     def aggregator_id(self):
165         """Returns all the aggregator id of in the bond file wrapped
166         a list if the key/value exists.  If the key is not in the
167         bond file, ``[]`` is returned.
168         """
169         return self._aggregator_id
170 
171     @property
172     def active_slave(self):
173         """Returns the active slave of the "Currently Active Slave" in the bond
174         file if key/value exists. If the key is not in the bond file, ``None``
175         is returned.
176         """
177         return self._active_slave
178 
179     @property
180     def mii_status(self):
181         """Returns the master and all the slaves "MII Status" value in the bond file wrapped
182         a list if the key/value exists.  If the key is not in the
183         bond file, ``[]`` is returned.
184         """
185         return self._mii_status
186 
187     @property
188     def slave_link_failure_count(self):
189         """Returns all the slaves "Link Failure Count" value in the bond file wrapped
190         a list if the key/value exists.  If the key is not in the
191         bond file, ``[]`` is returned.
192         """
193         return self._slave_link_failure_count
194 
195     @property
196     def slave_speed(self):
197         """Returns all the slaves "Speed" value in the bond file wrapped
198         a list if the key/value exists.  If the key is not in the
199         bond file, ``[]`` is returned.
200         """
201         return self._slave_speed
202 
203     @property
204     def slave_duplex(self):
205         """Returns all the slave "Duplex" value in the bond file wrapped
206         a list if the key/value exists.  If the key is not in the
207         bond file, ``[]`` is returned.
208         """
209         return self._slave_duplex
210 
211     @property
212     def arp_polling_interval(self):
213         """Returns the arp polling interval as a string. ``None`` is returned
214         if no "ARP Polling Interval (ms)" key is found.
215         """
216         return self._arp_polling_interval
217 
218     @property
219     def arp_ip_target(self):
220         """Returns the arp ip target as a string. ``None`` is returned
221         if no "ARP IP target/s (n.n.n.n form)" key is found.
222         """
223         return self._arp_ip_target
224
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/insights/parsers/bond.py b/insights/parsers/bond.py
--- a/insights/parsers/bond.py
+++ b/insights/parsers/bond.py
@@ -102,6 +102,7 @@
         self._slave_link_failure_count = []
         self._slave_speed = []
         self._slave_duplex = []
+        self._primary_slave = None
 
         for line in get_active_lines(content):
             if line.startswith("Bonding Mode: "):
@@ -135,6 +136,8 @@
                 self._arp_polling_interval = line.strip().split(':', 1)[1].strip()
             elif line.strip().startswith("ARP IP target/s (n.n.n.n form):"):
                 self._arp_ip_target = line.strip().split(':', 1)[1].strip()
+            elif line.strip().startswith("Primary Slave"):
+                self._primary_slave = line.split(":", 1)[1].split()[0]
 
     @property
     def bond_mode(self):
@@ -221,3 +224,10 @@
         if no "ARP IP target/s (n.n.n.n form)" key is found.
         """
         return self._arp_ip_target
+
+    @property
+    def primary_slave(self):
+        """Returns the "Primary Slave" in the bond file if key/value exists.
+        If the key is not in the bond file, ``None`` is returned.
+        """
+        return self._primary_slave

{"golden_diff": "diff --git a/insights/parsers/bond.py b/insights/parsers/bond.py\n--- a/insights/parsers/bond.py\n+++ b/insights/parsers/bond.py\n@@ -102,6 +102,7 @@\n         self._slave_link_failure_count = []\n         self._slave_speed = []\n         self._slave_duplex = []\n+        self._primary_slave = None\n \n         for line in get_active_lines(content):\n             if line.startswith(\"Bonding Mode: \"):\n@@ -135,6 +136,8 @@\n                 self._arp_polling_interval = line.strip().split(':', 1)[1].strip()\n             elif line.strip().startswith(\"ARP IP target/s (n.n.n.n form):\"):\n                 self._arp_ip_target = line.strip().split(':', 1)[1].strip()\n+            elif line.strip().startswith(\"Primary Slave\"):\n+                self._primary_slave = line.split(\":\", 1)[1].split()[0]\n \n     @property\n     def bond_mode(self):\n@@ -221,3 +224,10 @@\n         if no \"ARP IP target/s (n.n.n.n form)\" key is found.\n         \"\"\"\n         return self._arp_ip_target\n+\n+    @property\n+    def primary_slave(self):\n+        \"\"\"Returns the \"Primary Slave\" in the bond file if key/value exists.\n+        If the key is not in the bond file, ``None`` is returned.\n+        \"\"\"\n+        return self._primary_slave\n", "issue": "Bond parser is not collecting data for currently active primary_slave\ncurrent parser is unable to collect data for \"Primary Slave\" key.\r\n\r\n```\r\nBonding Mode: fault-tolerance (active-backup)\r\n**Primary Slave: eth6 (primary_reselect failure)**\r\nCurrently Active Slave: eth7\r\nMII Status: up\r\nMII Polling Interval (ms): 200\r\nUp Delay (ms): 0\r\nDown Delay (ms): 0\r\n```\r\n\r\nRequested a PR: https://github.com/RedHatInsights/insights-core/pull/2465\n", "before_files": [{"content": "\"\"\"\nBond - file ``/proc/net/bonding``\n=================================\n\nProvides plugins access to the network bonding information gathered from\nall the files starteing with \"bond.\" located in the\n``/proc/net/bonding`` directory.\n\nTypical content of ``bond.*`` file is::\n\n    Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)\n\n    Bonding Mode: IEEE 802.3ad Dynamic link aggregation\n    Transmit Hash Policy: layer2 (0)\n    MII Status: up\n    MII Polling Interval (ms): 500\n    Up Delay (ms): 0\n    Down Delay (ms): 0\n\n    802.3ad info\n    LACP rate: slow\n    Active Aggregator Info:\n            Aggregator ID: 3\n            Number of ports: 1\n            Actor Key: 17\n            Partner Key: 1\n            Partner Mac Address: 00:00:00:00:00:00\n\n    Slave Interface: eth1\n    MII Status: up\n    Link Failure Count: 0\n    Permanent HW addr: 00:16:35:5e:42:fc\n    Aggregator ID: 3\n\n    Slave Interface: eth2\n    MII Status: up\n    Link Failure Count: 0\n    Permanent HW addr: 00:16:35:5e:02:7e\n    Aggregator ID: 2\n\nData is modeled as an array of ``Bond`` objects (``bond`` being a\npattern file specification gathering data from files located in\n``/proc/net/bonding``.\n\nExamples:\n    >>> type(bond_info)\n    <class 'insights.parsers.bond.Bond'>\n    >>> bond_info.bond_mode\n    '4'\n    >>> bond_info.partner_mac_address\n    '00:00:00:00:00:00'\n    >>> bond_info.slave_interface\n    ['eth1', 'eth2']\n    >>> bond_info.aggregator_id\n    ['3', '3', '2']\n    >>> bond_info.xmit_hash_policy\n    'layer2'\n    >>> bond_info.active_slave\n    >>> bond_info.slave_duplex\n    ['full', 'full']\n    >>> bond_info.slave_speed\n    ['1000 Mbps', '1000 Mbps']\n\"\"\"\n\nfrom insights import Parser, parser, get_active_lines\nfrom insights.specs import Specs\nfrom insights.parsers import ParseException\n\n\n\"\"\"dict: bonding mode parameter string linked to bond type index.\"\"\"\nBOND_PREFIX_MAP = {\n    'load balancing (round-robin)': '0',\n    'fault-tolerance (active-backup)': '1',\n    'fault-tolerance (active-backup) (fail_over_mac active)': '1',\n    'load balancing (xor)': '2',\n    'fault-tolerance (broadcast)': '3',\n    'IEEE 802.3ad Dynamic link aggregation': '4',\n    'transmit load balancing': '5',\n    'adaptive load balancing': '6'\n}\n\n\n@parser(Specs.bond)\nclass Bond(Parser):\n    \"\"\"\n    Models the ``/proc/net/bonding`` file.\n\n    Currently used information from ``/proc/net/bonding`` includes\n    the \"bond mode\" and \"partner mac address\".\n    \"\"\"\n\n    def parse_content(self, content):\n        self._bond_mode = None\n        self._partner_mac_address = None\n        self._active_slave = None\n        self.xmit_hash_policy = None\n        self._arp_polling_interval = None\n        self._arp_ip_target = None\n        self._slave_interface = []\n        self._aggregator_id = []\n        self._mii_status = []\n        self._slave_link_failure_count = []\n        self._slave_speed = []\n        self._slave_duplex = []\n\n        for line in get_active_lines(content):\n            if line.startswith(\"Bonding Mode: \"):\n                raw_mode = line.split(\":\", 1)[1].strip()\n                self._bond_mode = raw_mode\n                if raw_mode in BOND_PREFIX_MAP:\n                    self._bond_mode = BOND_PREFIX_MAP[raw_mode]\n                else:\n                    raise ParseException(\"Unrecognised bonding mode '{b}'\".format(b=raw_mode))\n            elif line.startswith(\"Partner Mac Address: \"):\n                self._partner_mac_address = line.split(\":\", 1)[1].strip()\n            elif line.startswith(\"Slave Interface: \"):\n                self._slave_interface.append(line.split(\":\", 1)[1].strip())\n            elif line.strip().startswith(\"Aggregator ID: \"):\n                self._aggregator_id.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"Transmit Hash Policy\"):\n                # No need of values in bracket:\n                # Integer notification (0), (1), (2) of layer2, layer3+4, layer2+3 resp\n                self.xmit_hash_policy = line.split(\":\", 1)[1].split()[0]\n            elif line.strip().startswith(\"Currently Active Slave\"):\n                self._active_slave = line.split(\":\", 1)[1].split()[0]\n            elif line.strip().startswith(\"MII Status: \"):\n                self._mii_status.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"Link Failure Count: \"):\n                self._slave_link_failure_count.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"Speed: \"):\n                self._slave_speed.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"Duplex: \"):\n                self._slave_duplex.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"ARP Polling Interval (ms):\"):\n                self._arp_polling_interval = line.strip().split(':', 1)[1].strip()\n            elif line.strip().startswith(\"ARP IP target/s (n.n.n.n form):\"):\n                self._arp_ip_target = line.strip().split(':', 1)[1].strip()\n\n    @property\n    def bond_mode(self):\n        \"\"\"Returns the bond mode number as a string, or if there is no\n        known mapping to a number, the raw \"Bonding Mode\" value.\n        ``None`` is returned if no \"Bonding Mode\" key is found.\n        \"\"\"\n        return self._bond_mode\n\n    @property\n    def partner_mac_address(self):\n        \"\"\"Returns the value of the \"Partner Mac Address\" in the bond\n        file if the key/value exists.  If the key is not in the bond\n        file, ``None`` is returned.\n        \"\"\"\n        return self._partner_mac_address\n\n    @property\n    def slave_interface(self):\n        \"\"\"Returns all the slave interfaces of in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._slave_interface\n\n    @property\n    def aggregator_id(self):\n        \"\"\"Returns all the aggregator id of in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._aggregator_id\n\n    @property\n    def active_slave(self):\n        \"\"\"Returns the active slave of the \"Currently Active Slave\" in the bond\n        file if key/value exists. If the key is not in the bond file, ``None``\n        is returned.\n        \"\"\"\n        return self._active_slave\n\n    @property\n    def mii_status(self):\n        \"\"\"Returns the master and all the slaves \"MII Status\" value in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._mii_status\n\n    @property\n    def slave_link_failure_count(self):\n        \"\"\"Returns all the slaves \"Link Failure Count\" value in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._slave_link_failure_count\n\n    @property\n    def slave_speed(self):\n        \"\"\"Returns all the slaves \"Speed\" value in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._slave_speed\n\n    @property\n    def slave_duplex(self):\n        \"\"\"Returns all the slave \"Duplex\" value in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._slave_duplex\n\n    @property\n    def arp_polling_interval(self):\n        \"\"\"Returns the arp polling interval as a string. ``None`` is returned\n        if no \"ARP Polling Interval (ms)\" key is found.\n        \"\"\"\n        return self._arp_polling_interval\n\n    @property\n    def arp_ip_target(self):\n        \"\"\"Returns the arp ip target as a string. ``None`` is returned\n        if no \"ARP IP target/s (n.n.n.n form)\" key is found.\n        \"\"\"\n        return self._arp_ip_target\n", "path": "insights/parsers/bond.py"}], "after_files": [{"content": "\"\"\"\nBond - file ``/proc/net/bonding``\n=================================\n\nProvides plugins access to the network bonding information gathered from\nall the files starteing with \"bond.\" located in the\n``/proc/net/bonding`` directory.\n\nTypical content of ``bond.*`` file is::\n\n    Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)\n\n    Bonding Mode: IEEE 802.3ad Dynamic link aggregation\n    Transmit Hash Policy: layer2 (0)\n    MII Status: up\n    MII Polling Interval (ms): 500\n    Up Delay (ms): 0\n    Down Delay (ms): 0\n\n    802.3ad info\n    LACP rate: slow\n    Active Aggregator Info:\n            Aggregator ID: 3\n            Number of ports: 1\n            Actor Key: 17\n            Partner Key: 1\n            Partner Mac Address: 00:00:00:00:00:00\n\n    Slave Interface: eth1\n    MII Status: up\n    Link Failure Count: 0\n    Permanent HW addr: 00:16:35:5e:42:fc\n    Aggregator ID: 3\n\n    Slave Interface: eth2\n    MII Status: up\n    Link Failure Count: 0\n    Permanent HW addr: 00:16:35:5e:02:7e\n    Aggregator ID: 2\n\nData is modeled as an array of ``Bond`` objects (``bond`` being a\npattern file specification gathering data from files located in\n``/proc/net/bonding``.\n\nExamples:\n    >>> type(bond_info)\n    <class 'insights.parsers.bond.Bond'>\n    >>> bond_info.bond_mode\n    '4'\n    >>> bond_info.partner_mac_address\n    '00:00:00:00:00:00'\n    >>> bond_info.slave_interface\n    ['eth1', 'eth2']\n    >>> bond_info.aggregator_id\n    ['3', '3', '2']\n    >>> bond_info.xmit_hash_policy\n    'layer2'\n    >>> bond_info.active_slave\n    >>> bond_info.slave_duplex\n    ['full', 'full']\n    >>> bond_info.slave_speed\n    ['1000 Mbps', '1000 Mbps']\n\"\"\"\n\nfrom insights import Parser, parser, get_active_lines\nfrom insights.specs import Specs\nfrom insights.parsers import ParseException\n\n\n\"\"\"dict: bonding mode parameter string linked to bond type index.\"\"\"\nBOND_PREFIX_MAP = {\n    'load balancing (round-robin)': '0',\n    'fault-tolerance (active-backup)': '1',\n    'fault-tolerance (active-backup) (fail_over_mac active)': '1',\n    'load balancing (xor)': '2',\n    'fault-tolerance (broadcast)': '3',\n    'IEEE 802.3ad Dynamic link aggregation': '4',\n    'transmit load balancing': '5',\n    'adaptive load balancing': '6'\n}\n\n\n@parser(Specs.bond)\nclass Bond(Parser):\n    \"\"\"\n    Models the ``/proc/net/bonding`` file.\n\n    Currently used information from ``/proc/net/bonding`` includes\n    the \"bond mode\" and \"partner mac address\".\n    \"\"\"\n\n    def parse_content(self, content):\n        self._bond_mode = None\n        self._partner_mac_address = None\n        self._active_slave = None\n        self.xmit_hash_policy = None\n        self._arp_polling_interval = None\n        self._arp_ip_target = None\n        self._slave_interface = []\n        self._aggregator_id = []\n        self._mii_status = []\n        self._slave_link_failure_count = []\n        self._slave_speed = []\n        self._slave_duplex = []\n        self._primary_slave = None\n\n        for line in get_active_lines(content):\n            if line.startswith(\"Bonding Mode: \"):\n                raw_mode = line.split(\":\", 1)[1].strip()\n                self._bond_mode = raw_mode\n                if raw_mode in BOND_PREFIX_MAP:\n                    self._bond_mode = BOND_PREFIX_MAP[raw_mode]\n                else:\n                    raise ParseException(\"Unrecognised bonding mode '{b}'\".format(b=raw_mode))\n            elif line.startswith(\"Partner Mac Address: \"):\n                self._partner_mac_address = line.split(\":\", 1)[1].strip()\n            elif line.startswith(\"Slave Interface: \"):\n                self._slave_interface.append(line.split(\":\", 1)[1].strip())\n            elif line.strip().startswith(\"Aggregator ID: \"):\n                self._aggregator_id.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"Transmit Hash Policy\"):\n                # No need of values in bracket:\n                # Integer notification (0), (1), (2) of layer2, layer3+4, layer2+3 resp\n                self.xmit_hash_policy = line.split(\":\", 1)[1].split()[0]\n            elif line.strip().startswith(\"Currently Active Slave\"):\n                self._active_slave = line.split(\":\", 1)[1].split()[0]\n            elif line.strip().startswith(\"MII Status: \"):\n                self._mii_status.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"Link Failure Count: \"):\n                self._slave_link_failure_count.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"Speed: \"):\n                self._slave_speed.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"Duplex: \"):\n                self._slave_duplex.append(line.strip().split(':', 1)[1].strip())\n            elif line.strip().startswith(\"ARP Polling Interval (ms):\"):\n                self._arp_polling_interval = line.strip().split(':', 1)[1].strip()\n            elif line.strip().startswith(\"ARP IP target/s (n.n.n.n form):\"):\n                self._arp_ip_target = line.strip().split(':', 1)[1].strip()\n            elif line.strip().startswith(\"Primary Slave\"):\n                self._primary_slave = line.split(\":\", 1)[1].split()[0]\n\n    @property\n    def bond_mode(self):\n        \"\"\"Returns the bond mode number as a string, or if there is no\n        known mapping to a number, the raw \"Bonding Mode\" value.\n        ``None`` is returned if no \"Bonding Mode\" key is found.\n        \"\"\"\n        return self._bond_mode\n\n    @property\n    def partner_mac_address(self):\n        \"\"\"Returns the value of the \"Partner Mac Address\" in the bond\n        file if the key/value exists.  If the key is not in the bond\n        file, ``None`` is returned.\n        \"\"\"\n        return self._partner_mac_address\n\n    @property\n    def slave_interface(self):\n        \"\"\"Returns all the slave interfaces of in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._slave_interface\n\n    @property\n    def aggregator_id(self):\n        \"\"\"Returns all the aggregator id of in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._aggregator_id\n\n    @property\n    def active_slave(self):\n        \"\"\"Returns the active slave of the \"Currently Active Slave\" in the bond\n        file if key/value exists. If the key is not in the bond file, ``None``\n        is returned.\n        \"\"\"\n        return self._active_slave\n\n    @property\n    def mii_status(self):\n        \"\"\"Returns the master and all the slaves \"MII Status\" value in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._mii_status\n\n    @property\n    def slave_link_failure_count(self):\n        \"\"\"Returns all the slaves \"Link Failure Count\" value in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._slave_link_failure_count\n\n    @property\n    def slave_speed(self):\n        \"\"\"Returns all the slaves \"Speed\" value in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._slave_speed\n\n    @property\n    def slave_duplex(self):\n        \"\"\"Returns all the slave \"Duplex\" value in the bond file wrapped\n        a list if the key/value exists.  If the key is not in the\n        bond file, ``[]`` is returned.\n        \"\"\"\n        return self._slave_duplex\n\n    @property\n    def arp_polling_interval(self):\n        \"\"\"Returns the arp polling interval as a string. ``None`` is returned\n        if no \"ARP Polling Interval (ms)\" key is found.\n        \"\"\"\n        return self._arp_polling_interval\n\n    @property\n    def arp_ip_target(self):\n        \"\"\"Returns the arp ip target as a string. ``None`` is returned\n        if no \"ARP IP target/s (n.n.n.n form)\" key is found.\n        \"\"\"\n        return self._arp_ip_target\n\n    @property\n    def primary_slave(self):\n        \"\"\"Returns the \"Primary Slave\" in the bond file if key/value exists.\n        If the key is not in the bond file, ``None`` is returned.\n        \"\"\"\n        return self._primary_slave\n", "path": "insights/parsers/bond.py"}]}