Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate defined types from DMR #174

Open
jairojunior opened this issue Jan 19, 2017 · 0 comments
Open

Generate defined types from DMR #174

jairojunior opened this issue Jan 19, 2017 · 0 comments

Comments

@jairojunior
Copy link
Collaborator

Wildfly has a detyped management API to manipulate Management Model that wildscribe.github.io uses to generate a documentation, but we could use to generate defined types for specific versions, for example:

The following resource https://wildscribe.github.io/Wildfly/10.0.0.Final/subsystem/messaging-activemq/server/jms-queue/index.html

would become:

# wildfly::messaging_activemq::jms_queue
#
# Defines a JMS queue.
#
# @param selector The queue selector. 
# @param durable Whether the queue is durable or not. 
# @param entries The jndi names the queue will be bound to. 
define wildfly::messaging_activemq::jms_queue(
  Variant[String, Array] entries, 
  Variant[String, Boolean] durable = undef, 
  String selector = undef) {

    content => {
      'entries'  => $entries,
      'durable'  => $durable,
      'selector' => $selector,
    }

    wildfly::resource { '/subsystem=messaging-activemq/server=default/jms-queue=${title}':
      content => $content,
    }
}

Challenges:

1 - Many resources would allow expressions (Pattern[\${\w+(\.\w*)*}]) as a value.
2 - A version prefix would be required, e.g wildfly::10_1_0::messaging_activemq::jms_queue instead of just wildfly::messaging_activemq::jms_queue. And something like wildfly::eap::7_0_0::messaging_activemq::jms_queue for EAP.

Another approach for 2 would be to have modules for specific distributions/versions with biemond-wildfly as a dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant