[CRIU] [PATCH 01/11] p.haul: rename some functions of phaul_iter_worker to make it private

Nikita Spiridonov nspiridonov at virtuozzo.com
Mon Mar 21 09:35:16 PDT 2016


Rename validate_cpu and pre_dump_check functions of phaul_iter_worker
to make it private.

Signed-off-by: Nikita Spiridonov <nspiridonov at virtuozzo.com>
---
 phaul/iters.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/phaul/iters.py b/phaul/iters.py
index 8adf4a2..04f59ec 100644
--- a/phaul/iters.py
+++ b/phaul/iters.py
@@ -61,7 +61,7 @@ class phaul_iter_worker:
 		self.htype.set_options(opts)
 		self.fs.set_options(opts)
 
-	def validate_cpu(self):
+	def __validate_cpu(self):
 		if self.__force:
 			return
 		logging.info("Checking CPU compatibility")
@@ -83,7 +83,7 @@ class phaul_iter_worker:
 		if not self.target_host.check_cpuinfo():
 			raise Exception("CPUs mismatch")
 
-	def pre_dump_check(self):
+	def __pre_dump_check(self):
 		# pre-dump auto-detection
 		req = criu_req.make_dirty_tracking_req(self.img)
 		resp = self.criu_connection.send_req(req)
@@ -108,7 +108,7 @@ class phaul_iter_worker:
 
 		self.fs.set_work_dir(self.img.work_dir())
 
-		self.validate_cpu()
+		self.__validate_cpu()
 
 		logging.info("Preliminary FS migration")
 		fsstats = self.fs.start_migration()
@@ -118,7 +118,7 @@ class phaul_iter_worker:
 		if self.__pre_dump == PRE_DUMP_AUTO_DETECT:
 			# pre-dump auto-detection
 			try:
-				self.__pre_dump = (self.pre_dump_check() and self.htype.can_pre_dump())
+				self.__pre_dump = (self.__pre_dump_check() and self.htype.can_pre_dump())
 				logging.info("\t`- Auto %s" % (self.__pre_dump and 'enabled' or 'disabled'))
 			except:
 				# The available criu seems to not
-- 
1.7.1



More information about the CRIU mailing list