Hierarchy: remove snapshot_dir attribute and add boot_dir attribute

This commit is contained in:
Eric Torres 2019-03-13 03:11:47 -07:00
parent f23fefa4f7
commit a6a670f77f

View File

@ -67,6 +67,14 @@ class Hierarchy:
date = datetime.datetime.utcnow().isoformat()
return os.path.join(self.base_dir, date.replace(":", "-"))
@property
def boot_dir(self):
"""Retrieve the /boot backup directory of this hierarchy.
:rtype: str
"""
return os.path.join(self.curr_snapshot, "boot")
@property
def etc_dir(self):
"""Retrieve the /etc backup directory of this hierarchy.
@ -83,14 +91,6 @@ class Hierarchy:
"""
return os.path.join(self.curr_snapshot, "home")
@property
def snapshot_dir(self):
"""Retrieve the snapshot directory of this hierarchy.
:rtype: str
"""
return os.path.join(self.curr_snapshot, "snapshots")
@property
def root_home_dir(self):
"""Retrieve root's home directory of this hierarchy.