File: manila_type.rb

package info (click to toggle)
puppet-module-manila 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,804 kB
  • sloc: ruby: 4,767; python: 38; makefile: 10; sh: 10
file content (50 lines) | stat: -rw-r--r-- 1,346 bytes parent folder | download | duplicates (2)
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
Puppet::Type.newtype(:manila_type) do

  desc 'Type for managing manila types.'

  ensurable

  newparam(:name, :namevar => true) do
    newvalues(/\S+/)
  end

  newparam(:is_public, :boolean => true) do
    desc 'Whether the type is public or not. Default to `true`'
    newvalues(:true, :false)
    defaultto true
  end

  newparam(:driver_handles_share_servers, :boolean => true) do
    desc 'Whether the driver handles share servers. Default to `false`'
    newvalues(:true, :false)
    defaultto false
  end

  newparam(:snapshot_support, :boolean => true) do
    desc 'Filter backends by their capability to create share snapshots'
    newvalues(:true, :false)
    defaultto false
  end

  newparam(:create_share_from_snapshot_support, :boolean => true) do
    desc 'Filter backends by their capability to create shares from snapshots.'
    newvalues(:true, :false)
    defaultto false
  end

  newparam(:revert_to_snapshot_support, :boolean => true) do
    desc 'Filter backends by their capability to revert shares to snapshots.'
    newvalues(:true, :false)
    defaultto false
  end

  newparam(:mount_snapshot_support, :boolean => true) do
    desc 'Filter backends by their capability to mount share snapshots.'
    newvalues(:true, :false)
    defaultto false
  end

  autorequire(:anchor) do
    ['manila::service::end']
  end
end