9f89e0a4 | 08-Aug-2022 |
Rob Bradford <robert.bradford@intel.com> |
option_parser: For tuple list type strip brackets only once
The new option parsing for "[..,]" syntax is much stricter and requires that everything is balanced in terms of brackets. Change the strip
option_parser: For tuple list type strip brackets only once
The new option parsing for "[..,]" syntax is much stricter and requires that everything is balanced in terms of brackets. Change the stripping of the brackets to only strip the first and last one rather than multiple:
e.g. "[[a,b], [c,d]]" becomes "[a,b],[c,d]" rather than "a,b], [c"
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
show more ...
|
46b790b5 | 08-Aug-2022 |
Rob Bradford <robert.bradford@intel.com> |
option_parser: Simplify code for splitting on commas
The parsing is now O(1) as we only consider each character in the input once and further it removes the need for allocating memory for reassembli
option_parser: Simplify code for splitting on commas
The parsing is now O(1) as we only consider each character in the input once and further it removes the need for allocating memory for reassembling the option parameter.
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
show more ...
|
ad521fd4 | 08-Nov-2021 |
Sebastien Boeuf <sebastien.boeuf@intel.com> |
option_parser: Create generic type Tuple
Creates a new generic type Tuple so that the same implementation of FromStr trait can be reused for both parsing a list of two integers and parsing a list of
option_parser: Create generic type Tuple
Creates a new generic type Tuple so that the same implementation of FromStr trait can be reused for both parsing a list of two integers and parsing a list of one integer associated with a list of integers.
This anticipates the need for retrieving sublists, which will be needed when trying to describe the host CPU affinity for every vCPU.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
show more ...
|
e4cbafcd | 08-Nov-2021 |
Sebastien Boeuf <sebastien.boeuf@intel.com> |
option_parser: Handle inner brackets
In case we want to implement a type that would hold a list of lists, we need the option parser to be able to ignore the commas for multiple layers of brackets.
option_parser: Handle inner brackets
In case we want to implement a type that would hold a list of lists, we need the option parser to be able to ignore the commas for multiple layers of brackets.
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
show more ...
|