codecov-commenter: # [Codecov](https://codecov.io/gh/google/cloud-forensics-utils/pull/219?src=pr&el=h1) Report
> Merging [#219](https://codecov.io/gh/google/cloud-forensics-utils/pull/219?src=pr&el=desc) into [master](https://codecov.io/gh/google/cloud-forensics-utils/commit/e4448c60002eee03c344ec2803276ff5d91936be&el=desc) will **increase** coverage by `2.69%`.
> The diff coverage is `71.24%`.

[![Impacted file tree graph](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/graphs/tree.svg?width=650&height=150&src=pr&token=zZkPno3ah0)](https://codecov.io/gh/google/cloud-forensics-utils/pull/219?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #219      +/-   ##
==========================================
+ Coverage   65.39%   68.08%   +2.69%     
==========================================
  Files          14       22       +8     
  Lines         968     1711     +743     
==========================================
+ Hits          633     1165     +532     
- Misses        335      546     +211     
```

| Flag | Coverage Δ | |
|---|---|---|
| #nosetests | `68.08% <71.24%> (+2.69%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/google/cloud-forensics-utils/pull/219?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [libcloudforensics/providers/aws/forensics.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2F3cy9mb3JlbnNpY3MucHk=) | `55.71% <45.45%> (-14.06%)` | :arrow_down: |
| [libcloudforensics/providers/gcp/forensics.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2djcC9mb3JlbnNpY3MucHk=) | `54.92% <51.11%> (-10.08%)` | :arrow_down: |
| [...ibcloudforensics/providers/gcp/internal/compute.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2djcC9pbnRlcm5hbC9jb21wdXRlLnB5) | `56.56% <51.93%> (-5.80%)` | :arrow_down: |
| [...cs/providers/gcp/internal/compute\_base\_resource.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2djcC9pbnRlcm5hbC9jb21wdXRlX2Jhc2VfcmVzb3VyY2UucHk=) | `37.33% <52.94%> (+0.82%)` | :arrow_up: |
| [...cloudforensics/providers/azure/internal/compute.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2F6dXJlL2ludGVybmFsL2NvbXB1dGUucHk=) | `54.34% <54.34%> (ø)` | |
| [libcloudforensics/providers/aws/internal/log.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2F3cy9pbnRlcm5hbC9sb2cucHk=) | `73.07% <55.55%> (-4.20%)` | :arrow_down: |
| [...ibcloudforensics/providers/gcp/internal/project.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2djcC9pbnRlcm5hbC9wcm9qZWN0LnB5) | `61.90% <66.66%> (-3.81%)` | :arrow_down: |
| [...bcloudforensics/providers/azure/internal/common.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2F6dXJlL2ludGVybmFsL2NvbW1vbi5weQ==) | `72.05% <72.05%> (ø)` | |
| [libcloudforensics/providers/gcp/internal/gke.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2djcC9pbnRlcm5hbC9na2UucHk=) | `73.68% <73.68%> (ø)` | |
| [libcloudforensics/providers/gcp/internal/common.py](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree#diff-bGliY2xvdWRmb3JlbnNpY3MvcHJvdmlkZXJzL2djcC9pbnRlcm5hbC9jb21tb24ucHk=) | `60.00% <75.86%> (+3.67%)` | :arrow_up: |
| ... and [21 more](https://codecov.io/gh/google/cloud-forensics-utils/pull/219/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/google/cloud-forensics-utils/pull/219?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/google/cloud-forensics-utils/pull/219?src=pr&el=footer). Last update [cc650e1...308de10](https://codecov.io/gh/google/cloud-forensics-utils/pull/219?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

diff --git a/libcloudforensics/providers/azure/forensics.py b/libcloudforensics/providers/azure/forensics.py
index de7d1f8..3c03381 100644
--- a/libcloudforensics/providers/azure/forensics.py
+++ b/libcloudforensics/providers/azure/forensics.py
@@ -30,7 +30,7 @@ def CreateDiskCopy(
     resource_group_name: str,
     instance_name: Optional[str] = None,
     disk_name: Optional[str] = None,
-    disk_type: str = 'Standard_LRS',
+    disk_type: Optional[str] = None,
     region: str = 'eastus',
     src_profile: Optional[str] = None,
     dst_profile: Optional[str] = None) -> 'compute.AZDisk':
@@ -47,7 +47,7 @@ def CreateDiskCopy(
         then instance_name needs to be set and the boot disk will be copied.
     disk_type (str): Optional. The sku name for the disk to create. Can be
         Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. The
-        default value is Standard_LRS.
+        default behavior is to use the same disk type as the source disk.
     region (str): Optional. The region in which to create the disk copy.
         Default is eastus.
     src_profile (str): Optional. The name of the source profile to use for the
@@ -88,6 +88,10 @@ def CreateDiskCopy(
       disk_to_copy = instance.GetBootDisk()
     logger.info('Disk copy of {0:s} started...'.format(
         disk_to_copy.name))
+
+    if not disk_type:
+      disk_type = disk_to_copy.GetDiskType()
+
     snapshot = disk_to_copy.Snapshot()
 
     subscription_ids = src_account.ListSubscriptionIDs()
diff --git a/libcloudforensics/providers/azure/internal/account.py b/libcloudforensics/providers/azure/internal/account.py
index 79b37be..3753f0d 100644
--- a/libcloudforensics/providers/azure/internal/account.py
+++ b/libcloudforensics/providers/azure/internal/account.py
@@ -245,7 +245,8 @@ class AZAccount:
         'creation_data': {
             'sourceResourceId': snapshot.resource_id,
             'create_option': models.DiskCreateOption.copy
-        }
+        },
+        'sku': {'name': disk_type}
     }
 
     try:
@@ -253,8 +254,7 @@ class AZAccount:
       request = self.compute_client.disks.create_or_update(
           self.default_resource_group_name,
           disk_name,
-          creation_data,
-          sku=disk_type)
+          creation_data)
       while not request.done():
         sleep(5)  # Wait 5 seconds before checking disk status again
       disk = request.result()
@@ -360,7 +360,8 @@ class AZAccount:
             'source_uri': copied_blob.url,
             'storage_account_id': storage_account_id,
             'create_option': models.DiskCreateOption.import_enum
-        }
+        },
+        'sku': {'name': disk_type}
     }
 
     try:
@@ -368,8 +369,7 @@ class AZAccount:
       request = self.compute_client.disks.create_or_update(
           self.default_resource_group_name,
           disk_name,
-          creation_data,
-          sku=disk_type)
+          creation_data)
       while not request.done():
         sleep(5)  # Wait 5 seconds before checking disk status again
       disk = request.result()
diff --git a/libcloudforensics/providers/azure/internal/compute.py b/libcloudforensics/providers/azure/internal/compute.py
index a343dbf..b9879d3 100644
--- a/libcloudforensics/providers/azure/internal/compute.py
+++ b/libcloudforensics/providers/azure/internal/compute.py
@@ -273,6 +273,17 @@ class AZDisk(AZComputeResource):
                       snapshot.location,
                       self)
 
+  def GetDiskType(self) -> str:
+    """Return the SKU disk type.
+
+    Returns:
+      str: The SKU disk type.
+    """
+    disk = self.az_account.compute_client.disks.get(
+        self.resource_group_name, self.name)
+    disk_type = disk.sku.name  # type: str
+    return disk_type
+
 
 class AZSnapshot(AZComputeResource):
   """Class that represents Azure snapshots.
diff --git a/libcloudforensics/providers/gcp/forensics.py b/libcloudforensics/providers/gcp/forensics.py
index 5b6fdbf..f308bb2 100644
--- a/libcloudforensics/providers/gcp/forensics.py
+++ b/libcloudforensics/providers/gcp/forensics.py
@@ -37,7 +37,7 @@ def CreateDiskCopy(
     zone: str,
     instance_name: Optional[str] = None,
     disk_name: Optional[str] = None,
-    disk_type: str = 'pd-standard') -> 'compute.GoogleComputeDisk':
+    disk_type: Optional[str] = None) -> 'compute.GoogleComputeDisk':
   """Creates a copy of a Google Compute Disk.
 
   Args:
