Print this page
Add "log": to fwadm JSON for cfwlog tag.
@@ -49,11 +49,12 @@
'enabled',
'global',
'owner_uuid',
'rule',
'uuid',
- 'version'
+ 'version',
+ 'log'
];
// Maximum number of targets per side:
var MAX_TARGETS_PER_SIDE = 24;
// Maximum number of protocol targets:
var MAX_PROTOCOL_TARGETS = 24;
@@ -377,10 +378,21 @@
this.enabled = data.enabled;
} else {
this.enabled = false;
}
+ if (hasOwnProperty(data, 'log')) {
+ if (!validators.bool(data.log)) {
+ errs.push(new validators.InvalidParamError('log',
+ 'log must be true or false'));
+ }
+
+ this.log = data.log;
+ } else {
+ this.log = false;
+ }
+
for (var s in STRING_PROPS) {
var str = STRING_PROPS[s];
if (hasOwnProperty(data, str)) {
try {
validators.validateString(str, data[str]);
@@ -594,11 +606,12 @@
from: this.from,
priority: this.priority,
protocol: this.protocol,
to: this.to,
uuid: this.uuid,
- version: this.version
+ version: this.version,
+ log: this.log
};
if (this.owner_uuid) {
raw.owner_uuid = this.owner_uuid;
}