-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
244 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Quickstart Guide | ||
|
||
The pynautobot package is a Python SDK for retrieving and managing data in Nautobot. The following demonstrates how to connect to and interact with the Nautobot REST API. | ||
|
||
## Terminology | ||
|
||
**Apps:** The root level interfaces in Nautobot (IPAM, DCIM, etc.). Apps | ||
are represented by the `pynautobot.core.app.App` class. | ||
|
||
**Models:** The second level interfaces in Nautobot (IP Addresses Devices, etc.). Models correspond to tables in the Nautobot database, are represented by the `pynautobot.core.endpoint.Endpoint` class. | ||
|
||
**Endpoint:** The class that represents Models. | ||
|
||
**Records:** The rows associated with a Model\'s database table. Records hold the data stored in Nautobot. Records are represented by the `pynautobot.core.response.Record` class. | ||
|
||
**Entries:** See Records. | ||
|
||
**Fields:** The column names associated with a Model's database table. `pynautobot.core.endpoint.Endpoint` objects use these as keyword arguments for some methods objects use these as attribute names. | ||
|
||
**Plugins:** Additional [Apps]{.title-ref} added added to the Nautobot deployment that are external to provided Nautobot package. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Accessing Nautobot Apps | ||
|
||
Nautobot allows for the expansion of the core application with the support of additional applications to be installed on top of Nautobot. To that, the SDK should support this capability. A couple of examples include accessing job results or the applications. | ||
|
||
=== "Accessing Job Results" | ||
|
||
```python | ||
In [1]: import pynautobot | ||
|
||
In [2]: nautobot = pynautobot.api("https://demo.nautobot.com", token=nautobot_api_token) | ||
|
||
In [3]: jobs_results = getattr(nautobot.extras, "job-results") | ||
|
||
In [4]: jobs_results | ||
Out[4]: <pynautobot.core.endpoint.Endpoint at 0x1047929a0> | ||
|
||
In [5]: jobs_results.all() | ||
Out[5]: | ||
[plugins/nautobot_golden_config.jobs/AllGoldenConfig, | ||
plugins/nautobot_golden_config.jobs/AllGoldenConfig, | ||
DeviceConnectionsReport, | ||
VerifyPrimaryIP, | ||
VerifyPlatform, | ||
VerifyHostnames, | ||
VerifyHasRack, | ||
VerifyCircuitTermination, | ||
device lifecycle, | ||
device lifecycle, | ||
templates, | ||
templates, | ||
data, | ||
data, | ||
configs, | ||
configs, | ||
backups, | ||
backups, | ||
colo, | ||
colo, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
pops, | ||
devicetypes, | ||
devicetypes, | ||
circuits, | ||
manufacturers, | ||
regions, | ||
users] | ||
``` | ||
|
||
=== "Access Application Endpoints" | ||
|
||
This demonstrates accessing the Device Lifecycle Management endpoints. | ||
|
||
``` | ||
import pynautobot | ||
|
||
nautobot = pynautobot.api( | ||
url="http://localhost:8000", | ||
token="d6f4e314a5b5fefd164995169f28ae32d987704f", | ||
) | ||
|
||
test = getattr(nautobot.plugins, "nautobot-device-lifecycle-mgmt") | ||
|
||
cves = test.cve.all() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# API | ||
|
||
::: pynautobot.core.api | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# App | ||
|
||
::: pynautobot.core.app | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Endpoint | ||
|
||
::: pynautobot.core.endpoint | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# GraphQL | ||
|
||
::: pynautobot.core.graphql | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Query | ||
|
||
::: pynautobot.core.query | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Response | ||
|
||
::: pynautobot.core.response | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Util | ||
|
||
::: pynautobot.core.util | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Circuits | ||
|
||
::: pynautobot.models.circuits | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# DCIM | ||
|
||
::: pynautobot.models.dcim | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Extras | ||
|
||
::: pynautobot.models.extras | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# IPAM | ||
|
||
::: pynautobot.models.ipam | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Users | ||
|
||
::: pynautobot.models.users | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Virtualization | ||
|
||
::: pynautobot.models.virtualization | ||
options: | ||
show_submodules: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Library Overview | ||
|
||
A Python library for interacting with the Nautobot API. | ||
|
||
## Description/Overview | ||
|
||
This library dynamically generates objects from the Nautobot API. When a new API endpoint is created by the Nautobot application no significant updates are expected by the pynautobot library. | ||
|
||
This library is used heavily by the [Nautobot-Ansible](https://github.com/nautobot/nautobot-ansible) modules. | ||
|
||
|
||
## Audience (User Personas) - Who should use this Library? | ||
|
||
**Python Developers** | ||
Python developers that are looking to interact with Nautobot in an object orientated fashion. | ||
|
||
**Network Automators** | ||
Those that are involved with network automation using Python or Ansible. Ansible users will want to be familiar with the library. | ||
|
||
## Authors and Maintainers | ||
|
||
- @jvanderaa | ||
- @joewesch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters