if ((state == Lease::STATE_DECLINED) && (type == Lease::TYPE_PD)) {
isc_throw(isc::InvalidOperation,
- "Invalid PD prefix in declined state.");
+ "Invalid declined state for PD prefix.");
}
// Handle user context.
return (l);
}
-};
-};
+} // end of namespace lease_cmds
+} // end of namespace isc
"2001:db8:1::1";
testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
- // Invalid PD prefix in declined state.
+ // Invalid declined state for PD prefix.
txt =
"{\n"
" \"command\": \"lease6-add\",\n"
" \"state\": 1"
" }\n"
"}";
- exp_rsp = "Invalid PD prefix in declined state.";
+ exp_rsp = "Invalid declined state for PD prefix.";
testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
}
"'{ \"comment\": \"in user context\" }'";
testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
- // Invalid PD prefix in declined state.
+ // Invalid declined state for PD prefix.
txt =
"{\n"
" \"command\": \"lease6-update\",\n"
" \"state\": 1"
" }\n"
"}";
- exp_rsp = "Invalid PD prefix in declined state.";
+ exp_rsp = "Invalid declined state for PD prefix.";
testCommand(txt, CONTROL_RESULT_ERROR, exp_rsp);
}
" ]"
" }"
"}";
- string exp_rsp = "Invalid PD prefix in declined state.";
+ string exp_rsp = "Invalid declined state for PD prefix.";
testCommand(cmd, CONTROL_RESULT_ERROR, exp_rsp);
// Check that the lease was not inserted.
" ]"
" }"
"}";
- string exp_rsp = "Invalid PD prefix in declined state.";
+ string exp_rsp = "Invalid declined state for PD prefix.";
testCommand(cmd, CONTROL_RESULT_ERROR, exp_rsp);
// Check that the lease we inserted is stored.