Commit ee8e42a
authored
fix how to extract property from vfp port state (#541)
This pull request updates the logic for parsing VFP port state
properties in `Get-SdnVfpPortState` to better handle properties that are
output without explicit key/value pairs, and adds support for the
`SriovEnabled` property in the `VfpPortState` class. 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-SdnVfpPortState` to 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 `$true` when 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]](diffhunk://#diff-11217f20b55d3b4ea34c8c217794c81d65acc4852dff9bf4295e5cc4d6dfaeedL2231-L2250)
[[2]](diffhunk://#diff-11217f20b55d3b4ea34c8c217794c81d65acc4852dff9bf4295e5cc4d6dfaeedL2265-R2280)
**VfpPortState Class Update:**
* Added a new `[boolean]$SriovEnabled` property to the `VfpPortState`
class to track the SR-IOV enablement state.
# Change type
- [x] Bug fix (non-breaking change)
- [ ] Code style update (formatting, local variables)
- [ ] New Feature (non-breaking change that adds new functionality
without impacting existing)
- [ ] Breaking change (fix or feature that may cause functionality
impact)
- [ ] Other
# Checklist:
- [x] My code follows the style and contribution guidelines of this
project.
- [x] I have tested and validated my code changes.1 parent 9a66e82 commit ee8e42a
1 file changed
+31
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
2228 | 2229 | | |
2229 | 2230 | | |
2230 | 2231 | | |
2231 | | - | |
2232 | | - | |
2233 | | - | |
2234 | | - | |
2235 | 2232 | | |
2236 | 2233 | | |
2237 | 2234 | | |
2238 | | - | |
2239 | | - | |
2240 | | - | |
2241 | | - | |
2242 | | - | |
2243 | | - | |
2244 | | - | |
2245 | | - | |
2246 | | - | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
2251 | 2235 | | |
2252 | 2236 | | |
2253 | 2237 | | |
| |||
2262 | 2246 | | |
2263 | 2247 | | |
2264 | 2248 | | |
2265 | | - | |
2266 | | - | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
2267 | 2279 | | |
2268 | 2280 | | |
2269 | 2281 | | |
| |||
0 commit comments