netbox-community / pynetbox

Python API client library for Netbox.
Apache License 2.0
567 stars 168 forks source link

Device object has no attribute "render_config" #585

Closed okoelbl closed 1 year ago

okoelbl commented 1 year ago

pynetbox version

v7.2.0

NetBox version

v3.6.1

Python version

3.11

Steps to Reproduce

import pynetbox
device = nb.dcim.devices.get(1)
config = device.render_config.create()

Expected Behavior

config should contain a request from the API call to /api/dcim/devices/1/render-config/ with the rendered config of the device.

Observed Behavior

"script.py", line XX, in my_function
    device.render_config.create()
    ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pynetbox/core/response.py", line 308, in __getattr__
    raise AttributeError('object has no attribute "{}"'.format(k))
AttributeError: object has no attribute "render_config"
okoelbl commented 1 year ago

I'm sorry, this is no bug in pynetbox. It was an issue on our side.