@@ -48,8 +48,8 @@ def CreateDiskCopy(
     disk_name (str): Optional. Name of the disk to copy. If None,
         instance_name must be specified and the boot disk will be copied.
     disk_type (str): Optional. URL of the disk type resource describing
-        which disk type to use to create the disk. Default is pd-standard. Use
-        pd-ssd to have a SSD disk.
+        which disk type to use to create the disk. The default behavior is to
+        use the same disk type as the source disk.
 
   Returns:
     GoogleComputeDisk: A Google Compute Disk object.
@@ -73,6 +73,9 @@ def CreateDiskCopy(
       instance = src_project.compute.GetInstance(instance_name)
       disk_to_copy = instance.GetBootDisk()
 
+    if not disk_type:
+      disk_type = disk_to_copy.GetDiskType()
+
     logger.info('Disk copy of {0:s} started...'.format(
         disk_to_copy.name))
     snapshot = disk_to_copy.Snapshot()
diff --git a/libcloudforensics/providers/gcp/internal/compute.py b/libcloudforensics/providers/gcp/internal/compute.py
index 225a1c6..6c1bc66 100644
--- a/libcloudforensics/providers/gcp/internal/compute.py
+++ b/libcloudforensics/providers/gcp/internal/compute.py
@@ -917,6 +917,17 @@ class GoogleComputeDisk(compute_base_resource.GoogleComputeBaseResource):
     self.BlockOperation(response, zone=self.zone)
     return GoogleComputeSnapshot(disk=self, name=snapshot_name)
 
+  def GetDiskType(self) -> str:
+    """Return the disk type.
+
+    Returns:
+      str: The disk type.
+    """
+    # 'type': https://www.googleapis.com/compute/v1/projects/<>/zones/us
+    # -central1-a/diskTypes/pd-standard
+    disk_type = self.GetOperation()['type'].split('/')[-1]  # type: str
+    return disk_type
+
 
 class GoogleComputeSnapshot(compute_base_resource.GoogleComputeBaseResource):
   """Class representing a Compute Engine Snapshot.
diff --git a/tools/cli.py b/tools/cli.py
index dca8c3e..32d717f 100644
--- a/tools/cli.py
+++ b/tools/cli.py
@@ -203,8 +203,9 @@ def Main() -> None:
                                 'instance will be copied.', None),
                 ('--disk_type', 'The SKU name for the disk to create. '
                                 'Can be Standard_LRS, Premium_LRS, '
-                                'StandardSSD_LRS, or UltraSSD_LRS. Default is '
-                                'Standard_LRS', 'Standard_LRS'),
+                                'StandardSSD_LRS, or UltraSSD_LRS. The default '
+                                'behavior is to use the same disk type as '
+                                'the source disk.', None),
                 ('--region', 'The region in which to create the disk copy. If '
                              'not provided, the disk copy will be created in '
                              'the "eastus" region.', 'eastus'),
@@ -283,7 +284,10 @@ def Main() -> None:
                 ('--disk_name', 'Name of the disk to copy. If none specified, '
                                 'then --instance_name must be specified and '
                                 'the boot disk of the instance will be copied.',
-                 None)
+                 None),
+                ('--disk_type', 'Type of disk. Can be pd-standard or pd-ssd. '
+                                'The default behavior is to use the same disk '
+                                'type as the source disk.', None)
             ])
   AddParser('gcp', gcp_subparsers, 'startvm', 'Start a forensic analysis VM.',
             args=[
@@ -291,7 +295,8 @@ def Main() -> None:
                  ''),
                 ('zone', 'Zone to create the instance in.', ''),
                 ('--disk_size', 'Size of disk in GB.', '50'),
-                ('--disk_type', 'Type of disk.', 'pd-ssd'),
+                ('--disk_type', 'Type of disk. Can be pd-standard or pd-ssd. '
+                                'The default value is pd-ssd.', 'pd-ssd'),
                 ('--cpu_cores', 'Instance CPU core count.', '4'),
                 ('--attach_disks', 'Comma separated list of disk names '
                                    'to attach.', None)
diff --git a/tools/gcp_cli.py b/tools/gcp_cli.py
index 97359f0..614c8ea 100644
--- a/tools/gcp_cli.py
+++ b/tools/gcp_cli.py
@@ -78,7 +78,8 @@ def CreateDiskCopy(args: 'argparse.Namespace') -> None:
                                   args.dst_project,
                                   args.zone,
                                   instance_name=args.instance_name,
-                                  disk_name=args.disk_name)
+                                  disk_name=args.disk_name,
+                                  disk_type=args.disk_type)
 
   logger.info('Disk copy completed.')
   logger.info('Name: {0:s}'.format(disk.name))

disk_type in CreateDiskCopy should default to the source's disk type
In CreateDisk(Volume)Copy methods, it'd be nice for the disk copy to have the same disk type as the source disk, instead of a default disk type for all copies.
diff --git a/tests/providers/azure/azure_test.py b/tests/providers/azure/azure_test.py
index ce31b44..eae92dc 100644
--- a/tests/providers/azure/azure_test.py
+++ b/tests/providers/azure/azure_test.py
@@ -18,6 +18,8 @@ import typing
 import unittest
 import mock
 
+from azure.mgmt.compute.v2020_05_01 import models  # pylint: disable=import-error
+
 from libcloudforensics.providers.azure.internal import account, compute, common, monitoring  # pylint:disable=line-too-long
 from libcloudforensics.providers.azure import forensics
 
@@ -253,8 +255,7 @@ class TestAccount(unittest.TestCase):
     mock_create_disk.assert_called_with(
         FAKE_SNAPSHOT.resource_group_name,
         'fake_snapshot_name_f4c186ac_copy',
-        mock.ANY,
-        sku='Standard_LRS')
+        mock.ANY)
 
     # CreateDiskFromSnapshot(
     #     snapshot=FAKE_SNAPSHOT,
@@ -265,8 +266,7 @@ class TestAccount(unittest.TestCase):
     mock_create_disk.assert_called_with(
         FAKE_SNAPSHOT.resource_group_name,
         'new-forensics-disk',
-        mock.ANY,
-        sku='Standard_LRS')
+        mock.ANY)
 
     # CreateDiskFromSnapshot(
     #     snapshot=FAKE_SNAPSHOT, disk_name=None, disk_name_prefix='prefix')
@@ -275,18 +275,26 @@ class TestAccount(unittest.TestCase):
     mock_create_disk.assert_called_with(
         FAKE_SNAPSHOT.resource_group_name,
         'prefix_fake_snapshot_name_f4c186ac_copy',
-        mock.ANY,
-        sku='Standard_LRS')
+        mock.ANY)
 
     # CreateDiskFromSnapshot(
     #     snapshot=FAKE_SNAPSHOT, disk_type='StandardSSD_LRS')
+    expected_args = {
+        'location': 'fake-region',
+        'creation_data': {
+            'sourceResourceId': '/a/b/c/fake-resource-group/fake_snapshot_name',
+            'create_option': models.DiskCreateOption.copy
+        },
+        'sku': {
+            'name': 'StandardSSD_LRS'
+        }
+    }
     FAKE_ACCOUNT.CreateDiskFromSnapshot(
         FAKE_SNAPSHOT, disk_type='StandardSSD_LRS')
     mock_create_disk.assert_called_with(
         FAKE_SNAPSHOT.resource_group_name,
         'fake_snapshot_name_f4c186ac_copy',
-        mock.ANY,
-        sku='StandardSSD_LRS')
+        expected_args)
 
   @mock.patch('azure.storage.blob._container_client.ContainerClient.create_container')
   @mock.patch('azure.storage.blob._generated._azure_blob_storage.AzureBlobStorage.__init__')
@@ -330,8 +338,7 @@ class TestAccount(unittest.TestCase):
     mock_create_disk.assert_called_with(
         FAKE_SNAPSHOT.resource_group_name,
         'fake_snapshot_name_f4c186ac_copy',
-        mock.ANY,
-        sku='Standard_LRS')
+        mock.ANY)
 
   @mock.patch('sshpubkeys.SSHKey.parse')
   @mock.patch('libcloudforensics.scripts.utils.ReadStartupScript')
@@ -613,8 +620,9 @@ class TestMonitoring(unittest.TestCase):
 
 class TestForensics(unittest.TestCase):
   """Test Azure forensics file."""
-  # pylint: disable=line-too-long
+  # pylint: disable=line-too-long, too-many-arguments
 
+  @mock.patch('libcloudforensics.providers.azure.internal.compute.AZDisk.GetDiskType')
   @mock.patch('libcloudforensics.providers.azure.internal.account.AZAccount._GetOrCreateResourceGroup')
   @mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')
   @mock.patch('libcloudforensics.providers.azure.internal.account.AZAccount.ListSubscriptionIDs')
@@ -634,7 +642,8 @@ class TestForensics(unittest.TestCase):
                           mock_snapshot_delete,
                           mock_list_subscription_ids,
                           mock_credentials,
-                          mock_resource_group):
+                          mock_resource_group,
+                          mock_disk_type):
     """Test that a disk copy is correctly created.
 
     CreateDiskCopy(zone, instance_name='fake-vm-name', region='fake-region').
@@ -649,6 +658,7 @@ class TestForensics(unittest.TestCase):
     mock_list_subscription_ids.return_value = ['fake-subscription-id']
     mock_credentials.return_value = ('fake-subscription-id', mock.Mock())
     mock_resource_group.return_value = 'fake-resource-group'
+    mock_disk_type.return_value = 'fake-disk-type'
 
     disk_copy = forensics.CreateDiskCopy(
         FAKE_ACCOUNT.default_resource_group_name,
@@ -661,6 +671,7 @@ class TestForensics(unittest.TestCase):
     self.assertIsInstance(disk_copy, compute.AZDisk)
     self.assertEqual('fake_snapshot_name_f4c186ac_copy', disk_copy.name)
 
+  @mock.patch('libcloudforensics.providers.azure.internal.compute.AZDisk.GetDiskType')
   @mock.patch('libcloudforensics.providers.azure.internal.account.AZAccount._GetOrCreateResourceGroup')
   @mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')
   @mock.patch('libcloudforensics.providers.azure.internal.account.AZAccount.ListSubscriptionIDs')
@@ -680,7 +691,8 @@ class TestForensics(unittest.TestCase):
                           mock_snapshot_delete,
                           mock_list_subscription_ids,
                           mock_credentials,
-                          mock_resource_group):
+                          mock_resource_group,
+                          mock_disk_type):
     """Test that a disk copy is correctly created.
 
     CreateDiskCopy(zone, disk_name='fake-disk-name', region='fake-region').
@@ -694,6 +706,7 @@ class TestForensics(unittest.TestCase):
     mock_list_subscription_ids.return_value = ['fake-subscription-id']
     mock_credentials.return_value = ('fake-subscription-id', mock.Mock())
     mock_resource_group.return_value = 'fake-resource-group'
+    mock_disk_type.return_value = 'fake-disk-type'
 
     disk_copy = forensics.CreateDiskCopy(
         FAKE_ACCOUNT.default_resource_group_name,
@@ -706,6 +719,7 @@ class TestForensics(unittest.TestCase):
     self.assertIsInstance(disk_copy, compute.AZDisk)
     self.assertEqual('fake_snapshot_name_f4c186ac_copy', disk_copy.name)
 
+  @mock.patch('libcloudforensics.providers.azure.internal.compute.AZDisk.GetDiskType')
   @mock.patch('libcloudforensics.providers.azure.internal.account.AZAccount._GetOrCreateResourceGroup')
   @mock.patch('libcloudforensics.providers.azure.internal.common.GetCredentials')
   @mock.patch('libcloudforensics.providers.azure.internal.account.AZAccount.ListSubscriptionIDs')
@@ -717,7 +731,8 @@ class TestForensics(unittest.TestCase):
                           mock_list_disk,
                           mock_list_subscription_ids,
                           mock_credentials,
-                          mock_resource_group):
+                          mock_resource_group,
+                          mock_disk_type):
     """Test that a disk copy is correctly created.
 
     The first call should raise a RuntimeError in GetInstance as we are
@@ -728,6 +743,7 @@ class TestForensics(unittest.TestCase):
     mock_list_subscription_ids.return_value = ['fake-subscription-id']
     mock_credentials.return_value = ('fake-subscription-id', mock.Mock())
     mock_resource_group.return_value = 'fake-resource-group'
+    mock_disk_type.return_value = 'fake-disk-type'
 
     with self.assertRaises(RuntimeError) as error:
       forensics.CreateDiskCopy(
diff --git a/tests/providers/gcp/gcp_test.py b/tests/providers/gcp/gcp_test.py
index 8f10deb..460d0fd 100644
--- a/tests/providers/gcp/gcp_test.py
+++ b/tests/providers/gcp/gcp_test.py
@@ -853,6 +853,7 @@ class GCPTest(unittest.TestCase):
   # pylint: disable=line-too-long
 
   @typing.no_type_check
+  @mock.patch('libcloudforensics.providers.gcp.internal.compute.GoogleComputeDisk.GetDiskType')
   @mock.patch('libcloudforensics.providers.gcp.internal.common.GoogleCloudComputeClient.BlockOperation')
   @mock.patch('libcloudforensics.providers.gcp.internal.compute.GoogleComputeInstance.GetDisk')
   @mock.patch('libcloudforensics.providers.gcp.internal.compute.GoogleComputeInstance.GetBootDisk')
@@ -863,7 +864,8 @@ class GCPTest(unittest.TestCase):
                           mock_get_instance,
                           mock_get_boot_disk,
                           mock_get_disk,
-                          mock_block_operation):
+                          mock_block_operation,
+                          mock_disk_type):
     """Test that a disk from a remote project is duplicated and attached to
     an analysis project. """
     instances = mock_gce_api.return_value.instances.return_value.aggregatedList
