Hello,
This is the code:
json={
'folder': '/',
'host_name': 'test_host',
'attributes': {
'ipaddress': '10.42.0.29',
'tag_agent': 'no-agent',
'tag_snmp_ds': 'snmp-v2',
'snmp_community': 'Community',
}
},
)
This is the error I got:
RuntimeError: {‘detail’: ‘These fields have problems: attributes’,
‘fields’: {‘attributes’: {‘snmp_community’: {’_schema’: 'Invalid data type: ’
‘Community’}}},
‘status’: 400,
‘title’: ‘Bad Request’}
I have tried to do show_host to another host to check the syntax and it looks ok.
Output from another host
show_host.py
{‘domainType’: ‘host_config’,
‘extensions’: {‘attributes’: {‘snmp_community’: ‘Community’,
‘tag_agent’: ‘no-agent’,
‘tag_snmp_ds’: ‘snmp-v2’},
‘cluster_nodes’: None,
‘is_cluster’: False,
Can anyone help me to understand why this happens? It is a syntax issue?
Thanks