Skip to content

Commit

Permalink
Empty products filtered (see issue #5), increased hits (see issue #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Stankowic committed May 9, 2017
1 parent aa17f8a commit 9335afb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions check_katello_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from ForemanAPIClient import ForemanAPIClient
from datetime import datetime

__version__ = "0.5.2"
__version__ = "0.5.3"
"""
str: Program version
"""
Expand Down Expand Up @@ -91,7 +91,7 @@ def check_product(product):
"""
global PROD_OK, PROD_WARN, PROD_CRIT

#Check if product unsynced
#check if product unsynced
if product["last_sync"] == None:
LOGGER.debug("Product '{0}' ({1}) is UNSYNCED!".format(
product["label"], product["description"]
Expand Down Expand Up @@ -132,7 +132,7 @@ def check_products():
#get API result
result_obj = json.loads(
FOREMAN_CLIENT.api_get(
"/products?organization_id={}".format(options.org)
"/products?organization_id={}&per_page=1337".format(options.org)
)
)

Expand All @@ -143,7 +143,7 @@ def check_products():
set_code(2)

#check _all_ the products
for product in result_obj["results"]:
for product in [x for x in result_obj["results"] if x["repository_count"] > 0]:
PROD_TOTAL = PROD_TOTAL + 1
if len(options.include) > 0:
if product["label"] in options.include:
Expand Down
10 changes: 5 additions & 5 deletions icingaexchange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ type: Plugin
license: gplv3
releases:
-
name: 0.5.2
description: "0.5.2 Release"
name: 0.5.3
description: "0.5.3 Release"
files:
-
name: check_katello_sync.py
url: "file:///check_katello_sync.py"
description: "Release 0.5.2"
checksum: e32d745e091b526f73e903e2bf882d61
description: "Release 0.5.3"
checksum: 3c4f8a6716b7621acff71430b3054048
-
name: ForemanAPIClient.py
url: "file:///ForemanAPIClient.py"
description: "Release 0.5.2"
description: "Release 0.5.3"
checksum: b65efb6f1027e5ddb573718395e5ef0b

0 comments on commit 9335afb

Please sign in to comment.