-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from DavidS/FM-8081-pdk-new-transport-shim
(FM-8081) Add DeviceShim template too
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'puppet/resource_api/transport/wrapper' | ||
|
||
# Initialize the NetworkDevice module if necessary | ||
module Puppet::Util::NetworkDevice; end | ||
|
||
# The <%= name.capitalize %> module only contains the Device class to bridge from puppet's internals to the Transport. | ||
# All the heavy lifting is done bye the Puppet::ResourceApi::Transport::Wrapper | ||
module Puppet::Util::NetworkDevice::<%= name.capitalize %> # rubocop:disable Style/ClassAndModuleCamelCase | ||
# Bridging from puppet to the <%= name %> transport | ||
class Device < Puppet::ResourceApi::Transport::Wrapper | ||
def initialize(url_or_config, _options = {}) | ||
super('<%= name %>', url_or_config) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters