theforeman / foreman_fog_proxmox

Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
GNU General Public License v3.0
106 stars 33 forks source link

Creating LXC container broken in 15.0 #310

Closed jacac closed 7 months ago

jacac commented 10 months ago

Describe the bug Since version 15.0 LXC container creation is broken. Looks like https://github.com/theforeman/foreman_fog_proxmox/pull/287/commits/39eb6086c7cee79a99932b6caaf830fc5881a656 does not differentiate between KVM and LXC.

Error: Expected([200]) <=> Actual(400 Bad Request) excon.error.response :body => "{\"data\":null,\"errors\":{\"numa\":\"property is not defined in schema and the schema does not allow additional properties\",\"bios\":\"property is not defined in schema and the schema does not allow additional properties\",\"cpu_type\":\"property is not defined in schema and the schema does not allow additional properties\",\"agent\":\"property is not defined in schema and the schema does not allow additional properties\",\"kvm\":\"property is not defined in schema and the schema does not allow additional properties\",\"scsihw\":\"property is not defined in schema and the schema does not allow additional properties\",\"sockets\":\"property is not defined in schema and the schema does not allow additional properties\",\"vga\":\"property is not defined in schema and the schema does not allow additional properties\"}}" :cookies => [ ] :headers => { "Cache-Control" => "max-age=0" "Connection" => "close" "Content-Length" => "792" "Content-Type" => "application/json;charset=UTF-8" "Date" => "Fri, 05 Jan 2024 18:50:53 GMT" "Expires" => "Fri, 05 Jan 2024 18:50:53 GMT" "Pragma" => "no-cache" "Server" => "pve-api-daemon/3.0" } :host => "px.example.com" :local_address => "1.1.1.1" :local_port => 41184 :method => "POST" :omit_default_port => false :path => "/api2/json/nodes/px01/lxc" :port => 8006 :query => nil :reason_phrase => "Parameter verification failed." :remote_ip => "10.9.41.14" :scheme => "https" :status => 400 :status_line => "HTTP/1.1 400 Parameter verification failed.\r\n"

Expected Behavior Selecting the Type LXC container should only show settings available to containers. image

Additional Context fog-proxmox (0.15.0) foreman_fog_proxmox (0.15.0)