From 594c4e6eb4b6a757e63c73349effcb567293b198 Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Wed, 14 Sep 2016 10:15:55 +0200 Subject: [PATCH] [4765] Addressed review comments. --- doc/guide/dhcp6-srv.xml | 2 +- src/bin/dhcp4/dhcp4.spec | 4 +++- src/bin/dhcp4/tests/classify_unittest.cc | 13 ++++++++++++- src/bin/dhcp6/dhcp6.spec | 4 +++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/guide/dhcp6-srv.xml b/doc/guide/dhcp6-srv.xml index 62f696fcac..483a101b7d 100644 --- a/doc/guide/dhcp6-srv.xml +++ b/doc/guide/dhcp6-srv.xml @@ -2636,7 +2636,7 @@ should include options from the isc option space: } ]" } ]" - }" + } Static class assignments, as shown above, can be used in conjuction diff --git a/src/bin/dhcp4/dhcp4.spec b/src/bin/dhcp4/dhcp4.spec index cb9a570684..d6111d2430 100644 --- a/src/bin/dhcp4/dhcp4.spec +++ b/src/bin/dhcp4/dhcp4.spec @@ -537,12 +537,14 @@ "item_type": "list", "item_optional": true, "item_default": [], + "item_description": "list of reserved classes for a client", "list_item_spec": { "item_name": "client-class", "item_type": "string", "item_optional": false, - "item_default": "" + "item_default": "", + "item_description": "one of the classes reserved for a client" } } ] } diff --git a/src/bin/dhcp4/tests/classify_unittest.cc b/src/bin/dhcp4/tests/classify_unittest.cc index 220d4df87b..513c8a734e 100644 --- a/src/bin/dhcp4/tests/classify_unittest.cc +++ b/src/bin/dhcp4/tests/classify_unittest.cc @@ -24,7 +24,7 @@ namespace { /// @brief Set of JSON configurations used throughout the classify tests. /// /// - Configuration 0: -/// - Used for testing direct traffic +/// - Used for testing dynamic assignment of client classes /// - 1 subnet: 10.0.0.0/24 /// - 1 pool: 10.0.0.10-10.0.0.100 /// - the following classes defined: @@ -32,6 +32,17 @@ namespace { /// option[93].hex == 0x0007, set server-hostname to deneb /// option[93].hex == 0x0006, set boot-file-name to pxelinux.0 /// option[93].hex == 0x0001, set boot-file-name to ipxe.efi +/// +/// - Configuration 1: +/// - Used for testing reservations of client classes for a client +/// - The following classes are defined: +/// - 'pxe', next-server set to 1.2.3.4, assigned dynamically +/// - 'reserved-class1', routers set to 10.0.0.200, reserved for a +/// host using HW address 'aa:bb:cc:dd:ee:ff' +/// - 'reserved-class2', domain-name-servers set to 10.0.0.201, +/// also reserved for the host using HW address +/// 'aa:bb:cc:dd:ee:ff' +/// - Subnet of 10.0.0.0/24 with a single address pool const char* CONFIGS[] = { // Configuration 0 "{ \"interfaces-config\": {" diff --git a/src/bin/dhcp6/dhcp6.spec b/src/bin/dhcp6/dhcp6.spec index 5a45670caa..65ba301a83 100644 --- a/src/bin/dhcp6/dhcp6.spec +++ b/src/bin/dhcp6/dhcp6.spec @@ -610,12 +610,14 @@ "item_type": "list", "item_optional": true, "item_default": [], + "item_description": "list of reserved classes for a client", "list_item_spec": { "item_name": "client-class", "item_type": "string", "item_optional": false, - "item_default": "" + "item_default": "", + "item_description": "one of the classes reserved for a client" } } ] } -- 2.47.2