Skip to content

Commit

Permalink
Merge pull request #1424 from HubLot/macros_downtime
Browse files Browse the repository at this point in the history
Add callbacks for HOSTDOWNTIME and SERVICEDOWNTIME macros
  • Loading branch information
naparuba committed Jan 8, 2015
2 parents 3bcffa7 + fbbe906 commit a4d6018
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shinken/objects/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,9 @@ def get_status(self):
else:
return self.state

def get_downtime(self):
return str(self.scheduled_downtime_depth)


# CLass for the hosts lists. It's mainly for configuration
# part
Expand Down
3 changes: 3 additions & 0 deletions shinken/objects/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,9 @@ def get_status(self):
else:
return self.state

def get_downtime(self):
return str(self.scheduled_downtime_depth)


# Class for list of services. It's mainly, mainly for configuration part
class Services(Items):
Expand Down

0 comments on commit a4d6018

Please sign in to comment.