This script example run against an AR instance version 11.10 raises AttributeError(key) error in steelscript/common/datastructures.py
repro:
~/steelscript-workspace# python examples/appresponse-examples/update_host_groups.py -u admin -p admin --operation show appresponse-ip-address
output:
/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.10.55'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
Traceback (most recent call last):
File "/src/steelscript/steelscript/common/datastructures.py", line 314, in getattr
return self.getitem(key)
KeyError: 'hosts'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "examples/appresponse-examples/update_host_groups.py", line 159, in
app.run()
File "/src/steelscript/steelscript/common/app.py", line 35, in run
self.parse(sys.argv[1:])
File "/src/steelscript/steelscript/commands/steel.py", line 310, in parse
self.main()
File "examples/appresponse-examples/update_host_groups.py", line 98, in main
for hg in self.appresponse.classification.get_hostgroups()
File "examples/appresponse-examples/update_host_groups.py", line 98, in
for hg in self.appresponse.classification.get_hostgroups()
File "/src/steelscript/steelscript/common/datastructures.py", line 316, in getattr
raise AttributeError(key)
AttributeError: hosts