-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a testcase for snmptt datasource
- Loading branch information
Showing
12 changed files
with
25,171 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import re | ||
import coshsh | ||
from coshsh.application import Application | ||
from coshsh.templaterule import TemplateRule | ||
from coshsh.util import compare_attr | ||
|
||
def __mi_ident__(params={}): | ||
if coshsh.util.compare_attr("type", params, "Paloalto"): | ||
return Unity | ||
|
||
|
||
class Unity(coshsh.application.Application): | ||
template_rules = [ | ||
coshsh.templaterule.TemplateRule(needsattr=None, | ||
template="os_paloalto_default"), | ||
coshsh.templaterule.TemplateRule(needsattr='trap_events', | ||
template="os_paloalto_traps"), | ||
] | ||
implements_mibs = ['PAN-TRAPS-MIB:PAN-TRAPS-7-MIB'] | ||
|
||
def wemustrepeat(self): | ||
if hasattr(self, "version"): | ||
self.implements_mibs = ['PAN-TRAPS-MIB:PAN-TRAPS-'+str(self.version)+'-MIB'] |
14 changes: 14 additions & 0 deletions
14
tests/recipes/testsnmptt/data/csvpaloalto_applications.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
host_name,name,type,component,version,check_period | ||
pa_1,os,PaloAlto,,7,7x24 | ||
pa_2,os,PaloAlto,,7,7x24 | ||
pa_3,os,PaloAlto,,7,7x24 | ||
pa_4,os,PaloAlto,,7,7x24 | ||
pa_4,os,PaloAlto,,7,7x24 | ||
pa_6,os,PaloAlto,,7,7x24 | ||
pa_7,os,PaloAlto,,7,7x24 | ||
pa_8,os,PaloAlto,,7,7x24 | ||
pa_9,os,PaloAlto,,7,7x24 | ||
pa_a,os,PaloAlto,,7,7x24 | ||
pa_b,os,PaloAlto,,8,7x24 | ||
pa_c,os,PaloAlto,,7,7x24 | ||
pa_d,os,PaloAlto,,7,7x24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
host_name,address,type,os,hardware,virtual,notification_period,location,departm | ||
ent | ||
pa_1,10.0.0.1,firewall,,,ps,7x24,dc,net | ||
pa_2,10.0.0.2,firewall,,,ps,7x24,dc,net | ||
pa_3,10.0.0.3,firewall,,,ps,7x24,dc,net | ||
pa_4,10.0.0.4,firewall,,,ps,7x24,dc,net | ||
pa_5,10.0.0.5,firewall,,,ps,7x24,dc,net | ||
pa_6,10.0.0.6,firewall,,,ps,7x24,dc,net | ||
pa_7,10.0.0.7,firewall,,,ps,7x24,dc,net | ||
pa_8,10.0.0.8,firewall,,,ps,7x24,dc,net | ||
pa_9,10.0.0.9,firewall,,,ps,7x24,dc,net | ||
pa_a,10.0.0.10,firewall,,,ps,7x24,dc,net | ||
pa_b,10.0.0.11,firewall,,,ps,7x24,dc,net | ||
pa_c,10.0.0.12,firewall,,,ps,7x24,dc,net | ||
pa_d,10.0.0.13,firewall,,,ps,7x24,dc,net |
Oops, something went wrong.