Currently a driver can ensure certain attributes are created before creating resources. These are added under the driver object main scope REQUIRED_ATTRS
5 added support for ad-hoc attributes but if you try to do, say...
nsot_sync --device-attrs platform=linux simple
and the platform attribute doesn't exist on your NSoT server, you'll get an error. Ad-hoc attributes should be handled similarly and ideally just appended to the existing REQUIRED_ATTRS list before .ensure_attrs is called.
Currently a driver can ensure certain attributes are created before creating resources. These are added under the driver object main scope
REQUIRED_ATTRS
5 added support for ad-hoc attributes but if you try to do, say...
nsot_sync --device-attrs platform=linux simple
and the
platform
attribute doesn't exist on your NSoT server, you'll get an error. Ad-hoc attributes should be handled similarly and ideally just appended to the existingREQUIRED_ATTRS
list before.ensure_attrs
is called.