Skip to content

Commit 73b5843

Browse files
authored
Merge pull request #21 from gdanielson/relocate-devices-json
Chg location of devices meta data file.
2 parents 25fff2e + 310ad96 commit 73b5843

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

netboxgit/netboxdata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,13 @@ def get_interfaces_data(self, nbx_tag):
132132
self.interfaces = self.nb.dcim.interfaces.filter(tag=self.nbx_tag)
133133
return self.interfaces
134134

135-
def write_devices_to_file(self, devices, base_path):
135+
def write_devices_to_file(self, devices, file_path):
136136
"""Write data for each device to a JSON file.
137137
138138
:param interfaces: A dict of device information
139139
:type interfaces: dict
140140
"""
141141
self.devices = devices
142-
file_path = Path.joinpath(Path(base_path), Path("devices/"))
143142
file_path.mkdir(parents=True, exist_ok=True)
144143
fout = Path(file_path / "devices.json")
145144
with open(fout, "w", buffering=1) as f:

requirements.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
2+
# W a r n i n g
3+
# this repo does NOT yet use pip-tools this file is currently used in an
4+
# entirely manual way see
5+
# [Issue#17]|(https://github.com/gdanielson/netbox-git/issues/17)
6+
17
GitPython>=3.1.3
28

3-
pynetbox==4.3.1
9+
pynetbox==4.3.1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main():
2424

2525
setup(
2626
name="netboxgit",
27-
version="0.1.4",
27+
version="0.1.4a",
2828
description="Manage NetBox object data into Git version control.",
2929
url="https://github.com/gdanielson/netbox-git",
3030
author="gdanielson",

0 commit comments

Comments
 (0)