Class: ForemanFogProxmox::ComputeResourcesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ForemanFogProxmox::ComputeResourcesController
- Defined in:
- app/controllers/foreman_fog_proxmox/compute_resources_controller.rb
Instance Method Summary collapse
-
#bridges_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/bridges/:compute_resource_id/:node_id.
-
#iso_storages_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/isostorages/:compute_resource_id/:node_id.
-
#isos_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/isos/:compute_resource_id/:node_id.
-
#isos_by_id_and_node_and_storage ⇒ Object
GET foreman_fog_proxmox/isos/:compute_resource_id/:node_id/:storage.
-
#ostemplates_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/ostemplates/:compute_resource_id/:node_id.
-
#ostemplates_by_id_and_node_and_storage ⇒ Object
GET foreman_fog_proxmox/ostemplates/:compute_resource_id/:node_id/:storage.
-
#storages_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/storages/:compute_resource_id/:node_id.
Instance Method Details
#bridges_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/bridges/:compute_resource_id/:node_id
74 75 76 77 78 79 |
# File 'app/controllers/foreman_fog_proxmox/compute_resources_controller.rb', line 74 def bridges_by_id_and_node bridges = load_compute_resource(params[:compute_resource_id]).bridges(params[:node_id]) respond_to do |format| format.json { render :json => bridges } end end |
#iso_storages_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/isostorages/:compute_resource_id/:node_id
66 67 68 69 70 71 |
# File 'app/controllers/foreman_fog_proxmox/compute_resources_controller.rb', line 66 def iso_storages_by_id_and_node storages = load_compute_resource(params[:compute_resource_id]).storages(params[:node_id], 'iso') respond_to do |format| format.json { render :json => storages } end end |
#isos_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/isos/:compute_resource_id/:node_id
41 42 43 44 45 46 47 |
# File 'app/controllers/foreman_fog_proxmox/compute_resources_controller.rb', line 41 def isos_by_id_and_node volumes = load_compute_resource(params[:compute_resource_id]).images_by_storage(params[:node_id], params[:storage], 'iso') respond_to do |format| format.json { render :json => volumes } end end |
#isos_by_id_and_node_and_storage ⇒ Object
GET foreman_fog_proxmox/isos/:compute_resource_id/:node_id/:storage
23 24 25 26 27 28 29 |
# File 'app/controllers/foreman_fog_proxmox/compute_resources_controller.rb', line 23 def isos_by_id_and_node_and_storage volumes = load_compute_resource(params[:compute_resource_id]).images_by_storage(params[:node_id], params[:storage], 'iso') respond_to do |format| format.json { render :json => volumes } end end |
#ostemplates_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/ostemplates/:compute_resource_id/:node_id
50 51 52 53 54 55 |
# File 'app/controllers/foreman_fog_proxmox/compute_resources_controller.rb', line 50 def ostemplates_by_id_and_node storages = load_compute_resource(params[:compute_resource_id]).storages(params[:node_id], 'vztmpl') respond_to do |format| format.json { render :json => storages } end end |
#ostemplates_by_id_and_node_and_storage ⇒ Object
GET foreman_fog_proxmox/ostemplates/:compute_resource_id/:node_id/:storage
32 33 34 35 36 37 38 |
# File 'app/controllers/foreman_fog_proxmox/compute_resources_controller.rb', line 32 def ostemplates_by_id_and_node_and_storage volumes = load_compute_resource(params[:compute_resource_id]).images_by_storage(params[:node_id], params[:storage], 'vztmpl') respond_to do |format| format.json { render :json => volumes } end end |
#storages_by_id_and_node ⇒ Object
GET foreman_fog_proxmox/storages/:compute_resource_id/:node_id
58 59 60 61 62 63 |
# File 'app/controllers/foreman_fog_proxmox/compute_resources_controller.rb', line 58 def storages_by_id_and_node storages = load_compute_resource(params[:compute_resource_id]).storages(params[:node_id]) respond_to do |format| format.json { render :json => storages } end end |