gapi: langpuppet: Add initial implementation
This new entrypoint allows graph generation from both a Puppet manifest and a piece of mcl code. The GAPI implementation wraps the two existing GAPIs.
This commit is contained in:
9
examples/langpuppet/graph1.mcl
Normal file
9
examples/langpuppet/graph1.mcl
Normal file
@@ -0,0 +1,9 @@
|
||||
noop "puppet_first_handover" {}
|
||||
noop "puppet_second_handover" {}
|
||||
|
||||
print "first message" {}
|
||||
print "third message" {}
|
||||
|
||||
Print["first message"] -> Noop["puppet_first_handover"]
|
||||
|
||||
Noop["puppet_second_handover"] -> Print["third message"]
|
||||
10
examples/langpuppet/graph1.pp
Normal file
10
examples/langpuppet/graph1.pp
Normal file
@@ -0,0 +1,10 @@
|
||||
class mgmt_first_handover {}
|
||||
class mgmt_second_handover {}
|
||||
|
||||
include mgmt_first_handover, mgmt_second_handover
|
||||
|
||||
Class["mgmt_first_handover"]
|
||||
->
|
||||
notify { "second message": }
|
||||
->
|
||||
Class["mgmt_second_handover"]
|
||||
Reference in New Issue
Block a user