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: README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,15 +172,13 @@ The `create`/`update`/`delete` methods get called by the `SimpleProvider` base-c
172
172
173
173
The generated unit tests in `spec/unit/puppet/provider/foo_spec.rb` get automatically evaluated with `pdk test unit`.
174
174
175
-
## Remote Resources
175
+
## Remote resources
176
176
177
-
Support for remote resources is enabled through the use of a `transport` class. A transport class contains the code for managing connections and processing information to/from the remote resource. Please see the [Resource API specification](https://github.com/puppetlabs/puppet-specifications/tree/master/language/resource-api#transport) document on how to create a transport class.
177
+
Support for remote resources is enabled through a `transport` class. A transport class contains the code for managing connections and processing information to and from the remote resource. For information on how to create a transport class, see the [Resource API specification](https://github.com/puppetlabs/puppet-specifications/tree/master/language/resource-api#transport).
178
178
179
179
### `puppet device` support
180
180
181
-
To connect to a remote resource through `puppet device` a `transport` class must be called through a device shim.
182
-
183
-
For example, the `device` class will be a pass through to `transport`:
181
+
To connect to a remote resource through `puppet device`, you must call a `transport` class through a device shim. For example, the `device` class will be passed through to `transport`:
This requires a `transport` class and schema, as detailed in the [Resource API specification](https://github.com/puppetlabs/puppet-specifications/tree/master/language/resource-api#transport), for example a transport class:
200
+
This requires a `transport` class and schema, as detailed in the [Resource API specification](https://github.com/puppetlabs/puppet-specifications/tree/master/language/resource-api#transport).
201
+
202
+
An example of a transport class:
203
203
204
204
```ruby
205
205
# lib/puppet/transport/device_type.rb
@@ -225,7 +225,7 @@ module Puppet::Transport
225
225
end
226
226
```
227
227
228
-
An example of a corresponding schema may look like:
After this, `puppet device` will be able to use the new provider, and supply it (through the device class) with the URL specified in the [`device.conf`](https://puppet.com/docs/puppet/5.3/config_file_device.html).
264
264
265
-
#### Transport/Device specific providers
265
+
#### Transport/device specific providers
266
266
267
-
To allow modules to deal with different backends independently of each other, the Resource API also implements a mechanism to use different API providers side-by-side. For a given transport/device class (see above), the Resource API will first try to load a `Puppet::Provider::TypeName::DeviceType` class from `lib/puppet/provider/type_name/device_type.rb`, before falling back to the regular provider at `Puppet::Provider::TypeName::TypeName`.
267
+
To allow modules to deal with different backends independently, the Resource API implements a mechanism to use different API providers side by side. For a given transport/device class (see above), the Resource API will first try to load a `Puppet::Provider::TypeName::DeviceType` class from `lib/puppet/provider/type_name/device_type.rb`, before falling back to the regular provider at `Puppet::Provider::TypeName::TypeName`.
268
268
269
-
## Further Reading
269
+
## Further reading
270
270
271
271
The [Resource API](https://github.com/puppetlabs/puppet-specifications/blob/master/language/resource-api/README.md) describes details of all the capabilities of this gem.
0 commit comments