forked from Katello/katello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.rb
304 lines (263 loc) · 9.13 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
Src::Application.routes.draw do
resources :sync_plans, :only => [:index, :create, :new, :edit, :update, :show, :destroy, :auto_complete_search] do
collection do
get :auto_complete_search
get :items
end
end
get "sync_schedules/index"
post "sync_schedules/apply"
get "sync_management/index"
post "sync_management/sync"
get "sync_management/sync_status"
get "sync_management/product_status"
resources :sync_management, :only => [:destroy]
get "notices/note_count"
get "notices/get_new"
get "notices/auto_complete_search"
match 'notices/:id/details' => 'notices#details', :via => :get
match 'notices' => 'notices#show', :via => :get
match 'notices' => 'notices#destroy_all', :via => :delete
resources :subscriptions do
end
resources :dashboard do
end
resources :content do
end
resources :systems do
member do
get :packages
get :subscriptions
post :update_subscriptions
get :facts
end
collection do
get :auto_complete_search
get :items
get :environments
end
end
resources :operations do
end
resources :packages do
member do
get :changelog
get :filelist
get :dependencies
end
end
resources :errata do
member do
get :packages
end
end
resources :products do
member do
get :sync
end
end
resources :owners do
member do
post :import
get :import_status
end
end
match '/consumers/export_status' => 'consumers#export_status', :via => :get
resources :consumers do
member do
get :export
end
resources :entitlements
resources :certificates do
collection do
get :serials
end
end
end
match '/consumers/:id' => 'consumers#re_register', :via => :post
resources :entitlements
resources :users do
collection do
get :auto_complete_search
get :items
post :enable_helptip
post :disable_helptip
end
member do
post :clear_helptips
end
end
resources :nodes, :constraints => {:id => /[^\/]+/}, :only => [:index, :show]
resources :puppetclasses, :only => [:index]
resources :providers do
resources :products do
resources :repositories
end
collection do
get :items
end
member do
get :products_repos
get :subscriptions
post :subscriptions
get :schedule
end
end
match '/providers/:id' => 'providers#update', :via => :put
match '/providers/:id' => 'providers#update', :via => :post
match '/organizations/:org_id/environments/:env_id/promotions' => 'promotions#show', :via=>:get, :as=>'promotions'
match '/organizations/:org_id/environments/:env_id/promotions/products' => 'promotions#products', :via=>:get, :as=>'promotion_products'
match '/organizations/:org_id/environments/:env_id/promotions/packages' => 'promotions#packages', :via=>:get, :as=>'promotion_packages'
match '/organizations/:org_id/environments/:env_id/promotions/errata' => 'promotions#errata', :via=>:get, :as=>'promotion_errata'
match '/organizations/:org_id/environments/:env_id/promotions/repos' => 'promotions#repos', :via=>:get, :as=>'promotion_repos'
match '/organizations/:org_id/environments/:env_id/promotions/detail' => 'promotions#detail', :via=>:get, :as=>'promotion_details'
match '/organizations/:org_id/environments/:env_id/edit' => 'environments#update', :via => :put
resources :organizations do
resources :environments
resources :providers do
get 'auto_complete_search', :on => :collection
end
resources :providers
collection do
get :auto_complete_search
get :items
end
end
match '/organizations/:id/edit' => 'organizations#update', :via => :put
resources :changesets, :only => [:update, :index, :show, :create, :new, :edit, :show, :destroy, :auto_complete_search] do
member do
put :name
get :dependency_size
get :dependency_list
post :promote
get :products
get :object
end
collection do
get :auto_complete_search
get :list
get :items
end
end
resources :environments
match '/roles/show_permission' => 'roles#show_permission', :via=>:get
resources :roles do
post "create_permission" => "roles#create_permission"
resources :permission, :only => {} do
put "update_permission" => "roles#update_permission", :as => "update"
end
collection do
get :auto_complete_search
get :items
end
end
match '/roles/resource_type/:resource_type/verbs_and_scopes' => 'roles#verbs_and_scopes', :via=>:get, :as=>'verbs_and_scopes'
resources :search, :only => {} do
get 'show', :on => :collection
get 'history', :on => :collection
delete 'history' => 'search#destroy_history', :on => :collection
get 'favorite', :on => :collection
post 'favorite' => 'search#create_favorite', :on => :collection
delete 'favorite/:id' => 'search#destroy_favorite', :on => :collection, :as => 'destroy_favorite'
end
resource :user_session do
get 'invalid'
end
resource :account
root :to => "user_sessions#new"
match '/login' => 'user_sessions#new'
match '/logout' => 'user_sessions#destroy'
match '/user_session/logout' => 'user_sessions#destroy'
match '/user_session' => 'user_sessions#show', :via=>:get, :as=>'show_user_session'
namespace :api do
match '/' => 'root#resource_list'
resources :systems, :only => [:show, :destroy, :create, :index] do
member do
get :packages
end
end
resources :providers do
resources :sync, :only => [:index, :show, :create] do
delete :index, :on => :collection, :action => :cancel
end
member do
post :import_products
post :import_manifest
post :product_create
get :products
end
end
resources :templates do
post :promote, :on => :member
put :update_content, :on => :member
post :import, :on => :collection
get :export, :on => :member
end
#match '/organizations/:organization_id/locker/repos' => 'environments#repos', :via => :get
resources :organizations do
resources :products, :only => [:index]
resources :environments do
resources :changesets, :only => [:index, :show, :create, :destroy] do
put :update, :on => :member, :action => :update_content
post :promote, :on => :member, :action => :promote
end
resources :products, :only => [:index], :constraints => { :id => /[0-9\.]*/ }
member do
get :repositories
end
end
resources :tasks, :only => [:index]
member do
get :providers
end
resources :systems, :only => [:index]
end
resources :products, :only => [] do
get :repositories, :on => :member
resources :sync, :only => [:index, :show, :create] do
delete :index, :on => :collection, :action => :cancel
end
end
resources :puppetclasses, :only => [:index]
resources :ping, :only => [:index]
resources :repositories, :only => [:index, :show, :create], :constraints => { :id => /[0-9a-zA-Z\-_.]*/ } do
resources :sync, :only => [:index, :show, :create] do
delete :index, :on => :collection, :action => :cancel
end
resources :packages, :only => [:index]
resources :errata, :only => [:index]
resources :distributions, :only => [:index]
end
match '/repositories/discovery' => 'repositories#discovery', :via => :post
match '/repositories/discovery/:id' => 'repositories#discovery_status', :via => :get
resources :environments, :only => [:show, :update, :destroy] do
resources :systems, :only => [:create, :index]
end
resources :packages, :only => [:show]
resources :changesets, :only => [:show]
resources :errata, :only => [:show]
resources :distributions, :only => [:show]
resources :users
resources :tasks, :only => [:show]
# support for rhsm
resources :consumers, :controller => 'systems'
match '/owners/:organization_id/environments' => 'environments#index', :via => :get
match '/environments/:environment_id/consumers' => 'systems#index', :via => :get
match '/environments/:environment_id/consumers' => 'systems#create', :via => :post
match '/consumers/:id' => 'systems#regenerate_identity_certificates', :via => :post
match '/consumers/:id/certificates' => 'proxies#get', :via => :get
match '/consumers/:id/certificates/serials' => 'proxies#get', :via => :get
match '/consumers/:id/entitlements' => 'proxies#get', :via => :get
match '/consumers/:id/entitlements' => 'proxies#post', :via => :post
match '/consumers/:id/entitlements' => 'proxies#delete', :via => :delete
match '/consumers/:consumer_id/certificates/:id' => 'proxies#delete', :via => :delete
match '/pools' => 'proxies#get', :via => :get
match '/products' => 'proxies#get', :via => :get
match '/products/:id' => 'proxies#get', :via => :get
match '/entitlements/:id' => 'proxies#get', :via => :get
match '/subscriptions' => 'proxies#post', :via => :post
match '/users/:username/owners' => 'organizations#list_owners', :via => :get
# development / debugging support
get 'status/memory'
end
end