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

when get_current_status, enable to use parsed status #6

Merged
merged 1 commit into from
Dec 6, 2017

Conversation

netmarkjp
Copy link
Owner

pros

  • reduce parse frequency.

cons

  • when use, take care about old cache

usage

from pynag import Model
from pynag.Parsers.status_dat import StatusDat


status = StatusDat(cfg_file=Model.cfg_file)
for host in Model.Host.objects.all:
    host_status = host.get_current_status(status=status)
    print(host_status)

@netmarkjp netmarkjp merged commit 8ab9342 into master Dec 6, 2017
@netmarkjp netmarkjp deleted the use-parsed-status branch December 6, 2017 10:11
@netmarkjp netmarkjp restored the use-parsed-status branch December 6, 2017 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant