What was the reason for this change? When a chassis is deleted, its encaps should get deleted automatically because their only reference has just disappeared.
On Sun, Aug 16, 2015 at 09:56:54AM -0700, Alex Wang wrote: > Signed-off-by: Alex Wang <al...@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]); > -- > 1.7.9.5 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev