def _preprocess(self, _): self.device_path, partition_paths = google_cloud.PreprocessAttachDisk( self.disk_name) self.mount_path = mount_local.PreprocessMountDisk( partition_paths, self.mount_partition) self.local_path = self.device_path
def _preprocess(self, _, required_states): if EvidenceState.ATTACHED in required_states: self.device_path, partition_paths = google_cloud.PreprocessAttachDisk( self.disk_name) self.state[EvidenceState.ATTACHED] = True if EvidenceState.MOUNTED in required_states: self.mount_path = mount_local.PreprocessMountDisk( partition_paths, self.mount_partition) self.local_path = self.device_path self.state[EvidenceState.MOUNTED] = True
def _preprocess(self, _, required_states): # The GoogleCloudDisk should never need to be mounted unless it has child # evidence (GoogleCloudDiskRawEmbedded). In all other cases, the # DiskPartition evidence will be used. In this case we're breaking the # evidence layer isolation and having the child evidence manage the # mounting and unmounting. if EvidenceState.ATTACHED in required_states: self.device_path, partition_paths = google_cloud.PreprocessAttachDisk( self.disk_name) self.partition_paths = partition_paths self.local_path = self.device_path self.state[EvidenceState.ATTACHED] = True
def _preprocess(self, _, required_states): # The GoogleCloudDisk should never need to be mounted unless it has child # evidence (GoogleCloudDiskRawEmbedded). In all other cases, the # DiskPartition evidence will be used. In this case we're breaking the # evidence layer isolation and having the child evidence manage the # mounting and unmounting. # Explicitly lock this method to prevent race condition with two workers # attempting to attach disk at same time, given delay with attaching in GCP. with filelock.FileLock(config.RESOURCE_FILE_LOCK): if EvidenceState.ATTACHED in required_states: self.device_path, partition_paths = google_cloud.PreprocessAttachDisk( self.disk_name) self.partition_paths = partition_paths self.local_path = self.device_path self.state[EvidenceState.ATTACHED] = True
def _preprocess(self): self.local_path = google_cloud.PreprocessAttachDisk(self.disk_name) self.loopdevice_path = mount_local.PreprocessLosetup(self.local_path) self.mount_path = mount_local.PreprocessMountDisk( self.loopdevice_path, self.mount_partition) self.local_path = os.path.join(self.mount_path, self.embedded_path)
def _preprocess(self): self.local_path = google_cloud.PreprocessAttachDisk(self.disk_name)
def preprocess(self): google_cloud.PreprocessAttachDisk(self) mount_local.PreprocessMountDisk(self) self.local_path = os.path.join(self.mount_path, self.embedded_path)
def preprocess(self): google_cloud.PreprocessAttachDisk(self)