MCPcopy Create free account
hub / github.com/cloudbase/garm / getInstance

Function getInstance

test/integration/client_utils.go:493–501  ·  view source on GitHub ↗
(apiCli *client.GarmAPI, apiAuthToken runtime.ClientAuthInfoWriter, instanceID string)

Source from the content-addressed store, hash-verified

491}
492
493func getInstance(apiCli *client.GarmAPI, apiAuthToken runtime.ClientAuthInfoWriter, instanceID string) (*params.Instance, error) {
494 getInstancesResponse, err := apiCli.Instances.GetInstance(
495 clientInstances.NewGetInstanceParams().WithInstanceName(instanceID),
496 apiAuthToken)
497 if err != nil {
498 return nil, err
499 }
500 return &getInstancesResponse.Payload, nil
501}
502
503func deleteInstance(apiCli *client.GarmAPI, apiAuthToken runtime.ClientAuthInfoWriter, instanceID string, forceRemove, bypassGHUnauthorized bool) error {
504 return apiCli.Instances.DeleteInstance(

Callers 4

waitInstanceStatusMethod · 0.70

Calls 2

GetInstanceMethod · 0.65
WithInstanceNameMethod · 0.45

Tested by 4

waitInstanceStatusMethod · 0.56