func (p *VirStoragePool) Delete(flags uint32) error { result := C.virStoragePoolDelete(p.ptr, C.uint(flags)) if result == -1 { return errors.New(GetLastError()) } return nil }
// Delete deletes the underlying pool resources. This is a non-recoverable // operation. The StoragePool object itself is not free'd. func (pool StoragePool) Delete(flags StoragePoolDeleteFlag) error { pool.log.Printf("deleting storage pool (flags = %v)...\n", flags) cRet := C.virStoragePoolDelete(pool.virStoragePool, C.uint(flags)) ret := int32(cRet) if ret == -1 { err := LastError() pool.log.Printf("an error occurred: %v\n", err) return err } pool.log.Println("pool deleted") return nil }