Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in Nodes endpoint response #156

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cbcoutinho
Copy link

@cbcoutinho cbcoutinho commented Aug 25, 2024

Also add the CurrentKernel and BootInfo attributes.

Tested on Proxmox VE 8.2

Here is an example response from a test cluster I've recently started experimenting with to show the typos & new fields

{
  "data": {
    "uptime": 457597,
    "cpu": 0.00487078384218172,
    "cpuinfo": {
      "model": "Intel(R) Core(TM) i5-9500T CPU @ 2.20GHz",
      "cpus": 6,
      "mhz": "3498.489",
      "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities",
      "sockets": 1,
      "hvm": "1",
      "cores": 6,
      "user_hz": 100
    },
    "swap": {
      "total": 8589930496,
      "used": 0,
      "free": 8589930496
    },
    "wait": 0.000354016870735012,
    "loadavg": [
      "0.01",
      "0.02",
      "0.00"
    ],
    "kversion": "Linux 6.8.12-1-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-1 (2024-08-05T16:17Z)",
    "pveversion": "pve-manager/8.2.4/faa83925c9641325",
    "current-kernel": {
      "release": "6.8.12-1-pve",
      "sysname": "Linux",
      "version": "#1 SMP PREEMPT_DYNAMIC PMX 6.8.12-1 (2024-08-05T16:17Z)",
      "machine": "x86_64"
    },
    "ksm": {
      "shared": 0
    },
    "memory": {
      "free": 14135144448,
      "total": 16572776448,
      "used": 2437632000
    },
    "boot-info": {
      "mode": "efi",
      "secureboot": 0
    },
    "idle": 0,
    "rootfs": {
      "free": 87486828544,
      "avail": 82316091392,
      "used": 13374898176,
      "total": 100861726720
    }
  }
}

types.go Show resolved Hide resolved
@luthermonson
Copy link
Owner

so im not opposed to getting this in as is but i think we should have a conversation about the sdn apis in general. the way this client has been structured is a hierarchy of structs and you put the vnet stuff on the raw client. take a look at how firewalls were done https://github.com/luthermonson/go-proxmox/blob/main/cluster_firewall.go

i dont use the sdn hardly at all so not much experience, do you feel we should be implementing sdn with controllers/dns/ipams/vnets underneath it? i can believe at bare minimum since the sdn api is so small these could all be under clusters so it's clusters.Vnets so the user knows that vnets are a cluster construct

@cbcoutinho
Copy link
Author

Hi @luthermonson thanks for the pleasant response. I'd be happy to structure it differently, I can move the SDN structs under the cluster scope rather than the client directly. I don't have a preference for one way or the other - This PR is being expanded as I develop a TF provider for Proxmox, and maybe I will have a different answer after I make more progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants