Class: Api::V2::VaultConnectionsController

Inherits:
V2::BaseController
  • Object
show all
Includes:
Api::Version2, ForemanVault::Controller::Parameters::VaultConnection
Defined in:
app/controllers/api/v2/vault_connections_controller.rb

Instance Method Summary collapse

Methods included from ForemanVault::Controller::Parameters::VaultConnection

#vault_connection_params

Instance Method Details

#createObject



33
34
35
36
# File 'app/controllers/api/v2/vault_connections_controller.rb', line 33

def create
  @vault_connection = VaultConnection.new(vault_connection_params)
  process_response @vault_connection.save
end

#destroyObject



47
48
49
# File 'app/controllers/api/v2/vault_connections_controller.rb', line 47

def destroy
  process_response @vault_connection.destroy
end

#indexObject



13
14
15
# File 'app/controllers/api/v2/vault_connections_controller.rb', line 13

def index
  @vault_connections = resource_scope_for_index
end

#showObject



19
20
# File 'app/controllers/api/v2/vault_connections_controller.rb', line 19

def show
end

#updateObject



41
42
43
# File 'app/controllers/api/v2/vault_connections_controller.rb', line 41

def update
  process_response @vault_connection.update(vault_connection_params)
end