+2244. [func] mgodzina
+ lease4-wipe and lease6-wipe now log a deprecation warning.
+ (Gitlab #3427)
+
2243. [func] razvan
Updated yang modules: removed qualifying-suffix,
override-no-update, override-client-update,
- :isccmd:`lease6-update` - updates (replaces) an existing IPv6 lease.
- :isccmd:`lease4-wipe` - removes all leases from a specific IPv4 subnet or
- from all subnets.
+ from all subnets. This command is deprecated and it will be removed
+ in the future.
- :isccmd:`lease6-wipe` - removes all leases from a specific IPv6 subnet or
- from all subnets.
+ from all subnets. This command is deprecated and it will be removed
+ in the future.
- :isccmd:`lease4-resend-ddns` - resends a request to update DNS entries for
an existing lease.
The ``lease4-wipe``, ``lease6-wipe`` Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.. warning::
+
+ The :isccmd:`lease4-wipe` and :isccmd:`lease6-wipe` commands are deprecated
+ and they will be removed in the future.
+
:isccmd:`lease4-wipe` and :isccmd:`lease6-wipe` are designed to remove all leases
associated with a given subnet. This administrative task is expected to
be used when an existing subnet is being retired. The leases
}
stringstream tmp;
- tmp << "Deleted " << num << " IPv4 lease(s) from subnet(s)" << ids.str();
+ tmp << "Deleted " << num << " IPv4 lease(s) from subnet(s)" << ids.str()
+ << " WARNING: lease4-wipe is deprecated!";
ConstElementPtr response = createAnswer(num ? CONTROL_RESULT_SUCCESS
: CONTROL_RESULT_EMPTY, tmp.str());
setResponse(handle, response);
LOG_ERROR(lease_cmds_logger, LEASE_CMDS_WIPE4_FAILED)
.arg(cmd_args_ ? cmd_args_->str() : "<no args>")
.arg(ex.what());
+ LOG_WARN(lease_cmds_logger, LEASE_CMDS_WIPE4_DEPRECATED);
setErrorResponse(handle, ex.what());
return (1);
}
LOG_INFO(lease_cmds_logger, LEASE_CMDS_WIPE4)
.arg(cmd_args_ ? cmd_args_->str() : "<no args>");
+ LOG_WARN(lease_cmds_logger, LEASE_CMDS_WIPE4_DEPRECATED);
return (0);
}
}
stringstream tmp;
- tmp << "Deleted " << num << " IPv6 lease(s) from subnet(s)" << ids.str();
+ tmp << "Deleted " << num << " IPv6 lease(s) from subnet(s)" << ids.str()
+ << " WARNING: lease6-wipe is deprecated!";
ConstElementPtr response = createAnswer(num ? CONTROL_RESULT_SUCCESS
: CONTROL_RESULT_EMPTY, tmp.str());
setResponse(handle, response);
LOG_ERROR(lease_cmds_logger, LEASE_CMDS_WIPE6_FAILED)
.arg(cmd_args_ ? cmd_args_->str() : "<no args>")
.arg(ex.what());
+ LOG_WARN(lease_cmds_logger, LEASE_CMDS_WIPE6_DEPRECATED);
setErrorResponse(handle, ex.what());
return (1);
}
LOG_INFO(lease_cmds_logger, LEASE_CMDS_WIPE6)
.arg(cmd_args_ ? cmd_args_->str() : "<no args>");
+ LOG_WARN(lease_cmds_logger, LEASE_CMDS_WIPE6_DEPRECATED);
return (0);
}
extern const isc::log::MessageID LEASE_CMDS_UPDATE6_CONFLICT = "LEASE_CMDS_UPDATE6_CONFLICT";
extern const isc::log::MessageID LEASE_CMDS_UPDATE6_FAILED = "LEASE_CMDS_UPDATE6_FAILED";
extern const isc::log::MessageID LEASE_CMDS_WIPE4 = "LEASE_CMDS_WIPE4";
+extern const isc::log::MessageID LEASE_CMDS_WIPE4_DEPRECATED = "LEASE_CMDS_WIPE4_DEPRECATED";
extern const isc::log::MessageID LEASE_CMDS_WIPE4_FAILED = "LEASE_CMDS_WIPE4_FAILED";
extern const isc::log::MessageID LEASE_CMDS_WIPE6 = "LEASE_CMDS_WIPE6";
+extern const isc::log::MessageID LEASE_CMDS_WIPE6_DEPRECATED = "LEASE_CMDS_WIPE6_DEPRECATED";
extern const isc::log::MessageID LEASE_CMDS_WIPE6_FAILED = "LEASE_CMDS_WIPE6_FAILED";
namespace {
"LEASE_CMDS_UPDATE6_CONFLICT", "lease6-update command failed due to conflict (parameters: %1, reason: %2)",
"LEASE_CMDS_UPDATE6_FAILED", "lease6-add command failed (parameters: %1, reason: %2)",
"LEASE_CMDS_WIPE4", "lease4-wipe command successful (parameters: %1)",
+ "LEASE_CMDS_WIPE4_DEPRECATED", "lease4-wipe command is deprecated and it will be removed in the future.",
"LEASE_CMDS_WIPE4_FAILED", "lease4-wipe command failed (parameters: %1, reason: %2)",
"LEASE_CMDS_WIPE6", "lease6-wipe command successful (parameters: %1)",
+ "LEASE_CMDS_WIPE6_DEPRECATED", "lease6-wipe command is deprecated and it will be removed in the future.",
"LEASE_CMDS_WIPE6_FAILED", "lease6-wipe command failed (parameters: %1, reason: %2)",
NULL
};
extern const isc::log::MessageID LEASE_CMDS_UPDATE6_CONFLICT;
extern const isc::log::MessageID LEASE_CMDS_UPDATE6_FAILED;
extern const isc::log::MessageID LEASE_CMDS_WIPE4;
+extern const isc::log::MessageID LEASE_CMDS_WIPE4_DEPRECATED;
extern const isc::log::MessageID LEASE_CMDS_WIPE4_FAILED;
extern const isc::log::MessageID LEASE_CMDS_WIPE6;
+extern const isc::log::MessageID LEASE_CMDS_WIPE6_DEPRECATED;
extern const isc::log::MessageID LEASE_CMDS_WIPE6_FAILED;
#endif // LEASE_CMDS_MESSAGES_H
The lease4-wipe command has failed. Both the reason as well as the
parameters passed are logged.
+% LEASE_CMDS_WIPE4_DEPRECATED lease4-wipe command is deprecated and it will be removed in the future.
+The lease4-wipe command is deprecated and it will be removed in the future.
+
% LEASE_CMDS_WIPE6 lease6-wipe command successful (parameters: %1)
The lease6-wipe command has been successful. Parameters of the command
are logged.
% LEASE_CMDS_WIPE6_FAILED lease6-wipe command failed (parameters: %1, reason: %2)
The lease6-wipe command has failed. Both the reason as well as the
parameters passed are logged.
+
+% LEASE_CMDS_WIPE6_DEPRECATED lease6-wipe command is deprecated and it will be removed in the future.
+The lease6-wipe command is deprecated and it will be removed in the future.
" \"subnet-id\": 44"
" }\n"
"}";
- string exp_rsp = "Deleted 2 IPv4 lease(s) from subnet(s) 44";
+ string exp_rsp = "Deleted 2 IPv4 lease(s) from subnet(s) 44"
+ " WARNING: lease4-wipe is deprecated!";
// The status expected is success. The lease should be deleted.
testCommand(cmd, CONTROL_RESULT_SUCCESS, exp_rsp);
" \"subnet-id\": 0"
" }\n"
"}";
- string exp_rsp = "Deleted 4 IPv4 lease(s) from subnet(s) 44 88";
+ string exp_rsp = "Deleted 4 IPv4 lease(s) from subnet(s) 44 88"
+ " WARNING: lease4-wipe is deprecated!";
// The status expected is success. The lease should be deleted.
testCommand(cmd, CONTROL_RESULT_SUCCESS, exp_rsp);
"{\n"
" \"command\": \"lease4-wipe\"\n"
"}";
- string exp_rsp = "Deleted 4 IPv4 lease(s) from subnet(s) 44 88";
+ string exp_rsp = "Deleted 4 IPv4 lease(s) from subnet(s) 44 88"
+ " WARNING: lease4-wipe is deprecated!";
// The status expected is success. The lease should be deleted.
testCommand(cmd, CONTROL_RESULT_SUCCESS, exp_rsp);
" \"subnet-id\": 44"
" }\n"
"}";
- string exp_rsp = "Deleted 0 IPv4 lease(s) from subnet(s) 44";
+ string exp_rsp = "Deleted 0 IPv4 lease(s) from subnet(s) 44"
+ " WARNING: lease4-wipe is deprecated!";
testCommand(cmd, CONTROL_RESULT_EMPTY, exp_rsp);
checkLease4Stats(44, 0, 0);
" \"subnet-id\": 0"
" }\n"
"}";
- string exp_rsp = "Deleted 0 IPv4 lease(s) from subnet(s) 44 88";
+ string exp_rsp = "Deleted 0 IPv4 lease(s) from subnet(s) 44 88"
+ " WARNING: lease4-wipe is deprecated!";
testCommand(cmd, CONTROL_RESULT_EMPTY, exp_rsp);
checkLease4Stats(44, 0, 0);
" \"subnet-id\": 66\n"
" }\n"
"}";
- string exp_rsp = "Deleted 2 IPv6 lease(s) from subnet(s) 66";
+ string exp_rsp = "Deleted 2 IPv6 lease(s) from subnet(s) 66"
+ " WARNING: lease6-wipe is deprecated!";
// The status expected is success. The lease should be deleted.
testCommand(cmd, CONTROL_RESULT_SUCCESS, exp_rsp);
" \"subnet-id\": 0\n"
" }\n"
"}";
- string exp_rsp = "Deleted 4 IPv6 lease(s) from subnet(s) 66 99";
+ string exp_rsp = "Deleted 4 IPv6 lease(s) from subnet(s) 66 99"
+ " WARNING: lease6-wipe is deprecated!";
// The status expected is success. The lease should be deleted.
testCommand(cmd, CONTROL_RESULT_SUCCESS, exp_rsp);
"{\n"
" \"command\": \"lease6-wipe\"\n"
"}";
- string exp_rsp = "Deleted 4 IPv6 lease(s) from subnet(s) 66 99";
+ string exp_rsp = "Deleted 4 IPv6 lease(s) from subnet(s) 66 99"
+ " WARNING: lease6-wipe is deprecated!";
// The status expected is success. The lease should be deleted.
testCommand(cmd, CONTROL_RESULT_SUCCESS, exp_rsp);
" \"subnet-id\": 66"
" }\n"
"}";
- string exp_rsp = "Deleted 0 IPv6 lease(s) from subnet(s) 66";
+ string exp_rsp = "Deleted 0 IPv6 lease(s) from subnet(s) 66"
+ " WARNING: lease6-wipe is deprecated!";
testCommand(cmd, CONTROL_RESULT_EMPTY, exp_rsp);
checkLease6Stats(66, 0, 0, 0);
" \"subnet-id\": 0"
" }\n"
"}";
- string exp_rsp = "Deleted 0 IPv6 lease(s) from subnet(s) 66 99";
+ string exp_rsp = "Deleted 0 IPv6 lease(s) from subnet(s) 66 99"
+ " WARNING: lease6-wipe is deprecated!";
testCommand(cmd, CONTROL_RESULT_EMPTY, exp_rsp);
checkLease6Stats(66, 0, 0, 0);
"access": "write",
"avail": "1.3.0",
"brief": [
- "This command removes all leases associated with a given subnet."
+ "This command removes all leases associated with a given subnet.",
+ "This command is deprecated and it will be removed in the future."
],
"cmd-syntax": [
"{",
"access": "write",
"avail": "1.3.0",
"brief": [
- "This command removes all leases associated with a given subnet."
+ "This command removes all leases associated with a given subnet.",
+ "This command is deprecated and it will be removed in the future."
],
"cmd-comment": [
"Note: not all backends support this command."