@@ -871,6 +873,7 @@ class GCPTest(unittest.TestCase):
     mock_get_instance.return_value = FAKE_INSTANCE
     mock_get_boot_disk.return_value = FAKE_BOOT_DISK
     mock_block_operation.return_value = None
+    mock_disk_type.return_value = 'fake-disk-type'
 
     # create_disk_copy(
     #     src_proj,
@@ -890,6 +893,7 @@ class GCPTest(unittest.TestCase):
     self.assertTrue(new_disk.name.endswith('-copy'))
 
   @typing.no_type_check
+  @mock.patch('libcloudforensics.providers.gcp.internal.compute.GoogleComputeDisk.GetDiskType')
   @mock.patch('libcloudforensics.providers.gcp.internal.common.GoogleCloudComputeClient.BlockOperation')
   @mock.patch('libcloudforensics.providers.gcp.internal.compute.GoogleComputeInstance.GetBootDisk')
   @mock.patch('libcloudforensics.providers.gcp.internal.compute.GoogleCloudCompute.GetDisk')
@@ -898,13 +902,15 @@ class GCPTest(unittest.TestCase):
                           mock_gce_api,
                           mock_get_disk,
                           mock_get_boot_disk,
-                          mock_block_operation):
+                          mock_block_operation,
+                          mock_disk_type):
     """Test that a disk from a remote project is duplicated and attached to
     an analysis project. """
     instances = mock_gce_api.return_value.instances.return_value.aggregatedList
     instances.return_value.execute.return_value = MOCK_INSTANCES_AGGREGATED
     mock_get_disk.return_value = FAKE_DISK
     mock_block_operation.return_value = None
