client

package
v1.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddJWTtoTheHeader

func AddJWTtoTheHeader(ctx context.Context, req *http.Request) error

func AddProjectIDtoTheHeader

func AddProjectIDtoTheHeader(ctx context.Context, req *http.Request) error

func AssertInMaintenance

func AssertInMaintenance(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	hostID *string,
	siteID *string,
	regionID *string,
	timestamp time.Time,
	expectedSchedules int,
	found bool,
)

func CreateHost

func CreateHost(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	hostRequest api.Host,
) *api.PostComputeHostsResponse

CreateHost adds a host via the REST APIs, and setup the soft delete upon test cleanup.

func CreateInstance

func CreateInstance(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	instRequest api.Instance,
) *api.PostInstancesResponse

func CreateOu

func CreateOu(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	ouRequest api.OU,
) *api.PostOusResponse

func CreateProvider

func CreateProvider(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	reqProvider api.Provider,
) *api.PostProvidersResponse

func CreateRegion

func CreateRegion(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	regionRequest api.Region,
) *api.PostRegionsResponse

func CreateSchedSingle

func CreateSchedSingle(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	reqSched api.SingleSchedule,
) *api.PostSchedulesSingleResponse

func CreateSite

func CreateSite(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	siteRequest api.Site,
) *api.PostSitesResponse

func CreateWorkload

func CreateWorkload(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	reqWorkload api.Workload,
) *api.PostWorkloadsResponse

func CreateWorkloadMember

func CreateWorkloadMember(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	reqMember api.WorkloadMember,
) *api.PostWorkloadMembersResponse

func DeleteInstance

func DeleteInstance(t testing.TB, ctx context.Context, apiClient *api.ClientWithResponses, instanceID string)

func DeleteOS

func DeleteOS(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	osID string,
)

func DeleteOu

func DeleteOu(t testing.TB, ctx context.Context, apiClient *api.ClientWithResponses, ouID string)

func DeleteProvider

func DeleteProvider(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	providerID string,
)

func DeleteRegion

func DeleteRegion(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	regionID string,
)

func DeleteSchedRepeated

func DeleteSchedRepeated(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	schedID string,
)

func DeleteSchedSingle

func DeleteSchedSingle(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	schedID string,
)

func DeleteSite

func DeleteSite(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	siteID string,
)

func DeleteTelemetryLogsGroup

func DeleteTelemetryLogsGroup(
	t testing.TB, ctx context.Context, apiClient *api.ClientWithResponses, id string,
)

func DeleteTelemetryLogsProfile

func DeleteTelemetryLogsProfile(
	t testing.TB, ctx context.Context, apiClient *api.ClientWithResponses, id string,
)

func DeleteTelemetryMetricsGroup

func DeleteTelemetryMetricsGroup(
	t testing.TB, ctx context.Context, apiClient *api.ClientWithResponses, id string,
)

func DeleteTelemetryMetricsProfile

func DeleteTelemetryMetricsProfile(
	t testing.TB, ctx context.Context, apiClient *api.ClientWithResponses, id string,
)

func DeleteWorkload

func DeleteWorkload(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	workloadID string,
)

func DeleteWorkloadMember

func DeleteWorkloadMember(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	memberID string,
)

func GetAPIClient

func GetAPIClient() (*api.ClientWithResponses, error)

func GetClientWithCA

func GetClientWithCA(caPath string) (*http.Client, error)

func GetHostRequestWithRandomUUID

func GetHostRequestWithRandomUUID() api.Host

func ListMetadataContains

func ListMetadataContains(lst api.Metadata, key, value string) bool

func ListStringContains

func ListStringContains(s []string, str string) bool

func LoadFile

func LoadFile(filePath string) (string, error)

func SoftDeleteHost

func SoftDeleteHost(
	t testing.TB,
	ctx context.Context,
	apiClient *api.ClientWithResponses,
	hostID string,
)

SoftDeleteHost: unallocate the host if allocated to any site so we free any linked resources (site), and does a soft delete of Host. Eventually Host Resource Manager will do the hard delete.

func UnallocateHostFromSite

func UnallocateHostFromSite(t testing.TB, ctx context.Context, apiClient *api.ClientWithResponses, hostId string)

UnallocateHostFromSite: unallocate the given hostId from a site.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL