Skip to content

Instantly share code, notes, and snippets.

@trevor-vaughan
Last active December 25, 2015 23:48
Show Gist options
  • Save trevor-vaughan/7059200 to your computer and use it in GitHub Desktop.
Save trevor-vaughan/7059200 to your computer and use it in GitHub Desktop.
Type and Provider for the Flow Execution Demo page at https://www.onyxpoint.com/type-and-provider-execution-walkthrough/

This is based on the code at: https://github.com/onyxpoint/onyxpoint-learning_custom_types

Output Generated by setting up the learning_custom_types module (with that name), entering the directory, and running

puppet apply --basemodulepath=`pwd`/../ tests/init.pp
Warning: Param :foo -> Starting
Warning: Property :baz -> Starting
Warning: Param :bar -> Starting
Warning: Setting Property Class Variables
Warning: : Param :name -> Validating 'example_type_one'
Warning: : Param :name -> Munging 'example_type_one'
Warning: Provider: Initializing Classvars
Warning: Provider Initialization :name= 'example_type_one'
Warning: Provider Initialization :foo = ''
Warning: Provider Initialization :bar = ''
Warning: example_type_one: Property :baz -> Validating 'example_one_baz'
Warning: example_type_one: Property :baz -> :foo is ''
Warning: example_type_one: Property :baz -> :bar is ''
Warning: example_type_one: Param :foo -> Validating 'example_one_foo'
Warning: example_type_one: Param :foo -> Munging 'example_one_foo'
Warning: example_type_one: Param :foo -> :bar is ''
Warning: example_type_one: Param :bar -> Validating 'example_one_bar'
Warning: example_type_one: Param :bar -> Munging 'example_one_bar'
Warning: example_type_one: Param :bar -> :foo is 'example_one_foo'
Warning: example_type_one: Validating
Warning: example_type_one: Type Initializing
Warning: example_type_one: Number of Example_types in the catalog: '1'
Warning: : Param :name -> Validating 'example_type_two'
Warning: : Param :name -> Munging 'example_type_two'
Warning: Provider: Initializing Classvars
Warning: Provider Initialization :name= 'example_type_two'
Warning: Provider Initialization :foo = ''
Warning: Provider Initialization :bar = ''
Warning: example_type_two: Property :baz -> Validating 'example_two_baz'
Warning: example_type_two: Property :baz -> :foo is ''
Warning: example_type_two: Property :baz -> :bar is ''
Warning: example_type_two: Param :foo -> Validating 'example_two_foo'
Warning: example_type_two: Param :foo -> Munging 'example_two_foo'
Warning: example_type_two: Param :foo -> :bar is ''
Warning: example_type_two: Param :bar -> Validating 'example_two_bar'
Warning: example_type_two: Param :bar -> Munging 'example_two_bar'
Warning: example_type_two: Param :bar -> :foo is 'example_two_foo'
Warning: example_type_two: Validating
Warning: example_type_two: Type Initializing
Warning: example_type_two: Number of Example_types in the catalog: '2'
Warning: example_type_one: Type Finishing
Warning: example_type_two: Type Finishing
Warning: example_type_one: Autorequring
Warning: example_type_two: Autorequring
Warning: example_type_one: Provider: Property :baz -> getter
Warning: example_type_one: Property :baz -> insync?
Warning: example_type_one: Provider: Property :baz -> setter
Notice: /Stage[main]/Learning_custom_types/Example_type[example_type_one]/baz: baz changed 'system_baz' to 'example_one_baz'
Warning: example_type_one: Provider: flush
Warning: example_type_two: Provider: Property :baz -> getter
Warning: example_type_two: Property :baz -> insync?
Warning: example_type_two: Provider: Property :baz -> setter
Notice: /Stage[main]/Learning_custom_types/Example_type[example_type_two]/baz: baz changed 'system_baz' to 'example_two_baz'
Warning: example_type_two: Provider: flush
Warning: Provider: All Resource Application Complete
Warning: Provider: Destroying Classvars

