code: func getVMIDbyIP(pc *PCCloud, IPAddress string) (string, error) {
  	photonClient, err := getPhotonClient(pc)
  	if err != nil {
  		klog.Errorf("Photon Cloud Provider: Failed to get photon client for getVMIDbyNodename, error: [%v]", err)
  		return "", err
  	}
  
  	vmList, err := photonClient.Projects.GetVMs(pc.projID, nil)
  	if err != nil {
  		klog.Errorf("Photon Cloud Provider: Failed to GetVMs for project %s. error: [%v]", pc.projID, err)
  		return "", err
  	}
  
  	for _, vm := range vmList.Items {
  		task, err := photonClient.VMs.GetNetworks(vm.ID)
  		if err != nil {
  			klog.Warningf("Photon Cloud Provider: GetNetworks failed for vm.ID %s, error [%v]", vm.ID, err)
  		} else {
  			task, err = photonClient.Tasks.Wait(task.ID)
  			if err != nil {
  				klog.Warningf("Photon Cloud Provider: Wait task for GetNetworks failed for vm.ID %s, error [%v]", vm.ID, err)
  			} else {
  				networkConnections := task.ResourceProperties.(map[string]interface{})
  				networks := networkConnections["networkConnections"].([]interface{})
  				for _, nt := range networks {
  					network := nt.(map[string]interface{})
  					if val, ok := network["ipAddress"]; ok && val != nil {
  						ipAddr := val.(string)
  						if ipAddr == IPAddress {
  							return vm.ID, nil
  						}
  					}
  				}
  			}
  		}
  	}
  
  	return "", fmt.Errorf("No matching VM is found with IP %s", IPAddress)
  }
docs: // Retrieve the Photon VM ID from the Photon Controller endpoint based on the IP address