Instancia de DCIM tiene ningún miembro 'get_device_by_name'

Carmesí Túnica:

Me error siguiente cuando quiero get_device_by_name llamada de biblioteca de Python-NETBOX:

Instancia de DCIM tiene ningún miembro 'get_device_by_name'

Con referencia a la documentación shoul existe este método https://python-netbox.readthedocs.io/en/latest/examples.html#examples

Muestra de mi código:

from netbox import NetBox

class NboxM:
    def __init__(self):
        self.nbox = NetBox(
            host='host', 
            port='port', 
            use_ssl=False, 
            auth_token='token'
        )
        self.nbox.dcim.get_device_by_name('name')

Mi versión lib: Pitón-NETBOX 0.0.14

Artur:

Parece lo sacaron. En vez de get_device_by_name('name')que debe utilizar get_devices(name='name'). En el archivo README:

https://github.com/jagter/python-netbox

Por cierto que he creado el problema en el repositorio:

https://github.com/jagter/python-netbox/issues/22

Supongo que te gusta

Origin http://43.154.161.224:23101/article/api/json?id=347110&siteId=1
Recomendado
Clasificación