<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NodeControllerFrusSchema is wrong in ONTAP Rest API Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/NodeControllerFrusSchema-is-wrong/m-p/162983#M175</link>
    <description>&lt;DIV&gt;While using the latest version (9.8.0) available at &lt;A href="https://pypi.org/project/netapp-ontap/" target="_blank" rel="noopener"&gt;https://pypi.org/project/netapp-ontap/&lt;/A&gt; there is a problem if I try to get the node controller FRUs:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from netapp_ontap import config, HostConnection
from netapp_ontap.resources import Node

config.CONNECTION = HostConnection('myfiler.example.com', username='admin', password='mypass', verify=False)

for n in Node.get_collection(fields='controller'):
    pass&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Then I get a traceback:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Traceback (most recent call last):
  File "test.py", line 6, in &amp;lt;module&amp;gt;
    for n in Node.get_collection(fields='controller'):
  File "/home/pedro/venv/lib64/python3.6/site-packages/netapp_ontap/resource.py", line 640, in _get_collection
    obj = cls.from_dict(record, *args)
  File "/home/pedro/venv/lib64/python3.6/site-packages/netapp_ontap/resource.py", line 486, in from_dict
    raise NetAppRestError(cause=exc) from None
netapp_ontap.error.NetAppRestError:  Caused by ValidationError({'controller': {'frus': {0: {'id': ['"FAN1" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 1: {'id': ['"FAN3" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 2: {'id': ['"FAN2" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 3: {'id': ['"PSU1" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 4: {'id': ['"PSU2" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 5: {'id': ['"DIMM-4" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 6: {'id': ['"DIMM-3" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 7: {'id': ['"DIMM-2" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 8: {'id': ['"DIMM-1" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 9: {'id': ['"NVRA" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 10: {'id': ['"BOOT MEDIA" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}}}},)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;The problem is in netapp_ontap/models/node_controller_frus.py:22 where the NodeControllerFrusSchema indicates that the id field is a "Size". If I change it to be a "fields.Str" then it works as expected.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can someone here help get this fixed?&lt;/DIV&gt;</description>
    <pubDate>Wed, 04 Jun 2025 10:38:36 GMT</pubDate>
    <dc:creator>Pedro2</dc:creator>
    <dc:date>2025-06-04T10:38:36Z</dc:date>
    <item>
      <title>NodeControllerFrusSchema is wrong</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/NodeControllerFrusSchema-is-wrong/m-p/162983#M175</link>
      <description>&lt;DIV&gt;While using the latest version (9.8.0) available at &lt;A href="https://pypi.org/project/netapp-ontap/" target="_blank" rel="noopener"&gt;https://pypi.org/project/netapp-ontap/&lt;/A&gt; there is a problem if I try to get the node controller FRUs:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from netapp_ontap import config, HostConnection
from netapp_ontap.resources import Node

config.CONNECTION = HostConnection('myfiler.example.com', username='admin', password='mypass', verify=False)

for n in Node.get_collection(fields='controller'):
    pass&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Then I get a traceback:&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Traceback (most recent call last):
  File "test.py", line 6, in &amp;lt;module&amp;gt;
    for n in Node.get_collection(fields='controller'):
  File "/home/pedro/venv/lib64/python3.6/site-packages/netapp_ontap/resource.py", line 640, in _get_collection
    obj = cls.from_dict(record, *args)
  File "/home/pedro/venv/lib64/python3.6/site-packages/netapp_ontap/resource.py", line 486, in from_dict
    raise NetAppRestError(cause=exc) from None
netapp_ontap.error.NetAppRestError:  Caused by ValidationError({'controller': {'frus': {0: {'id': ['"FAN1" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 1: {'id': ['"FAN3" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 2: {'id': ['"FAN2" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 3: {'id': ['"PSU1" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 4: {'id': ['"PSU2" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 5: {'id': ['"DIMM-4" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 6: {'id': ['"DIMM-3" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 7: {'id': ['"DIMM-2" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 8: {'id': ['"DIMM-1" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 9: {'id': ['"NVRA" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}, 10: {'id': ['"BOOT MEDIA" could not be interpreted as a valid size. Valid values  are of the form \\d+[KB|MB|GB|TB|PB]']}}}},)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;The problem is in netapp_ontap/models/node_controller_frus.py:22 where the NodeControllerFrusSchema indicates that the id field is a "Size". If I change it to be a "fields.Str" then it works as expected.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can someone here help get this fixed?&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:38:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/NodeControllerFrusSchema-is-wrong/m-p/162983#M175</guid>
      <dc:creator>Pedro2</dc:creator>
      <dc:date>2025-06-04T10:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: NodeControllerFrusSchema is wrong</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/NodeControllerFrusSchema-is-wrong/m-p/162985#M176</link>
      <description>&lt;P&gt;Thanks for the report. I'll file an issue to have our API team look into this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case it helps, the other workaround you could do would be to have it skip returning that field:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from netapp_ontap import config, HostConnection
from netapp_ontap.resources import Node

config.CONNECTION = HostConnection('myfiler.example.com', username='admin', password='mypass', verify=False)

for n in Node.get_collection(fields='controller,!controller.frus.id'):
    pass&lt;/LI-CODE&gt;&lt;P&gt;This will return all the same data&amp;nbsp;&lt;EM&gt;except&lt;/EM&gt; for the controller.frus.id field. Then when it goes to parse the return, there will be no issue.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 20:50:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/NodeControllerFrusSchema-is-wrong/m-p/162985#M176</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2021-01-15T20:50:48Z</dc:date>
    </item>
  </channel>
</rss>

