Skip to content

Commit

Permalink
ovn-sbctl: Make 'chassis-del' delete all encaps.
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Wang <[email protected]>
Acked-by: Russell Bryant <[email protected]>
  • Loading branch information
yew011 committed Aug 16, 2015
1 parent a2635ac commit 3b74b8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ovn/utilities/ovn-sbctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 3b74b8c

Please sign in to comment.