Skip to content
Snippets Groups Projects
Commit aec0b7ec authored by Neda Moeini's avatar Neda Moeini
Browse files

Fixed get params bug in netbox client.

parent 66ae8660
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ import pydantic
import pynetbox
from gso.products import Router
from gso.settings import NetBoxParams
from gso.settings import NetBoxParams, load_oss_params
from gso.utils.device_info import TierInfo, FEASIBLE_LAG_RANGE
from gso.utils.exceptions import NotFoundError, WorkflowStateException
......@@ -61,7 +61,8 @@ class Site(pydantic.BaseModel):
class NetBoxClient:
def __init__(self):
self.netbox = pynetbox.api(NetBoxParams.api, NetBoxParams.token)
netbox_params = load_oss_params().NETBOX
self.netbox = pynetbox.api(netbox_params.api, netbox_params.token)
def get_all_devices(self):
return list(self.netbox.dcim.devices.all())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment