예제 #1
0
func (p *VirStoragePool) Free() error {
	result := C.virStoragePoolFree(p.ptr)
	if result < 0 {
		return errors.New(GetLastError())
	}
	return nil
}
예제 #2
0
// Free frees a storage pool object, releasing all memory associated with it.
// Does not change the state of the pool on the host.
func (pool StoragePool) Free() error {
	pool.log.Println("freeing storage pool object...")
	cRet := C.virStoragePoolFree(pool.virStoragePool)
	ret := int32(cRet)

	if ret == -1 {
		err := LastError()
		pool.log.Printf("an error occurred: %v\n", err)
		return err
	}

	pool.log.Println("pool freed")

	return nil
}
예제 #3
0
func (p *VirStoragePool) Free() error {
	if result := C.virStoragePoolFree(p.ptr); result != 0 {
		return GetLastError()
	}
	return nil
}
예제 #4
0
func cleanupStoragePool(pool *StoragePool) {
	C.virStoragePoolFree(pool.cptr)
}