Skip to content

Commit

Permalink
Implement Delete()
Browse files Browse the repository at this point in the history
  • Loading branch information
synackd committed Oct 12, 2023
1 parent 71e7253 commit 6f9cdc4
Show file tree
Hide file tree
Showing 2 changed files with 526 additions and 2 deletions.
13 changes: 13 additions & 0 deletions cmd/boot-script-service/boot_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,19 @@ func nidName(nid int) string {
func Remove(bp bssTypes.BootParams) error {
debugf("Remove(): Ready to remove %v\n", bp)
var err error
if useSQL {
var (
nodesDeleted []string
bcsDeleted []string
)
nodesDeleted, bcsDeleted, err = bssdb.Delete(bp)
if err != nil {
return err
}
debugf("Node IDs deleted: %v", nodesDeleted)
debugf("Boot Config IDs deleted: %v", bcsDeleted)
return err
}
for _, h := range bp.Hosts {
e := removeHost(h)
if err == nil {
Expand Down
Loading

0 comments on commit 6f9cdc4

Please sign in to comment.