Commit 7a6be9dd authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[5472] Make leaseX-update status consistent with leaseX-add.

parent f69a91bd
......@@ -608,7 +608,7 @@ LeaseCmdsImpl::lease4UpdateHandler(CalloutHandle& handle) {
lease4 = parser.parse(config, cmd_args_, force_create);
if (force_create && !LeaseMgrFactory::instance().getLease4(lease4->addr_)) {
LeaseMgrFactory::instance().addLease(lease4);
setSuccessResponse(handle, "IPv4 lease created.");
setSuccessResponse(handle, "IPv4 lease added.");
} else {
LeaseMgrFactory::instance().updateLease4(lease4);
......@@ -644,7 +644,7 @@ LeaseCmdsImpl::lease6UpdateHandler(CalloutHandle& handle) {
if (force_create && !LeaseMgrFactory::instance().getLease6(lease6->type_,
lease6->addr_)) {
LeaseMgrFactory::instance().addLease(lease6);
setSuccessResponse(handle, "IPv6 lease created.");
setSuccessResponse(handle, "IPv6 lease added.");
} else {
LeaseMgrFactory::instance().updateLease6(lease6);
setSuccessResponse(handle, "IPv6 lease updated.");
......
......@@ -1520,7 +1520,7 @@ TEST_F(LeaseCmdsTest, Lease4UpdateForceCreate) {
" \"force-create\": true"
" }\n"
"}";
string exp_rsp = "IPv4 lease created.";
string exp_rsp = "IPv4 lease added.";
testCommand(txt, CONTROL_RESULT_SUCCESS, exp_rsp);
// Now check that the lease is still there.
......@@ -1751,7 +1751,7 @@ TEST_F(LeaseCmdsTest, Lease6UpdateForceCreate) {
" \"force-create\": true"
" }\n"
"}";
string exp_rsp = "IPv6 lease created.";
string exp_rsp = "IPv6 lease added.";
testCommand(txt, CONTROL_RESULT_SUCCESS, exp_rsp);
// Now check that the lease is really there.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment