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

Alex Wang alexw at nicira.com
Sun Aug 16 16:56:54 UTC 2015


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]);
-- 
1.7.9.5




More information about the dev mailing list