mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 14:35:29 +00:00
[#2974] Addressed some comments
This commit is contained in:
committed by
Razvan Becheriu
parent
2f5d06caf1
commit
a2b33c0072
@@ -873,8 +873,9 @@ Commands Supported by the DHCPv4 Server
|
||||
The ``localize4`` Command
|
||||
-------------------------
|
||||
|
||||
The :isccmd:`localize4` command returns the result of DHCPv4 subnet selection.
|
||||
Recognized entries take strings and are:
|
||||
The :isccmd:`localize4` provides a way to test DHCPv4 subnet selection based
|
||||
on a set of input parameters typically supplied in a client packet.
|
||||
Recognized parameters take strings and are:
|
||||
|
||||
- ``interface`` - the incoming interface name
|
||||
- ``address`` - the client address
|
||||
@@ -901,8 +902,9 @@ Outside of errors possible results are:
|
||||
The ``localize4o6`` Command
|
||||
---------------------------
|
||||
|
||||
The :isccmd:`localize4o6` command returns the result of DHCPv4-over-DHCPv6
|
||||
subnet selection. Recognized entries take strings and are:
|
||||
The :isccmd:`localize4to5` provides a way to test DHCPv4-over-DHCPv6 subnet
|
||||
selection based on a set of input parameters typically supplied in a client
|
||||
packet. Recognized parameters take strings and are:
|
||||
|
||||
- ``interface`` - the incoming interface name of the DHCPv6 server
|
||||
- ``interface-id`` - the binary content of the interface-id relay option
|
||||
@@ -935,8 +937,9 @@ Commands Supported by the DHCPv6 Server
|
||||
The ``localize6`` Command
|
||||
-------------------------
|
||||
|
||||
The :isccmd:`localize6` command returns the result of DHCPv6 subnet selection.
|
||||
Recognized entries take strings and are:
|
||||
The :isccmd:`localize6` provides a way to test DHCPv6 subnet selection based
|
||||
on a set of input parameters typically supplied in a client packet.
|
||||
Recognized parameters take strings and are:
|
||||
|
||||
- ``interface`` - the incoming interface name
|
||||
- ``interface-id`` - the binary content of the interface-id relay option
|
||||
|
@@ -848,7 +848,7 @@ ControlledDhcpv4Srv::commandLocalize4Handler(const string&,
|
||||
ConstSubnet4Ptr subnet = CfgMgr::instance().getCurrentCfg()->
|
||||
getCfgSubnets4()->selectSubnet(selector);
|
||||
if (!subnet) {
|
||||
return (createAnswer(CONTROL_RESULT_EMPTY, "no selected subnet"));
|
||||
return (createAnswer(CONTROL_RESULT_EMPTY, "no subnet selected"));
|
||||
}
|
||||
SharedNetwork4Ptr network;
|
||||
subnet->getSharedNetwork(network);
|
||||
|
@@ -2349,7 +2349,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4RAILinkSelect) {
|
||||
" \"link\": \"10.0.1.1\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -2400,7 +2400,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4SubnetSelect) {
|
||||
" \"subnet\": \"10.0.1.1\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -2452,7 +2452,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4RelayAddress) {
|
||||
" \"relay\": \"10.0.1.1\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -2503,7 +2503,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4Gateway) {
|
||||
" \"relay\": \"10.0.1.1\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -2554,7 +2554,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4Client) {
|
||||
" \"address\": \"10.0.1.1\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -2605,7 +2605,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4Remote) {
|
||||
" \"remote\": \"10.0.1.1\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -2659,7 +2659,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4Iface) {
|
||||
" \"interface\": \"eth0\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Same interface: the subnet is selected.
|
||||
@@ -2710,7 +2710,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4Class) {
|
||||
" \"address\": \"192.0.2.1\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range and in guard: the subnet is selected.
|
||||
@@ -3036,7 +3036,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4o6Remote) {
|
||||
" \"remote\": \"2001:db8:2::2\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -3092,7 +3092,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4o6RelayInterfaceId) {
|
||||
" \"interface-id\": \"'foobar'\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Same interface: the subnet is selected.
|
||||
@@ -3145,7 +3145,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, localize4o6Iface) {
|
||||
" \"interface\": \"foobar\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Same interface: the subnet is selected.
|
||||
|
@@ -798,7 +798,7 @@ ControlledDhcpv6Srv::commandLocalize6Handler(const string&,
|
||||
ConstSubnet6Ptr subnet = CfgMgr::instance().getCurrentCfg()->
|
||||
getCfgSubnets6()->selectSubnet(selector);
|
||||
if (!subnet) {
|
||||
return (createAnswer(CONTROL_RESULT_EMPTY, "no selected subnet"));
|
||||
return (createAnswer(CONTROL_RESULT_EMPTY, "no subnet selected"));
|
||||
}
|
||||
SharedNetwork6Ptr network;
|
||||
subnet->getSharedNetwork(network);
|
||||
|
@@ -2280,7 +2280,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, localize6Addr) {
|
||||
" \"remote\": \"fe80::abcd\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -2332,7 +2332,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, localize6Iface) {
|
||||
" \"interface\": \"bar\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Same interface: the subnet is selected.
|
||||
@@ -2383,7 +2383,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, localize6RelayLinkaddr) {
|
||||
" \"link\": \"2001:db8:2::2\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range: the subnet is selected.
|
||||
@@ -2441,7 +2441,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, localize6RelayInterfaceId) {
|
||||
" \"interface-id\": \"'foobar'\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Same interface id: the subnet is selected.
|
||||
@@ -2494,7 +2494,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, localize6Class) {
|
||||
" \"remote\": \"2001:db8:1::1\""
|
||||
" }"
|
||||
"}", response);
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no selected subnet\" }",
|
||||
EXPECT_EQ("{ \"result\": 3, \"text\": \"no subnet selected\" }",
|
||||
response);
|
||||
|
||||
// Address in range and in guard: the subnet is selected.
|
||||
|
Reference in New Issue
Block a user