func()

in pkg/networks/networks.go [160:175]


func (m *networkMigrator) wait(ctx context.Context, opID string) error {
	op, err := m.clients.Compute.GetGlobalOperation(ctx, m.projectID, opID)
	if err != nil {
		return err
	}

	w := &ComputeOperation{
		ProjectID: m.projectID,
		Operation: op,
		Client:    m.clients.Compute,
	}
	if err := m.handler.Wait(ctx, w); err != nil {
		return fmt.Errorf("error waiting on ongoing operation %s: %w", w.String(), err)
	}
	return nil
}