Sha256: 122f026ecd4da5887510cb010724cc0761f45053abb4faa33ca4fcaeef12dae2

Contents?: true

Size: 921 Bytes

Versions: 13

Compression:

Stored size: 921 Bytes

Contents

# frozen_string_literal: true

ForemanBootdisk::Engine.routes.draw do
  resources :disks, only: [] do
    get 'generic', on: :collection
    get 'help', on: :collection
    constraints(id: %r{[^/]+}) do
      get 'hosts/:id', on: :collection, to: 'disks#host'
      get 'full_hosts/:id', on: :collection, to: 'disks#full_host'
      get 'subnet/:id', on: :collection, to: 'subnet_disks#subnet'
      get 'bootdisk_options/:id', on: :collection, to: 'disks#bootdisk_options'
    end
  end

  namespace :api, defaults: { format: 'json' } do
    scope '(:apiv)', module: :v2, defaults: { apiv: 'v2' }, apiv: /v1|v2/, constraints: ApiConstraints.new(version: 2, default: true) do
      scope :bootdisk do
        get 'generic', to: 'disks#generic'
        constraints(id: %r{[^/]+}) do
          get 'hosts/:id', to: 'disks#host'
          get 'subnets/:id', to: 'subnet_disks#subnet'
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
foreman_bootdisk-22.0.2 config/routes.rb
foreman_bootdisk-22.0.1 config/routes.rb
foreman_bootdisk-22.0.0 config/routes.rb
foreman_bootdisk-21.0.6 config/routes.rb
foreman_bootdisk-21.2.3 config/routes.rb
foreman_bootdisk-21.2.2 config/routes.rb
foreman_bootdisk-21.0.5 config/routes.rb
foreman_bootdisk-21.2.1 config/routes.rb
foreman_bootdisk-21.2.0 config/routes.rb
foreman_bootdisk-21.1.0 config/routes.rb
foreman_bootdisk-21.0.4 config/routes.rb
foreman_bootdisk-21.0.3 config/routes.rb
foreman_bootdisk-21.0.2 config/routes.rb