class Puppet::ResourceApi::TransportSchemaDef
RSAPI Transport
schema
Public Class Methods
Source
# File lib/puppet/resource_api/type_definition.rb, line 93 def initialize(definition) super(definition, :connection_info) end
Calls superclass method
Puppet::ResourceApi::BaseTypeDefinition::new
Public Instance Methods
Source
# File lib/puppet/resource_api/type_definition.rb, line 113 def notify_schema_errors(message) raise Puppet::DevError, message end
Source
# File lib/puppet/resource_api/type_definition.rb, line 97 def validate(resource) # enforce mandatory attributes missing_attrs = [] attributes.each do |name, _options| type = @data_type_cache[attributes[name][:type]] if resource[name].nil? && !(type.instance_of? Puppet::Pops::Types::POptionalType) missing_attrs << name end end error_msg = "The following mandatory attributes were not provided:\n * " + missing_attrs.join(", \n * ") raise Puppet::ResourceError, error_msg if missing_attrs.any? end