Skip to content

Commit 2bd3f64

Browse files
authored
Merge pull request #1760 from jrha/indentation-nagios
ncm-nagios: Cleanup pan templates
2 parents b3aa5e9 + a3985da commit 2bd3f64

File tree

1 file changed

+14
-19
lines changed
  • ncm-nagios/src/main/pan/components/nagios

1 file changed

+14
-19
lines changed

ncm-nagios/src/main/pan/components/nagios/schema.pan

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,21 @@ include 'pan/types';
1111
# validation code easier. If you want hosts to inherit settings then use
1212
# Pan statements like create ("...") or value ("...")
1313

14-
type nagios_hoststring = string with exists ("/software/components/nagios/hosts/" + SELF) ||
15-
SELF=="*";
14+
type nagios_hoststring = string with exists("/software/components/nagios/hosts/" + SELF) || SELF == "*";
1615

17-
type nagios_hostgroupstring = string with exists ("/software/components/nagios/hostgroups/" + SELF) || SELF=="*";
16+
type nagios_hostgroupstring = string with exists("/software/components/nagios/hostgroups/" + SELF) || SELF == "*";
1817

19-
type nagios_commandstrings = string [] with exists ("/software/components/nagios/commands/" + SELF[0]);
18+
type nagios_commandstrings = string [] with exists("/software/components/nagios/commands/" + SELF[0]);
2019

21-
type nagios_timeperiodstring = string with exists ("/software/components/nagios/timeperiods/" + SELF) ||
22-
SELF=="*";
20+
type nagios_timeperiodstring = string with exists("/software/components/nagios/timeperiods/" + SELF) || SELF == "*";
2321

24-
type nagios_contactgroupstring = string with exists ("/software/components/nagios/contactgroups/" + SELF) ||
25-
SELF=="*";
22+
type nagios_contactgroupstring = string with exists("/software/components/nagios/contactgroups/" + SELF) || SELF == "*";
2623

27-
type nagios_contactstring = string with exists ("/software/components/nagios/contacts/" + SELF) ||
28-
SELF=="*";
24+
type nagios_contactstring = string with exists("/software/components/nagios/contacts/" + SELF) || SELF == "*";
2925

30-
type nagios_servicegroupstring = string with exists ("/software/components/nagios/servicegroups/" + SELF) ||
31-
SELF=="*";
26+
type nagios_servicegroupstring = string with exists("/software/components/nagios/servicegroups/" + SELF) || SELF == "*";
3227

33-
type nagios_servicestring = string with exists ("/software/components/nagios/services/" + SELF) ||
34-
SELF=="*";
28+
type nagios_servicestring = string with exists("/software/components/nagios/services/" + SELF) || SELF == "*";
3529

3630
type nagios_service_notification_string = string with match (SELF, "^(w|u|c|r|f)$");
3731
type nagios_host_notification_string = string with match (SELF, "^(d|u|r|f)$");
@@ -150,7 +144,7 @@ type structure_nagios_service = {
150144
"register" : boolean = true
151145
"failure_prediction_enabled" ? boolean
152146
"action_url" ? string
153-
} with nagios_has_host_or_hostgroup (SELF);;
147+
} with nagios_has_host_or_hostgroup (SELF);
154148

155149
# Servicegroup definition:
156150
type structure_nagios_servicegroup = {
@@ -174,7 +168,7 @@ type structure_nagios_servicedependency = {
174168
"execution_failure_criteria" ? nagios_execution_failure_string []
175169
"notification_failure_criteria" ? nagios_notification_failure_string []
176170
"dependency_period" ? nagios_timeperiodstring
177-
} with nagios_has_host_or_hostgroup (SELF);;
171+
} with nagios_has_host_or_hostgroup (SELF);
178172

179173
# Contact definition
180174
type structure_nagios_contact = {
@@ -197,8 +191,9 @@ type structure_nagios_contactgroup = {
197191
};
198192

199193
# Time range definition
200-
type nagios_timerange = string with
201-
match (SELF, "^(([0-9]+:[0-9]+)-([0-9]+:[0-9]+),)*([0-9]+:[0-9]+)-([0-9]+:[0-9]+)$");
194+
type nagios_timerange = string with match (SELF,
195+
"^(([0-9]+:[0-9]+)-([0-9]+:[0-9]+),)*([0-9]+:[0-9]+)-([0-9]+:[0-9]+)$"
196+
);
202197

203198
# Time period definition
204199
type structure_nagios_timeperiod = {
@@ -383,7 +378,7 @@ type structure_nagios_nagios_cfg = {
383378
"ocsp_command" ? string
384379
};
385380

386-
type structure_nagios_service_list=structure_nagios_service[];
381+
type structure_nagios_service_list = structure_nagios_service[];
387382

388383
# Everything that can be handled by this component
389384
type structure_component_nagios = {

0 commit comments

Comments
 (0)