+    mock_disk_type.return_value = 'fake-disk-type'
 
     # create_disk_copy(
     #     src_proj,

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-mock mock
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
adal==1.2.7
azure-common==1.1.28
azure-core==1.32.0
azure-identity==1.21.0
azure-mgmt-compute==13.0.0
azure-mgmt-core==1.5.0
azure-mgmt-monitor==0.10.0
azure-mgmt-network==11.0.0
azure-mgmt-resource==23.3.0
azure-mgmt-storage==11.1.0
azure-storage-blob==12.25.1
boto3==1.37.23
botocore==1.37.23
cachetools==5.5.2
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
cryptography==44.0.2
ecdsa==0.19.1
exceptiongroup==1.2.2
google-api-core==2.24.2
google-api-python-client==2.166.0
google-auth==2.38.0
google-auth-httplib2==0.2.0
googleapis-common-protos==1.69.2
httplib2==0.22.0
idna==3.10
iniconfig==2.1.0
isodate==0.7.2
jmespath==1.0.1
-e git+https://github.com/google/cloud-forensics-utils.git@5c7e31ebd5429ad704859ef67fbc7c3b1ff67816#egg=libcloudforensics
mock==5.2.0
msal==1.32.0
msal-extensions==1.3.1
msrest==0.7.1
msrestazure==0.6.4.post1
oauthlib==3.2.2
packaging==24.2
pluggy==1.5.0
proto-plus==1.26.1
protobuf==6.30.2
pyasn1==0.6.1
pyasn1_modules==0.4.2
pycparser==2.22
pycryptodome==3.22.0
PyJWT==2.10.1
pyparsing==3.2.3
pytest==8.3.5
pytest-mock==3.14.0
python-dateutil==2.9.0.post0
requests==2.32.3
requests-oauthlib==2.0.0
rsa==4.9
s3transfer==0.11.4
six==1.17.0
sshpubkeys==3.3.1
tomli==2.2.1
typing_extensions==4.13.0
uritemplate==4.1.1
urllib3==1.26.20

