Skip to content

Commit

Permalink
rename storages to ceph and drop unused endpoints
Browse files Browse the repository at this point in the history
the barclamp name fits better than the abstracted name
  • Loading branch information
MaximilianMeister committed Sep 16, 2016
1 parent 2bce137 commit 47ebfc0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 47 deletions.
33 changes: 33 additions & 0 deletions crowbar_framework/app/controllers/api/ceph_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright 2016, SUSE Linux GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

module Api
class CephController < ApiController
before_action :set_ceph

api :GET, "/api/ceph/repocheck", "Sanity check ceph repositories"
api_version "2.0"
def repocheck
render json: @ceph.repocheck
end

protected

def set_ceph
@ceph = Api::Ceph.new
end
end
end
44 changes: 0 additions & 44 deletions crowbar_framework/app/controllers/api/storages_controller.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

module Api
class Storage < Tableless
class Ceph < Tableless
def repocheck
Api::Node.new.repocheck(addon: "ceph")
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace :api,
constraints: ApiConstraint.new(2.0) do
resources :storages,
only: [:index, :show] do
resource :ceph, controller: :ceph, only: [] do
collection do
get :repocheck
end
Expand Down

0 comments on commit 47ebfc0

Please sign in to comment.