Documentationcurrent version
Help us improve the docs by fixing typos and proposing enhancements.

Nikita

Action "lxc.storage.delete"

Delete an existing lxd storage.

Output

  • $status True if the object was deleted

Example

const {$status} = await nikita.lxc.storage.delete({
  name: 'system'
})
console.info(`Storage was deleted: ${$status}`)

Schema definitions

definitions =
  config:
    type: 'object'
    properties:
      'name':
        type: 'string'
        description: '''
        The storage name to delete.
        '''
    required: ['name']

Handler

handler = ({config}) ->
  command_delete = [
    'lxc'
    'storage'
    'delete'
     config.name
  ].join ' '
  #Execute
  await @execute
    command: """
    lxc storage list | grep #{config.name} || exit 42
    #{command_delete}
    """
    code: [0, 42]

Exports

module.exports =
  handler: handler
  metadata:
    argument_to_config: 'name'
    definitions: definitions
Edit on GitHub
Navigate
About

Nikita is an open source project hosted on GitHub and developed by Adaltas.