name: cloud-forensics-utils
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - adal==1.2.7
      - azure-common==1.1.28
      - azure-core==1.32.0
      - azure-identity==1.21.0
      - azure-mgmt-compute==13.0.0
      - azure-mgmt-core==1.5.0
      - azure-mgmt-monitor==0.10.0
      - azure-mgmt-network==11.0.0
      - azure-mgmt-resource==23.3.0
      - azure-mgmt-storage==11.1.0
      - azure-storage-blob==12.25.1
      - boto3==1.37.23
      - botocore==1.37.23
      - cachetools==5.5.2
      - certifi==2025.1.31
      - cffi==1.17.1
      - charset-normalizer==3.4.1
      - cryptography==44.0.2
      - ecdsa==0.19.1
      - exceptiongroup==1.2.2
      - google-api-core==2.24.2
      - google-api-python-client==2.166.0
      - google-auth==2.38.0
      - google-auth-httplib2==0.2.0
      - googleapis-common-protos==1.69.2
      - httplib2==0.22.0
      - idna==3.10
      - iniconfig==2.1.0
      - isodate==0.7.2
      - jmespath==1.0.1
      - mock==5.2.0
      - msal==1.32.0
      - msal-extensions==1.3.1
      - msrest==0.7.1
      - msrestazure==0.6.4.post1
      - oauthlib==3.2.2
      - packaging==24.2
      - pluggy==1.5.0
      - proto-plus==1.26.1
      - protobuf==6.30.2
      - pyasn1==0.6.1
      - pyasn1-modules==0.4.2
      - pycparser==2.22
      - pycryptodome==3.22.0
      - pyjwt==2.10.1
      - pyparsing==3.2.3
      - pytest==8.3.5
      - pytest-mock==3.14.0
      - python-dateutil==2.9.0.post0
      - requests==2.32.3
      - requests-oauthlib==2.0.0
      - rsa==4.9
      - s3transfer==0.11.4
      - six==1.17.0
      - sshpubkeys==3.3.1
      - tomli==2.2.1
      - typing-extensions==4.13.0
      - uritemplate==4.1.1
      - urllib3==1.26.20
