Project

General

Profile

Download (1.2 KB) Statistics
| Branch: | Tag: | Revision:

foreman_docker / config / routes.rb @ 5274f6bc

1
Rails.application.routes.draw do
2
  resources :containers, :only => [:index, :new, :show, :destroy] do
3
    member do
4
      post :commit
5
      put :power
6
    end
7
  end
8

    
9
  resources :wizard_states, :only => [] do
10
    resources :steps, :controller => 'containers/steps', :only => [:show, :update]
11
  end
12

    
13
  resources :image_search, :only => [] do
14
    member do
15
      get :auto_complete_repository_name
16
      get :auto_complete_image_tag
17
      get :search_repository
18
    end
19
  end
20

    
21
  resources :registries, :except => [:show]
22

    
23
  scope :foreman_docker, :path => '/docker' do
24
    namespace :api, :defaults => { :format => 'json' } do
25
      scope "(:apiv)", :module => :v2, :defaults => { :apiv => 'v2' }, :apiv => /v2/,
26
                       :constraints => ApiConstraints.new(:version => 2) do
27
        resources :containers, :only => [:index, :create, :show, :destroy] do
28
          member do
29
            get :logs
30
            put :power
31
          end
32
        end
33
        resources :compute_resources, :only => [] do
34
          resources :containers, :only => [:index, :create, :show, :destroy] do
35
            member do
36
              get :logs
37
              put :power
38
            end
39
          end
40
        end
41
      end
42
    end
43
  end
44
end