[ovs-dev] [PATCH 2/3] ovn-sbctl: Make 'chassis-del' delete all encaps.

Russell Bryant rbryant at redhat.com
Sun Aug 16 21:11:59 UTC 2015


On 08/16/2015 12:56 PM, Alex Wang wrote:
> Signed-off-by: Alex Wang <alexw at nicira.com>
> ---
>  ovn/utilities/ovn-sbctl.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/ovn/utilities/ovn-sbctl.c b/ovn/utilities/ovn-sbctl.c
> index 8887c95..c69800a 100644
> --- a/ovn/utilities/ovn-sbctl.c
> +++ b/ovn/utilities/ovn-sbctl.c
> @@ -548,6 +548,11 @@ cmd_chassis_del(struct ctl_context *ctx)
>      sbctl_ch = find_chassis(sbctl_ctx, ctx->argv[1], must_exist);
>      if (sbctl_ch) {
>          if (sbctl_ch->ch_cfg) {
> +            size_t i;
> +
> +            for (i = 0; i < sbctl_ch->ch_cfg->n_encaps; i++) {
> +                sbrec_encap_delete(sbctl_ch->ch_cfg->encaps[i]);
> +            }
>              sbrec_chassis_delete(sbctl_ch->ch_cfg);
>          }
>          shash_find_and_delete(&sbctl_ctx->chassis, ctx->argv[1]);
> 

Acked-by: Russell Bryant <rbryant at redhat.com>

-- 
Russell Bryant



More information about the dev mailing list