prefix: /opt/conda/envs/cloud-forensics-utils

tests/providers/azure/azure_test.py::TestAccount::testCreateDiskFromSnapshot tests/providers/azure/azure_test.py::TestAccount::testCreateDiskFromSnapshotUri tests/providers/azure/azure_test.py::TestForensics::testCreateDiskCopy1 tests/providers/azure/azure_test.py::TestForensics::testCreateDiskCopy2 tests/providers/azure/azure_test.py::TestForensics::testCreateDiskCopy3 tests/providers/gcp/gcp_test.py::GCPTest::testCreateDiskCopy1 tests/providers/gcp/gcp_test.py::GCPTest::testCreateDiskCopy2
tests/providers/azure/azure_test.py::TestAccount::testListSubscriptionIDs
tests/providers/azure/azure_test.py::TestAccount::testCreateStorageAccount tests/providers/azure/azure_test.py::TestAccount::testGetDisk tests/providers/azure/azure_test.py::TestAccount::testGetInstance tests/providers/azure/azure_test.py::TestAccount::testGetInstanceType tests/providers/azure/azure_test.py::TestAccount::testGetOrCreateAnalysisVm tests/providers/azure/azure_test.py::TestAccount::testListDisks tests/providers/azure/azure_test.py::TestAccount::testListInstances tests/providers/azure/azure_test.py::TestAccount::testListVMSizes tests/providers/azure/azure_test.py::TestCommon::testGenerateDiskName tests/providers/azure/azure_test.py::TestCommon::testGetCredentials tests/providers/azure/azure_test.py::TestAZVirtualMachine::testGetBootDisk tests/providers/azure/azure_test.py::TestAZVirtualMachine::testGetDisk tests/providers/azure/azure_test.py::TestAZVirtualMachine::testListDisks tests/providers/azure/azure_test.py::TestMonitoring::testGetMetricsForResource tests/providers/azure/azure_test.py::TestMonitoring::testListAvailableMetricsForResource tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testCreateDiskFromSnapshot tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testCreateImageFromGcsTarGz tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testFormatLogMessage tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testGetDisk tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testGetInstance tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testGetOrCreateAnalysisVm tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testListDiskByLabels tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testListDisks tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testListInstanceByLabels tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testListInstances tests/providers/gcp/gcp_test.py::GoogleCloudProjectTest::testReadStartupScript tests/providers/gcp/gcp_test.py::GoogleComputeBaseResourceTest::testGetValue tests/providers/gcp/gcp_test.py::GoogleComputeInstanceTest::testGetBootDisk tests/providers/gcp/gcp_test.py::GoogleComputeInstanceTest::testGetDisk tests/providers/gcp/gcp_test.py::GoogleComputeInstanceTest::testListDisks tests/providers/gcp/gcp_test.py::GoogleComputeDiskTest::testSnapshot tests/providers/gcp/gcp_test.py::GoogleCloudLogTest::testExecuteQuery tests/providers/gcp/gcp_test.py::GoogleCloudLogTest::testListLogs tests/providers/gcp/gcp_test.py::GoogleCloudStorageTest::testGetBucketACLs tests/providers/gcp/gcp_test.py::GoogleCloudStorageTest::testGetObjectMetadata tests/providers/gcp/gcp_test.py::GoogleCloudStorageTest::testListBucketObjects tests/providers/gcp/gcp_test.py::GoogleCloudStorageTest::testSplitGcsPath tests/providers/gcp/gcp_test.py::GoogleCloudBuildeTest::testBlockOperation tests/providers/gcp/gcp_test.py::GoogleCloudBuildeTest::testCreateBuild tests/providers/gcp/gcp_test.py::GoogleKubernetesEngineTest::testGetCluster tests/providers/gcp/gcp_test.py::GCPTest::testCreateDiskCopy3 tests/providers/gcp/gcp_test.py::GCPTest::testGenerateDiskName tests/providers/gcp/gcp_test.py::GoogleCloudMonitoringTest::testActiveServices
libcloudforensics/providers/azure/forensics.py libcloudforensics/providers/azure/internal/compute.py libcloudforensics/providers/gcp/internal/compute.py tools/cli.py libcloudforensics/providers/gcp/forensics.py tools/gcp_cli.py libcloudforensics/providers/azure/internal/account.py
libcloudforensics/providers/azure/forensics.py libcloudforensics/providers/azure/internal/compute.py libcloudforensics/providers/gcp/internal/compute.py tools/cli.py libcloudforensics/providers/gcp/forensics.py tools/gcp_cli.py libcloudforensics/providers/azure/internal/account.py