You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: language/resource-api/README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -370,7 +370,7 @@ To support Puppet versions prior to 6, see the [Legacy Support](#legacy-support)
370
370
### Transport
371
371
372
372
```ruby
373
-
# lib/puppet/transport/nexus_schema.rb
373
+
# lib/puppet/transport/schema/nexus.rb
374
374
Puppet::ResourceAPI.register_transport(
375
375
name:'nexus', # points at class Puppet::Transport::Nexus
376
376
desc:'Connects to a Cisco Nexus device',
@@ -418,6 +418,24 @@ A transport connects providers to the remote target. It consists of the schema a
418
418
419
419
Password attributes should also set `sensitive:true` to ensure that the data is handled securely. Attributes marked with this flag allow any UI based off this schema to make appropriate presentation choices. The value will be passed to the transport wrapped in a `Puppet::Pops::Types::PSensitiveType::Sensitive`. This will keep the value from being logged or saved inadvertently while it is being transmitted between components. To access the value within the Transport use the `unwrap` method. e.g. `connection_info[:password].unwrap`.
420
420
421
+
A transport schema accepts the following keywords:
422
+
423
+
* `uri`: use when you need to specify a specific URL to connect to. All of the following keys will be computed from the `uri` when possible. In the future more url parts may be computed from the URI.
424
+
* `host`: use to specify an IP or address to connect to.
425
+
* `protocol`: use to specify which protocol the transport should use for example `http`, `https`, `ssh` or `tcp`.
426
+
* `user`: the user the transport should connect as.
427
+
* `port`: the port the transport should connect to.
428
+
429
+
Do not use the following keywords when writing a schema:
430
+
431
+
* `name`: transports should use `uri` instead of name.
432
+
* `path`: reserved as a uri part.
433
+
* `query`: reserved as a uri part.
434
+
* `run-on`: This is used by Bolt to determine which target to proxy to. Transports should not rely on this key.
435
+
* `remote-transport`: This is used to determine which transport to load. It should always be the transport class named "declassified".
436
+
* `remote-*`: any key starting with `remote-` is reserved for future use.
437
+
* `implementations`: reserved by Bolt.
438
+
421
439
The transport implementation must implement the following methods:
0 commit comments