File: test_device.rb

package info (click to toggle)
ruby-puppet-resource-api 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,232 kB
  • sloc: ruby: 9,573; sh: 4; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 885 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
require 'puppet/resource_api'

Puppet::ResourceApi.register_transport(
  name: 'test_device', # points at class Puppet::Transport::TestDevice
  desc: 'Connects to a device',
  connection_info: {
    username:        {
      type:      'String',
      desc:      'The name of the resource you want to manage.',
    },
    secret: {
      type:      'String',
      desc:      'A secret to protect.',
      sensitive:  true,
    },
    optional_secret: {
      type:      'Optional[String]',
      desc:      'An optional secret to protect.',
      sensitive:  true,
    },
    array_secret: {
      type:      'Optional[Array[String]]',
      desc:      'An array secret to protect.',
      sensitive:  true,
    },
    variant_secret: {
      type:      'Optional[Variant[Array[String], Integer]]',
      desc:      'An array secret to protect.',
      sensitive:  true,
    },
  },
)