This is based on the code at: https://github.com/onyxpoint/onyxpoint-learning_custom_types

Output Generated by setting up the learning_custom_types module (with that name), entering the directory, and running

puppet apply --basemodulepath=`pwd`/../ tests/init.pp
Warning: Param :foo -> Starting
Warning: Property :baz -> Starting
Warning: Param :bar -> Starting
Warning: Setting Property Class Variables
Warning: : Param :name -> Validating 'example_type_one'
Warning: : Param :name -> Munging 'example_type_one'
Warning: Provider: Initializing Classvars
Warning: Provider Initialization :name= 'example_type_one'
Warning: Provider Initialization :foo = ''
Warning: Provider Initialization :bar = ''
Warning: example_type_one: Property :baz -> Validating 'example_one_baz'
Warning: example_type_one: Property :baz -> :foo is ''
Warning: example_type_one: Property :baz -> :bar is ''
Warning: example_type_one: Param :foo -> Validating 'example_one_foo'
Warning: example_type_one: Param :foo -> Munging 'example_one_foo'
Warning: example_type_one: Param :foo -> :bar is ''
Warning: example_type_one: Param :bar -> Validating 'example_one_bar'
Warning: example_type_one: Param :bar -> Munging 'example_one_bar'
Warning: example_type_one: Param :bar -> :foo is 'example_one_foo'
Warning: example_type_one: Validating
Warning: example_type_one: Type Initializing
Warning: example_type_one: Number of Example_types in the catalog: '1'
Warning: : Param :name -> Validating 'example_type_two'
Warning: : Param :name -> Munging 'example_type_two'
Warning: Provider: Initializing Classvars
Warning: Provider Initialization :name= 'example_type_two'
Warning: Provider Initialization :foo = ''
Warning: Provider Initialization :bar = ''
Warning: example_type_two: Property :baz -> Validating 'example_two_baz'
Warning: example_type_two: Property :baz -> :foo is ''
Warning: example_type_two: Property :baz -> :bar is ''
Warning: example_type_two: Param :foo -> Validating 'example_two_foo'
Warning: example_type_two: Param :foo -> Munging 'example_two_foo'
Warning: example_type_two: Param :foo -> :bar is ''
Warning: example_type_two: Param :bar -> Validating 'example_two_bar'
Warning: example_type_two: Param :bar -> Munging 'example_two_bar'
Warning: example_type_two: Param :bar -> :foo is 'example_two_foo'
Warning: example_type_two: Validating
Warning: example_type_two: Type Initializing
Warning: example_type_two: Number of Example_types in the catalog: '2'
Warning: example_type_one: Type Finishing
Warning: example_type_two: Type Finishing
Warning: example_type_one: Autorequring file '/tmp/foo'
Warning: example_type_one: Autosubscribing file '/tmp/bar'
Warning: example_type_one: Autobeforing service 'foo_service'
Warning: example_type_one: Autonotifying exec 'run_me'
Warning: example_type_two: Autorequring file '/tmp/foo'
Warning: example_type_two: Autosubscribing file '/tmp/bar'
Warning: example_type_two: Autobeforing service 'foo_service'
Warning: example_type_two: Autonotifying exec 'run_me'
Warning: example_type_one: Provider: Property :baz -> getter
Warning: example_type_one: Property :baz -> insync?
Warning: example_type_one: Provider: Property :baz -> setter
Notice: /Stage[main]/Learning_custom_types/Example_type[example_type_one]/baz: baz changed 'system_baz' to 'example_one_baz'
Warning: example_type_one: Provider: flush
Warning: example_type_two: Provider: Property :baz -> getter
Warning: example_type_two: Property :baz -> insync?
Warning: example_type_two: Provider: Property :baz -> setter
Notice: /Stage[main]/Learning_custom_types/Example_type[example_type_two]/baz: baz changed 'system_baz' to 'example_two_baz'
Warning: example_type_two: Provider: flush
Warning: Provider: All Resource Application Complete
Warning: Provider: Destroying Classvars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment