Skip to content

Commit b9c9c17

Browse files
authored
(puppet-resource_api) Docs edit
This commit makes minor edits to the puppet-resource_api docs.
1 parent a94b611 commit b9c9c17

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,13 @@ The `create`/`update`/`delete` methods get called by the `SimpleProvider` base-c
172172

173173
The generated unit tests in `spec/unit/puppet/provider/foo_spec.rb` get automatically evaluated with `pdk test unit`.
174174

175-
## Remote Resources
175+
## Remote resources
176176

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).
178178

179179
### `puppet device` support
180180

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`:
184182

185183
```ruby
186184
# lib/puppet/util/network_device/device_type/device.rb
@@ -199,7 +197,9 @@ module Puppet::Util::NetworkDevice::DeviceType
199197
end
200198
```
201199

202-
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:
203203

204204
```ruby
205205
# lib/puppet/transport/device_type.rb
@@ -225,7 +225,7 @@ module Puppet::Transport
225225
end
226226
```
227227

228-
An example of a corresponding schema may look like:
228+
An example of a corresponding schema:
229229

230230
```ruby
231231
# lib/puppet/transport/device_type.rb
@@ -262,11 +262,11 @@ Puppet::ResourceAPI.register_transport(
262262

263263
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).
264264

265-
#### Transport/Device specific providers
265+
#### Transport/device specific providers
266266

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`.
268268

269-
## Further Reading
269+
## Further reading
270270

271271
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.
272272

0 commit comments

Comments
 (0)