coxley / nsot_sync

CLI/Driver-based framework to sync resources to NSoT (IPAM/CMDB)
1 stars 3 forks source link

Let ad-hoc attributes be "ensured" #6

Closed coxley closed 8 years ago

coxley commented 8 years ago

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.