示例#1
0
 def certificate_operations(self,
                            certificate_id: str,
                            page_size=1000) -> [Operation]:
     """Returns list of certificate operations."""
     url = f'{self.compute_url}/certificate-manager/v1/certificates{certificate_id}/operations?pageSize={page_size}'
     response = self._request.get(url).get('operations')
     return Operation.de_list(response, self)
示例#2
0
 def snapshot_operations(self,
                         snapshot_id: str,
                         page_size=1000) -> [Operation]:
     """Returns list of the snapshot operations."""
     url = f'{self.compute_url}/compute/v1/snapshots/{snapshot_id}/operations?pageSize={page_size}'
     response = self._request.get(url).get('operations')
     return Operation.de_list(response, self)
示例#3
0
 def instance_operations(self,
                         instance_id: str,
                         page_size=1000) -> [Operation]:
     """Returns list of instance operations."""
     url = f'{self.compute_url}/compute/v1/instances/{instance_id}/operations?pageSize={page_size}'
     response = self._request.get(url).get('operations')
     return Operation.de_list(response, self)
示例#4
0
 def disk_operations(self, disk_id: str, page_size=1000) -> [Operation]:
     """Returns list of the disk operations."""
     url = f'{self.compute_url}/compute/v1/disks/{disk_id}/operations?pageSize={page_size}'
     response = self._request.get(url).get('operations')
     return Operation.de_list(response, self)
示例#5
0
 def folder_operations(self, folder_id: str, page_size=1000) -> [Operation]:
     """Returns list of operations in the folder."""
     url = f'{self.resource_manager_url}/resource-manager/v1/folders/{folder_id}/operations?pageSize={page_size}'
     response = self._request.get(url).get('operations')
     return Operation.de_list(response, self)