Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pypuppetdb/types.py: Added noop attribute to Node and Report. #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pypuppetdb/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ class Report(object):
:ivar transaction: UUID identifying this transaction.
:ivar environment: The environment assigned to the node that submitted\
this report.
:ivar noop: :obj:`bool` A flag indicating weather the report was\
produced by a noop run.
:ivar status: The status associated to this report's node.
:ivar metrics: :obj:`list` containing :obj:`dict` of all metrics\
associated with this report.
Expand Down Expand Up @@ -189,6 +191,7 @@ def __init__(self, api, node, hash_, start, end, received, version,
self.transaction = transaction
self.environment = environment
self.status = 'noop' if noop and noop_pending else status
self.noop = noop
self.metrics = metrics
self.logs = logs
self.code_id = code_id
Expand Down Expand Up @@ -389,6 +392,8 @@ class Node(object):
and later.
:ivar cached_catalog_status: :obj:`string` the status of the cached\
catalog from the last puppet run.
:ivar noop: :obj:`bool` A flag indicating whether the latest \
report of the node was produced by a noop run.
"""
def __init__(self, api, name, deactivated=None, expired=None,
report_timestamp=None, catalog_timestamp=None,
Expand All @@ -410,6 +415,7 @@ def __init__(self, api, name, deactivated=None, expired=None,
self.facts_environment = facts_environment
self.latest_report_hash = latest_report_hash
self.cached_catalog_status = cached_catalog_status
self.noop = noop

if unreported:
self.status = 'unreported'
Expand Down