Skip to content

Commit e79e24e

Browse files
committed
Add a primitive list operation
This needs to be done better for FM-7700, but is required now for getting the schema for the context when retrieving facts.
1 parent f730501 commit e79e24e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/puppet/resource_api/transport.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ def register(schema)
1818
end
1919
module_function :register # rubocop:disable Style/AccessModifierDeclarations
2020

21+
# retrieve a Hash of transport schemas, keyed by their name.
22+
def list
23+
@transports || {}
24+
end
25+
module_function :list # rubocop:disable Style/AccessModifierDeclarations
26+
2127
def connect(name, connection_info)
2228
validate(name, connection_info)
2329
require "puppet/transport/#{name}"

0 commit comments

Comments
 (0)