Skip to content

Commit

Permalink
app-metrics/netbox-agent: Create ver 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
licebmi committed Jan 30, 2025
1 parent 07240b8 commit 8a652e1
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app-metrics/netbox-agent/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST netbox-agent-1.0.0.tar.gz 90869 BLAKE2B 93a4cfab83de2890cb7ce1109fd6337f89abc3e45492a7f471b9219aa3b1eff6f434fcc797f0abe47fb8c393e60f1946964548ffe92ec126c6856e130789589c SHA512 520a5b988a08df478900bb3e4653d0e87ff771d323da14f851e0c82a7335872e7b2ebf476126fa0279f4b827f937e638d968776ee7df73f58483c33e625b58a0
DIST netbox-agent-1.1.0.tar.gz 92298 BLAKE2B 029a95281e643e2f9c2b9aa33118c7a0bad2afa1276d4c4fb2958f41b080e1cf48808ffd14de9dd17f252ed89fdad2aa2468c30cf3d5ef79cbf111a7c4e67e5b SHA512 561079248e109bf0b0ff77ffc4cb4374f257b4e80b870451f4d380ecf86132ef78a90492b6c27070e4fca223e25ec9d8064198c56be29d4cef842f10f02c58bd
DIST netbox_agent-1.0.0.tar.gz 45676 BLAKE2B 6393367192ccc2c1e6f50101bdb0522365b128061294f272857cea37842c3ee6e05e3979ad92adfb0debb5b22e5832f6c134a0a547ee2d73ef20737ed48098bd SHA512 bd8cb1aa6dcbed4728091fdd4c422ea8c996f85f0cb5d5536a435c44ce744fb746119af202c09c3fce8939f876357cf43f2bcbf06cb149ebd5a4a32566b75979
26 changes: 26 additions & 0 deletions app-metrics/netbox-agent/files/001-fix-exit-code.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 62c7502c19a4e7bb4519abc599c4501a2b0c3854 Mon Sep 17 00:00:00 2001
From: Mathis Ribet <[email protected]>
Date: Tue, 14 Jan 2025 20:12:08 +0100
Subject: [PATCH] Fix exit code

int/bool confusion caused the exit code to be inverted
--- a/netbox_agent/cli.py
+++ b/netbox_agent/cli.py
@@ -43,7 +43,7 @@ def run(config):

if version.parse(nb.version) < version.parse("3.7"):
print("netbox-agent is not compatible with Netbox prior to version 3.7")
- return False
+ return 1

if (
config.register
@@ -56,7 +56,7 @@ def run(config):
server.netbox_create_or_update(config)
if config.debug:
server.print_debug()
- return True
+ return 0


def main():
38 changes: 38 additions & 0 deletions app-metrics/netbox-agent/netbox-agent-1.1.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{7..13} )

inherit distutils-r1

DESCRIPTION="Agent to send system information to netbox"
HOMEPAGE="https://github.com/Solvik/netbox-agent"
SRC_URI="https://github.com/Solvik/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"

REQUIRED_USE=${PYTHON_REQUIRED_USE}
RDEPEND="
${PYTHON_DEPS}
dev-python/netaddr[${PYTHON_USEDEP}]
dev-python/netifaces2[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/python-slugify[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/distro[${PYTHON_USEDEP}]
dev-python/jsonargparse[${PYTHON_USEDEP}]
dev-python/pynetbox[${PYTHON_USEDEP}]
"
BDEPEND=${RDEPEND}

PATCHES=(
"${FILESDIR}/001-fix-exit-code.patch"
)

export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}

0 comments on commit 8a652e1

Please sign in to comment.