Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1de0da5

Browse files
author
thomas
committedJun 27, 2023
Added status api call
1 parent b732329 commit 1de0da5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

‎netbox/netbox.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import netbox.tenancy as tenancy
77
import netbox.extras as extras
88
import netbox.circuits as circuits
9+
import netbox.status as status
910

1011

1112
class NetBox(object):
@@ -17,4 +18,5 @@ def __init__(self, host, **kwargs):
1718
self.virtualization = virtualization.Virtualization(self.connection)
1819
self.tenancy = tenancy.Tenancy(self.connection)
1920
self.extras = extras.Extras(self.connection)
21+
self.status = status.Status(self.connection)
2022
self.exceptions = exceptions

‎netbox/status.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Status(object):
2+
3+
def __init__(self, netbox_con):
4+
self.netbox_con = netbox_con
5+
6+
def get_status(self):
7+
"""Returns the Netbox status"""
8+
return self.netbox_con.get('/status/')

0 commit comments

Comments
 (0)
Please sign in to comment.