mirror of
https://github.com/outbackdingo/proxmox-cloud-controller-manager.git
synced 2026-01-27 02:20:02 +00:00
chore: bump deps
Updated dependencies Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
This commit is contained in:
@@ -124,12 +124,12 @@ func (c *Cluster) FindVMByUUID(uuid string) (*pxapi.VmRef, string, error) {
|
||||
return nil, "", fmt.Errorf("failed to cast response to map, vm: %v", vm)
|
||||
}
|
||||
|
||||
if vm["type"].(string) != "qemu" {
|
||||
if vm["type"].(string) != "qemu" { //nolint:errcheck
|
||||
continue
|
||||
}
|
||||
|
||||
vmr := pxapi.NewVmRef(int(vm["vmid"].(float64)))
|
||||
vmr.SetNode(vm["node"].(string))
|
||||
vmr := pxapi.NewVmRef(int(vm["vmid"].(float64))) //nolint:errcheck
|
||||
vmr.SetNode(vm["node"].(string)) //nolint:errcheck
|
||||
vmr.SetVmType("qemu")
|
||||
|
||||
config, err := px.GetVmConfig(vmr)
|
||||
@@ -138,7 +138,7 @@ func (c *Cluster) FindVMByUUID(uuid string) (*pxapi.VmRef, string, error) {
|
||||
}
|
||||
|
||||
if config["smbios1"] != nil {
|
||||
if c.getUUID(config["smbios1"].(string)) == uuid {
|
||||
if c.getUUID(config["smbios1"].(string)) == uuid { //nolint:errcheck
|
||||
return vmr, region, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Package proxmox is main CCM defenition.
|
||||
// Package proxmox is main CCM definition.
|
||||
package proxmox
|
||||
|
||||
import (
|
||||
|
||||
@@ -112,7 +112,7 @@ func (i *instances) InstanceShutdown(_ context.Context, node *v1.Node) (bool, er
|
||||
return false, err
|
||||
}
|
||||
|
||||
if vmState["status"].(string) == "stopped" {
|
||||
if vmState["status"].(string) == "stopped" { //nolint:errcheck
|
||||
return true, nil
|
||||
}
|
||||
|
||||
@@ -213,8 +213,8 @@ func (i *instances) getInstance(node *v1.Node) (*pxapi.VmRef, string, error) {
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
if vmInfo["name"] != nil && vmInfo["name"].(string) != node.Name {
|
||||
return nil, "", fmt.Errorf("instances.getInstance() vm.name(%s) != node.name(%s)", vmInfo["name"].(string), node.Name)
|
||||
if vmInfo["name"] != nil && vmInfo["name"].(string) != node.Name { //nolint:errcheck
|
||||
return nil, "", fmt.Errorf("instances.getInstance() vm.name(%s) != node.name(%s)", vmInfo["name"].(string), node.Name) //nolint:errcheck
|
||||
}
|
||||
|
||||
klog.V(5).Infof("instances.getInstance() vmInfo %+v", vmInfo)
|
||||
@@ -240,6 +240,6 @@ func (i *instances) getInstanceType(vmRef *pxapi.VmRef, region string) (string,
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%.0fVCPU-%.0fGB",
|
||||
vmInfo["maxcpu"].(float64),
|
||||
vmInfo["maxmem"].(float64)/1024/1024/1024), nil
|
||||
vmInfo["maxcpu"].(float64), //nolint:errcheck
|
||||
vmInfo["maxmem"].(float64)/1024/1024/1024), nil //nolint:errcheck
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user