def setUpClass(cls): try: project_info = utils.ReadProjectInfo( ['resource_group_name', 'instance_name']) except (OSError, RuntimeError, ValueError) as exception: raise unittest.SkipTest(str(exception)) cls.resource_group_name = project_info['resource_group_name'] cls.instance_to_analyse = project_info['instance_name'] cls.disk_to_copy = project_info.get('disk_name') cls.dst_region = project_info.get('dst_region') cls.az = account.AZAccount(cls.resource_group_name) cls.disks = [] # List of AZDisks for test cleanup
def setUpClass(cls): try: project_info = utils.ReadProjectInfo(['instance', 'zone']) except (OSError, RuntimeError, ValueError) as exception: raise unittest.SkipTest(str(exception)) cls.instance_to_analyse = project_info['instance'] cls.zone = project_info['zone'] cls.dst_zone = project_info.get('destination_zone', None) cls.volume_to_copy = project_info.get('volume_id', None) cls.encrypted_volume_to_copy = project_info.get('encrypted_volume_id', None) cls.aws = account.AWSAccount(cls.zone) cls.analysis_vm_name = 'new-vm-for-analysis' cls.analysis_vm, _ = forensics.StartAnalysisVm(cls.analysis_vm_name, cls.zone, 10) cls.volumes = [] # List of (AWSAccount, AWSVolume) tuples
def setUpClass(cls): try: project_info = utils.ReadProjectInfo( ['resource_group_name', 'instance_name', 'ssh_public_key']) except (OSError, RuntimeError, ValueError) as exception: raise unittest.SkipTest(str(exception)) cls.resource_group_name = project_info['resource_group_name'] cls.instance_to_analyse = project_info['instance_name'] cls.ssh_public_key = project_info['ssh_public_key'] cls.disk_to_copy = project_info.get('disk_name') cls.dst_region = project_info.get('dst_region') cls.az = account.AZAccount(cls.resource_group_name) cls.analysis_vm_name = 'new-vm-for-analysis' cls.analysis_vm, _ = forensics.StartAnalysisVm(cls.resource_group_name, cls.analysis_vm_name, 50, cls.ssh_public_key) cls.disks = [] # List of AZDisks for test cleanup
def setUpClass(cls): try: project_info = utils.ReadProjectInfo(['project_id', 'instance', 'zone']) except (OSError, RuntimeError, ValueError) as exception: raise unittest.SkipTest(str(exception)) cls.project_id = project_info['project_id'] cls.instance_to_analyse = project_info['instance'] # Optional: test a disk other than the boot disk cls.disk_to_forensic = project_info.get('disk', None) cls.zone = project_info['zone'] cls.gcp = gcp_project.GoogleCloudProject(cls.project_id, cls.zone) cls.analysis_vm_name = 'new-vm-for-analysis' # Create and start the analysis VM cls.analysis_vm, _ = forensics.StartAnalysisVm(project=cls.project_id, vm_name=cls.analysis_vm_name, zone=cls.zone, boot_disk_size=10, boot_disk_type='pd-ssd', cpu_cores=4)