Skip to content

Commit

Permalink
Adding get_status to the remote api
Browse files Browse the repository at this point in the history
  • Loading branch information
brenton committed Jul 17, 2008
1 parent 8b03181 commit 372a356
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
10 changes: 6 additions & 4 deletions cobbler/action_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ def run(self):
"""

self.scan_logfiles()
self.process_results()
print self.get_printable_results()
return True

results = self.process_results()
if self.mode is "text":
print self.get_printable_results()
return True
else:
return results
2 changes: 1 addition & 1 deletion cobbler/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def reposync(self, name=None):
reposync = action_reposync.RepoSync(self._config)
return reposync.run(name)

def status(self,mode):
def status(self,mode=None):
self.log("status")
statusifier = action_status.BootStatusReport(self._config,mode)
return statusifier.run()
Expand Down
6 changes: 6 additions & 0 deletions cobbler/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,12 @@ def _fix_none(self,data):

return data

def get_status(self):
"""
Returns the same information as `cobbler status`
"""
return self.api.status()

# *********************************************************************************
# *********************************************************************************

Expand Down

0 comments on commit 372a356

Please sign in to comment.