Netbox Update Device Facts Task¤
task api name:
update_device_facts
Limitations¤
Datasource nornir
uses NAPALM get_facts
getter and as such only supports these device platforms:
- Arista EOS
- Cisco IOS
- Cisco IOSXR
- Cisco NXOS
- Juniper JUNOS
Update Device Facts Sample Usage¤
NORFAB Netbox Update Device Facts Command Shell Reference¤
NorFab shell supports these command options for Netbox update_device_facts
task:
Python API Reference¤
Updates the device facts in NetBox:
- serial number
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance
|
str
|
The NetBox instance to use. |
None
|
dry_run
|
bool
|
If True, no changes will be made to NetBox. |
False
|
datasource
|
str
|
The data source to use. Supported datasources:
|
'nornir'
|
timeout
|
int
|
The timeout for the job execution. Defaults to 60. |
60
|
devices
|
list
|
The list of devices to update. |
None
|
batch_size
|
int
|
The number of devices to process in each batch. |
10
|
**kwargs
|
Additional keyword arguments to pass to the job. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary containing the results of the update operation. |
Raises:
Type | Description |
---|---|
Exception
|
If a device does not exist in NetBox. |
UnsupportedServiceError
|
If the specified datasource is not supported. |
Source code in norfab\workers\netbox_worker.py
1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 |
|