Class MockBareMetalSolutionConnection (2.22.0)

A class to mock BareMetalSolutionConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type BareMetalSolutionClient. To do so, construct an object of type BareMetalSolutionClient with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

See Also

This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.

Functions

virtual options()

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
TypeDescription
Options

virtual ListInstances(google::cloud::baremetalsolution::v2::ListInstancesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListInstancesRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::Instance >

virtual GetInstance(google::cloud::baremetalsolution::v2::GetInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::GetInstanceRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Instance >

virtual UpdateInstance(google::cloud::baremetalsolution::v2::UpdateInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::UpdateInstanceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::Instance > >

virtual RenameInstance(google::cloud::baremetalsolution::v2::RenameInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::RenameInstanceRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Instance >

virtual ResetInstance(google::cloud::baremetalsolution::v2::ResetInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ResetInstanceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::ResetInstanceResponse > >

virtual StartInstance(google::cloud::baremetalsolution::v2::StartInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::StartInstanceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::StartInstanceResponse > >

virtual StopInstance(google::cloud::baremetalsolution::v2::StopInstanceRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::StopInstanceRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::StopInstanceResponse > >

virtual EnableInteractiveSerialConsole(google::cloud::baremetalsolution::v2::EnableInteractiveSerialConsoleRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::EnableInteractiveSerialConsoleRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::EnableInteractiveSerialConsoleResponse > >

virtual DisableInteractiveSerialConsole(google::cloud::baremetalsolution::v2::DisableInteractiveSerialConsoleRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::DisableInteractiveSerialConsoleRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::DisableInteractiveSerialConsoleResponse > >

virtual DetachLun(google::cloud::baremetalsolution::v2::DetachLunRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::DetachLunRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::Instance > >

virtual ListSSHKeys(google::cloud::baremetalsolution::v2::ListSSHKeysRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListSSHKeysRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::SSHKey >

virtual CreateSSHKey(google::cloud::baremetalsolution::v2::CreateSSHKeyRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::CreateSSHKeyRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::SSHKey >

virtual DeleteSSHKey(google::cloud::baremetalsolution::v2::DeleteSSHKeyRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::DeleteSSHKeyRequest const &
Returns
TypeDescription
Status

virtual ListVolumes(google::cloud::baremetalsolution::v2::ListVolumesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListVolumesRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::Volume >

virtual GetVolume(google::cloud::baremetalsolution::v2::GetVolumeRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::GetVolumeRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Volume >

virtual UpdateVolume(google::cloud::baremetalsolution::v2::UpdateVolumeRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::UpdateVolumeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::Volume > >

virtual RenameVolume(google::cloud::baremetalsolution::v2::RenameVolumeRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::RenameVolumeRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Volume >

virtual EvictVolume(google::cloud::baremetalsolution::v2::EvictVolumeRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::EvictVolumeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::OperationMetadata > >

virtual ResizeVolume(google::cloud::baremetalsolution::v2::ResizeVolumeRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ResizeVolumeRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::Volume > >

virtual ListNetworks(google::cloud::baremetalsolution::v2::ListNetworksRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListNetworksRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::Network >

virtual ListNetworkUsage(google::cloud::baremetalsolution::v2::ListNetworkUsageRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListNetworkUsageRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::ListNetworkUsageResponse >

virtual GetNetwork(google::cloud::baremetalsolution::v2::GetNetworkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::GetNetworkRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Network >

virtual UpdateNetwork(google::cloud::baremetalsolution::v2::UpdateNetworkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::UpdateNetworkRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::Network > >

virtual CreateVolumeSnapshot(google::cloud::baremetalsolution::v2::CreateVolumeSnapshotRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::CreateVolumeSnapshotRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::VolumeSnapshot >

virtual RestoreVolumeSnapshot(google::cloud::baremetalsolution::v2::RestoreVolumeSnapshotRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::RestoreVolumeSnapshotRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::VolumeSnapshot > >

virtual DeleteVolumeSnapshot(google::cloud::baremetalsolution::v2::DeleteVolumeSnapshotRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::DeleteVolumeSnapshotRequest const &
Returns
TypeDescription
Status

virtual GetVolumeSnapshot(google::cloud::baremetalsolution::v2::GetVolumeSnapshotRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::GetVolumeSnapshotRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::VolumeSnapshot >

virtual ListVolumeSnapshots(google::cloud::baremetalsolution::v2::ListVolumeSnapshotsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListVolumeSnapshotsRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::VolumeSnapshot >

virtual GetLun(google::cloud::baremetalsolution::v2::GetLunRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::GetLunRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Lun >

virtual ListLuns(google::cloud::baremetalsolution::v2::ListLunsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListLunsRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::Lun >

virtual EvictLun(google::cloud::baremetalsolution::v2::EvictLunRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::EvictLunRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::OperationMetadata > >

virtual GetNfsShare(google::cloud::baremetalsolution::v2::GetNfsShareRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::GetNfsShareRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::NfsShare >

virtual ListNfsShares(google::cloud::baremetalsolution::v2::ListNfsSharesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListNfsSharesRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::NfsShare >

virtual UpdateNfsShare(google::cloud::baremetalsolution::v2::UpdateNfsShareRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::UpdateNfsShareRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::NfsShare > >

virtual CreateNfsShare(google::cloud::baremetalsolution::v2::CreateNfsShareRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::CreateNfsShareRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::NfsShare > >

virtual RenameNfsShare(google::cloud::baremetalsolution::v2::RenameNfsShareRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::RenameNfsShareRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::NfsShare >

virtual DeleteNfsShare(google::cloud::baremetalsolution::v2::DeleteNfsShareRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::DeleteNfsShareRequest const &
Returns
TypeDescription
future< StatusOr< google::cloud::baremetalsolution::v2::OperationMetadata > >

virtual ListProvisioningQuotas(google::cloud::baremetalsolution::v2::ListProvisioningQuotasRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListProvisioningQuotasRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::ProvisioningQuota >

virtual SubmitProvisioningConfig(google::cloud::baremetalsolution::v2::SubmitProvisioningConfigRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::SubmitProvisioningConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::SubmitProvisioningConfigResponse >

virtual GetProvisioningConfig(google::cloud::baremetalsolution::v2::GetProvisioningConfigRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::GetProvisioningConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::ProvisioningConfig >

virtual CreateProvisioningConfig(google::cloud::baremetalsolution::v2::CreateProvisioningConfigRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::CreateProvisioningConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::ProvisioningConfig >

virtual UpdateProvisioningConfig(google::cloud::baremetalsolution::v2::UpdateProvisioningConfigRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::UpdateProvisioningConfigRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::ProvisioningConfig >

virtual RenameNetwork(google::cloud::baremetalsolution::v2::RenameNetworkRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::RenameNetworkRequest const &
Returns
TypeDescription
StatusOr< google::cloud::baremetalsolution::v2::Network >

virtual ListOSImages(google::cloud::baremetalsolution::v2::ListOSImagesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
NameDescription
request google::cloud::baremetalsolution::v2::ListOSImagesRequest
Returns
TypeDescription
StreamRange< google::cloud::baremetalsolution::v2::OSImage >