( cmd *cobra.Command, client DaemonClient, id string, flags bridgeUpdateFlags, )
| 380 | } |
| 381 | |
| 382 | func bridgeRoutingPolicyForUpdate( |
| 383 | cmd *cobra.Command, |
| 384 | client DaemonClient, |
| 385 | id string, |
| 386 | flags bridgeUpdateFlags, |
| 387 | ) (bridgepkg.RoutingPolicy, error) { |
| 388 | current, err := client.GetBridge(cmd.Context(), id) |
| 389 | if err != nil { |
| 390 | return bridgepkg.RoutingPolicy{}, err |
| 391 | } |
| 392 | policy := current.RoutingPolicy |
| 393 | if cmd.Flags().Changed("include-peer") { |
| 394 | policy.IncludePeer = flags.includePeer |
| 395 | } |
| 396 | if cmd.Flags().Changed("include-thread") { |
| 397 | policy.IncludeThread = flags.includeThread |
| 398 | } |
| 399 | if cmd.Flags().Changed("include-group") { |
| 400 | policy.IncludeGroup = flags.includeGroup |
| 401 | } |
| 402 | return policy, nil |
| 403 | } |
| 404 | |
| 405 | func bridgeDeliveryDefaultsForUpdate( |
| 406 | rawValue string, |
no test coverage detected