Snapshot support
Change-Id: If56531e366b21368984eb5ba14af661dc4892876
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from nova.api.metadata import base as instance_metadata
|
||||
from nova.compute import power_state
|
||||
@@ -71,6 +72,14 @@ class PathUtils(object):
|
||||
os.makedirs(instance_folder)
|
||||
return instance_folder
|
||||
|
||||
def clean_up_folder(self, fpath):
|
||||
if os.path.isdir(fpath):
|
||||
shutil.rmtree(fpath)
|
||||
|
||||
def clean_up_file(self, filepath):
|
||||
if os.path.exists(filepath):
|
||||
os.remove(filepath)
|
||||
|
||||
|
||||
class VMUtils(object):
|
||||
def __init__(self):
|
||||
|
||||
Reference in New Issue
Block a user