Lines Matching defs:be

39 # pkg(1) can be installed and used without any BE management module.
52 import libbe as be
56 import libbe_py as be
59 # be imported.
87 and history state to be restored later with _reset_image_state
91 # boot environment operations fail, they can be written to the
96 """Internal function intended to be used to reset the image
109 # be recorded in the original image root. This
110 # needs to be done before the image root is
117 # the image root, it needs to be reset back to its
133 and bootadm problems should be rare."""
187 for be in self.beList:
188 if not be.mounted:
192 # If so it must also be active. If we are not
197 if not be.active:
202 if be.mountpoint != self.root:
206 # and clones can be managed.
207 self.be_name = be.name
208 self.dataset = be.root_dataset.name
209 self.img_be = be
351 be.name for be in BeadmV2BootEnv.get_be_list() if be.name
376 for be in beList:
377 if not be.mounted:
381 # If so it must also be active. If we are not
386 if be.active:
387 return be.name, be.uuid
389 if be.mountpoint == path:
390 return be.name, be.uuid
404 for be in beList:
405 uuid_bes[be.uuid] = be.name
491 BE (if created) should be set as the active one on next boot.
504 # ending here so that it will be recorded in the new
526 On the next boot the Boot Environment {be_name_clone} will be
574 # Re-lock be image.
580 # Activation was successful so the be image was
581 # unmounted and the parent image must be re-locked.
623 logger.error(_("{bename} failed to be updated. No "
677 "to be updated. A snapshot was taken before the "
696 "to be updated. A snapshot was taken before the "
708 on UFS will not be handled by BootEnv.
731 # This should be fixed before this class is ever
742 # If so it must also be active. If we are not
756 # and clones can be managed.
762 err, snapshot_name = be.beCreateSnapshot(self.be_name)
769 # we require BootEnv to be initialised within
798 # not be filled.
840 return hasattr(be, "beVerifyBEName")
850 ret, be_name_clone, not_used = be.beCopy(
858 return be.beRename(orig_name, new_name)
862 return be.beDestroy(be_name, 1, True)
870 # Force unmount the be and destroy it.
887 return be.beMount(be_name, mntpt, include_bpool=include_bpool)
891 return be.beUnmount(be_name, force=force)
895 return be.beActivate(be_name)
903 if be.beVerifyBEName(be_name) != 0:
910 if be_name in (be.get("orig_be_name") for be in beList):
922 # Check for the old beList() API since pkg(1) can be
927 beVals = be.beList()
947 for be in beList:
948 be_name = be.get("orig_be_name")
949 be_uuid = be.get("uuid_str")
951 if not be_name or not be.get("mounted"):
955 # If so it must also be active. If we are not
960 if be.get("active"):
963 if be.get("mountpoint") == path:
971 be["orig_be_name"] for be in BeadmV1BootEnv.get_be_list()
972 if "orig_be_name" in be
981 for be in beList:
982 uuid_bes[be.get("uuid_str")] = be.get("orig_be_name")
990 for be in beList:
994 if be.get("active_unbootable", False):
996 if be.get("active_boot"):
997 return be.get("orig_be_name")
1006 for be in beList:
1007 if be.get("active"):
1008 return be.get("orig_be_name")
1024 ret, be_name_clone, not_used = be.beCopy()
1031 ret = be.beRename(be_name_clone, be_name)
1057 ret, self.be_name_clone, not_used = be.beCopy()
1061 ret = be.beRename(self.be_name_clone, be_name)
1067 if be.beMount(self.be_name_clone, self.clone_dir) != 0:
1083 and bootadm problems should be rare."""
1110 BE (if created) should be set as the active one on next boot.
1115 be.beActivate(self.be_name_clone) != 0:
1121 # ending here so that it will be recorded in the new
1128 if be.beUnmount(self.be_name_clone) != 0:
1140 On the next boot the Boot Environment {be_name_clone} will be
1188 # Re-lock be image.
1194 # Activation was successful so the be image was
1195 # unmounted and the parent image must be re-locked.
1224 if be.beRollback(self.be_name,
1236 logger.error(_("{bename} failed to be updated. No "
1248 if be.beDestroySnapshot(self.be_name, self.snapshot_name) != 0:
1269 be.beCopy(None, self.be_name, self.snapshot_name)
1272 # without expecting the BE clone name to be
1280 be.beCopy(self.be_name_clone, \
1288 if be.beMount(self.be_name_clone, self.clone_dir) != 0:
1296 "to be updated. A snapshot was taken before the "
1304 if be.beRollback(self.be_name, self.snapshot_name) != 0:
1311 "to be updated. A snapshot was taken before the "
1433 elif "be" in locals():