Lines Matching refs:compute_client

81         self.compute_client = gcompute_client.ComputeClient(
83 self.compute_client._service = mock.MagicMock()
103 self.compute_client._service.globalOperations = mock.MagicMock(
106 self.compute_client._service.zoneOperations = mock.MagicMock(
109 self.compute_client._service.regionOperations = mock.MagicMock(
119 status = self.compute_client._GetOperationStatus(
130 status = self.compute_client._GetOperationStatus(
143 self.compute_client._GetOperationStatus(
157 self.compute_client._GetOperationStatus,
167 self.compute_client.WaitOnOperation(
172 func=self.compute_client._GetOperationStatus,
175 timeout_secs=self.compute_client.OPERATION_TIMEOUT_SECS,
176 sleep_interval_secs=self.compute_client.OPERATION_POLL_INTERVAL_SECS,
185 self.compute_client._service.images = mock.MagicMock(
189 result = self.compute_client.GetImage(self.IMAGE)
197 self.compute_client._service.images = mock.MagicMock(
201 result = self.compute_client.GetImage(
220 self.compute_client._service.images = mock.MagicMock(
223 self.compute_client.CreateImage(
245 self.compute_client._service.images = mock.MagicMock(
248 self.compute_client.CreateImage(
271 self.compute_client._service.images = mock.MagicMock(
274 self.compute_client.CreateImage(
287 with mock.patch.object(self.compute_client._service, "images",
297 self.compute_client.SetImageLabels(
301 self.compute_client._service.images().setLabels.assert_called_with(
314 self.assertRaises(errors.DriverError, self.compute_client.CreateImage,
323 self.assertRaises(errors.DriverError, self.compute_client.CreateImage,
335 self.compute_client._service.images = mock.MagicMock(
349 self.compute_client.CreateImage,
364 self.compute_client._service.images = mock.MagicMock(
368 self.assertTrue(self.compute_client.CheckImageExists(self.IMAGE))
374 self.compute_client._service.images = mock.MagicMock(
379 self.assertFalse(self.compute_client.CheckImageExists(self.IMAGE))
385 self.compute_client._service.images = mock.MagicMock(
388 self.compute_client.DeleteImage(self.IMAGE)
408 self.Patch(self.compute_client._service,
419 self.compute_client._service.images = mock.MagicMock(
423 deleted, failed, error_msgs = self.compute_client.DeleteImages(
448 self.compute_client._service.images = mock.MagicMock(
451 images = self.compute_client.ListImages()
465 self.compute_client._service.images = mock.MagicMock(
468 images = self.compute_client.ListImages(
479 self.compute_client._service.instances = mock.MagicMock(
483 result = self.compute_client.GetInstance(self.INSTANCE, self.ZONE)
498 self.compute_client._service.instances = mock.MagicMock(
501 instances = self.compute_client.ListInstances()
520 self.assertEqual(self.compute_client.GetZoneByInstance(instance_1),
530 self.compute_client.GetZoneByInstance(instance_1)
541 self.assertEqual(self.compute_client.GetZonesByInstances(instances),
551 self.assertEqual(self.compute_client.GetZonesByInstances(instances),
569 self.compute_client._service.instances = mock.MagicMock(
573 self.compute_client,
580 expected_scope.extend(self.compute_client.DEFAULT_INSTANCE_SCOPE)
609 self.compute_client.CreateInstance(
646 self.compute_client._service.instances = mock.MagicMock(
650 self.compute_client,
657 expected_scope.extend(self.compute_client.DEFAULT_INSTANCE_SCOPE)
687 self.compute_client.CreateInstance(
723 self.compute_client._service.instances = mock.MagicMock(
743 "scopes": self.compute_client.DEFAULT_INSTANCE_SCOPE
762 self.compute_client.CreateInstance(
782 self.compute_client._service.instances = mock.MagicMock(
785 self.compute_client.DeleteInstance(
801 self.compute_client._service.instances = mock.MagicMock(
804 deleted, failed, error_msgs = self.compute_client.DeleteInstances(
828 self.compute_client._service.disks = mock.MagicMock(
831 self.compute_client.CreateDisk(
855 self.compute_client._service.disks = mock.MagicMock(
858 self.compute_client.CreateDisk(
882 self.compute_client._service.disks = mock.MagicMock(
885 self.compute_client.CreateDisk(
913 self.compute_client._service.disks = mock.MagicMock(
916 self.compute_client.CreateDisk(
942 self.compute_client._service.instances = mock.MagicMock(
945 self.compute_client.AttachDisk(
962 self.compute_client._service.instances = mock.MagicMock(
965 self.compute_client.DetachDisk("fake_instance_1", self.ZONE, "fake_disk")
979 self.compute_client._service.instances = mock.MagicMock(
982 self.compute_client.AttachAccelerator("fake_instance_1", self.ZONE, 1,
1002 done, failed, error_msgs = self.compute_client._BatchExecuteOnInstances(
1016 self.compute_client._service.instances = mock.MagicMock(
1019 self.compute_client.ResetInstance(
1047 self.compute_client.CompareMachineSize, "name1",
1050 result = self.compute_client.CompareMachineSize("name1", "name2",
1096 self.compute_client._service.machineTypes = mock.MagicMock(
1101 result = self.compute_client.GetMachineType(self.MACHINE_TYPE,
1117 self.compute_client._service.instances = mock.MagicMock(
1124 result = self.compute_client.GetSerialPortOutput(
1132 self.compute_client.GetSerialPortOutput,
1168 ip_name_map = self.compute_client.GetInstanceNamesByIPs(
1292 self.compute_client.SetInstanceMetadata = mock.MagicMock(
1295 self.compute_client.UpdateRsaInMetadata(
1300 self.compute_client.SetInstanceMetadata.assert_called_with(
1327 self.compute_client.UpdateRsaInMetadata(
1332 self.compute_client.SetInstanceMetadata.assert_called_with(
1381 self.compute_client._service.instances = mock.MagicMock(
1390 self.compute_client.AddSshRsaInstanceMetadata(
1406 self.compute_client.AddSshRsaInstanceMetadata(
1419 self.compute_client._service.disks = mock.MagicMock(
1423 deleted, failed, error_msgs = self.compute_client.DeleteDisks(
1460 self.compute_client.CheckAccess()
1467 self.assertFalse(self.compute_client.CheckAccess())
1492 self.assertTrue(self.compute_client.EnoughMetricsInZone("asia-east1-b"))
1493 self.assertFalse(self.compute_client.EnoughMetricsInZone("fake_zone"))
1516 self.assertFalse(self.compute_client.EnoughMetricsInZone("asia-east1-b"))
1522 self.compute_client._service.disks = mock.MagicMock(
1526 result = self.compute_client.GetDisk(self.DISK, self.ZONE)
1531 self.assertTrue(self.compute_client.CheckDiskExists(self.DISK, self.ZONE))