Skip to content

Commit 02394ab

Browse files
committed
resolve conflict
2 parents 3ed488e + 3d2a5da commit 02394ab

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

cloud/services/compute/instance/reconcile.go

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -133,48 +133,6 @@ func getBiosUUID(ctx context.Context, vm *proxmox.VirtualMachine) (*string, erro
133133
return pointer.String(uuid), nil
134134
}
135135

136-
// func convertSMBiosToUUID(smbios string) (string, error) {
137-
// re := regexp.MustCompile(fmt.Sprintf("uuid=%s", providerid.UUIDFormat))
138-
// match := re.FindString(smbios)
139-
// if match == "" {
140-
// return "", errors.Errorf("failed to fetch uuid form smbios")
141-
// }
142-
// // match: uuid=<uuid>
143-
// return strings.Split(match, "=")[1], nil
144-
// }
145-
146-
// func (s *Service) getInstanceFromBiosUUID(uuid string) (*api.VirtualMachine, error) {
147-
// nodes, err := s.client.Nodes()
148-
// if err != nil {
149-
// return nil, err
150-
// }
151-
// if len(nodes) == 0 {
152-
// return nil, errors.New("proxmox nodes not found")
153-
// }
154-
155-
// // to do : check each node in parallel
156-
// for _, node := range nodes {
157-
// vms, err := node.VirtualMachines()
158-
// if err != nil {
159-
// continue
160-
// }
161-
// for _, vm := range vms {
162-
// config, err := vm.Config()
163-
// if err != nil {
164-
// return nil, err
165-
// }
166-
// vmuuid, err := convertSMBiosToUUID(config.SMBios1)
167-
// if err != nil {
168-
// return nil, err
169-
// }
170-
// if vmuuid == uuid {
171-
// return vm, nil
172-
// }
173-
// }
174-
// }
175-
// return nil, rest.NotFoundErr
176-
// }
177-
178136
func (s *Service) createInstance(ctx context.Context, bootstrap string) (*proxmox.VirtualMachine, error) {
179137
log := log.FromContext(ctx)
180138

0 commit comments

Comments
 (0)