fix how to extract property from vfp port state #541
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the logic for parsing VFP port state properties in
Get-SdnVfpPortStateto better handle properties that are output without explicit key/value pairs, and adds support for theSriovEnabledproperty in theVfpPortStateclass. The main changes focus on improving how enabled features are detected and mapped to the state object.Enhancements to VFP Port State Parsing:
Updated the parsing logic in
Get-SdnVfpPortStateto handle lines that only contain a property name (without a value), assuming these properties are enabled by default when present in the output. This ensures properties like "SR-IOV Enabled" and various offload features are correctly set to$truewhen detected.Moved the mapping of several port state and offload properties (such as "DTLS Offload Enabled", "GFT Offload Enabled", and various NVGRE/VXLAN offload features) from the key/value parsing block to the new single-property-line parsing block, improving robustness and accuracy. [1] [2]
VfpPortState Class Update:
[boolean]$SriovEnabledproperty to theVfpPortStateclass to track the SR-IOV enablement state.Change type
Checklist: