Browse files

joyent/node-workflow#52: Extract example from node-workflow and move …

…into its own repo.
  • Loading branch information...
0 parents commit 231e783aaf6c5af53cd9ac5098c29edf8e884c3d @kusor committed Mar 1, 2012
Showing with 2,391 additions and 0 deletions.
  1. +13 −0 .gitignore
  2. +9 −0 .gitmodules
  3. +30 −0 Makefile
  4. +50 −0 Makefile.deps
  5. +267 −0 Makefile.targ
  6. +74 −0 README.md
  7. +73 −0 api.js
  8. +22 −0 config.json.sample
  9. +1 −0 deps/javascriptlint
  10. +1 −0 deps/jsstyle
  11. +1 −0 deps/restdow
  12. +82 −0 module.js
  13. +73 −0 node.js
  14. +20 −0 package.json
  15. +118 −0 shared-workflow.js
  16. +106 −0 tools/bashstyle
  17. +138 −0 tools/jsl.node.conf
  18. +137 −0 tools/jsl.web.conf
  19. +85 −0 tools/npmfreeze.js
  20. +1,091 −0 tools/service_bundle.dtd.1
13 .gitignore
@@ -0,0 +1,13 @@
+node_modules
+var/*
+*.tar.gz
+*.tar.bz2
+*.log
+coverage
+docs/*.json
+docs/*.html
+build
+*.log
+*.json
+workflow-indentifier
+*.vim
9 .gitmodules
@@ -0,0 +1,9 @@
+[submodule "deps/restdow"]
+ path = deps/restdow
+ url = git://github.com/trentm/restdown.git
+[submodule "deps/javascriptlint"]
+ path = deps/javascriptlint
+ url = git://github.com/davepacheco/javascriptlint.git
+[submodule "deps/jsstyle"]
+ path = deps/jsstyle
+ url = git://github.com/davepacheco/jsstyle.git
30 Makefile
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+
+#
+# Tools
+#
+NPM := $(shell which npm)
+
+#
+# Files
+#
+JS_FILES := $(shell ls *.js)
+JSL_CONF_NODE = tools/jsl.node.conf
+JSL_FILES_NODE = $(JS_FILES)
+JSSTYLE_FILES = $(JS_FILES)
+JSSTYLE_FLAGS = -o indent=2,doxygen,unparenthesized-return=0
+
+#
+# Repo-specific targets
+#
+.PHONY: all
+all: check
+
+.PHONY: setup
+setup: $(NPM)
+ $(NPM) install
+
+include ./Makefile.deps
+include ./Makefile.targ
50 Makefile.deps
@@ -0,0 +1,50 @@
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+# Makefile.deps: Makefile for including common tools as dependencies
+#
+# This file is separate from Makefile.targ so that teams can choose
+# independently whether to use the common targets in Makefile.targ and the
+# common tools here.
+#
+
+#
+# javascriptlint
+#
+JSL_SCRIPT = deps/javascriptlint/build/install/jsl
+JSL = python2.6 $(JSL_SCRIPT)
+
+$(JSL_SCRIPT): | deps/javascriptlint/.git
+ cd deps/javascriptlint && make install
+
+deps/javascriptlint/.git:
+ git submodule update --init deps/javascriptlint
+
+#
+# jsstyle
+#
+JSSTYLE_SCRIPT = deps/jsstyle/jsstyle
+JSSTYLE = $(JSSTYLE_SCRIPT)
+
+deps/jsstyle/jsstyle:
+ git submodule update --init deps/jsstyle
+
+#
+# restdown
+#
+RESTDOWN = python deps/restdown/bin/restdown
+
+$(RESTDOWN): | deps/restdown/.git
+
+deps/restdown/.git:
+ git submodule update --init deps/restdown
+
+#
+# The restdown submodule should be updated before we build "docs".
+#
+docs: $(RESTDOWN)
+
+#
+# JSL and JSSTYLE must be around before we build "check".
+#
+check: $(JSL_SCRIPT) $(JSSTYLE)
267 Makefile.targ
@@ -0,0 +1,267 @@
+#
+# Copyright (c) 2012, Joyent, Inc. All rights reserved.
+#
+# Makefile.targ: common targets.
+#
+# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped
+# into other repos as-is without requiring any modifications. If you find
+# yourself changing this file, you should instead update the original copy in
+# eng.git and then update your repo to use the new version.
+#
+# This Makefile defines several useful targets and rules. You can use it by
+# including it from a Makefile that specifies some of the variables below.
+#
+# Targets defined in this Makefile:
+#
+# check Checks JavaScript files for lint and style
+# Checks bash scripts for syntax
+# Checks SMF manifests for validity against the SMF DTD
+#
+# clean Removes built files
+#
+# docs Builds restdown documentation in docs/
+#
+# prepush Depends on "check" and "test"
+#
+# test Does nothing (you should override this)
+#
+# xref Generates cscope (source cross-reference index)
+#
+# For details on what these targets are supposed to do, see the Joyent
+# Engineering Guide.
+#
+# To make use of these targets, you'll need to set some of these variables. Any
+# variables left unset will simply not be used.
+#
+# BASH_FILES Bash scripts to check for syntax
+# (paths relative to top-level Makefile)
+#
+# CLEAN_FILES Files to remove as part of the "clean" target. Note
+# that files generated by targets in this Makefile are
+# automatically included in CLEAN_FILES. These include
+# restdown-generated HTML and JSON files.
+#
+# DOC_FILES Restdown (documentation source) files. These are
+# assumed to be contained in "docs/", and must NOT
+# contain the "docs/" prefix.
+#
+# JSL_CONF_NODE Specify JavaScriptLint configuration files
+# JSL_CONF_WEB (paths relative to top-level Makefile)
+#
+# Node.js and Web configuration files are separate
+# because you'll usually want different global variable
+# configurations. If no file is specified, none is given
+# to jsl, which causes it to use a default configuration,
+# which probably isn't what you want.
+#
+# JSL_FILES_NODE JavaScript files to check with Node config file.
+# JSL_FILES_WEB JavaScript files to check with Web config file.
+#
+# SMF_MANIFESTS XML files to check for validity using the SMF DTD.
+#
+# You can also override these variables:
+#
+# BASH Path to bash (default: bash)
+#
+# JSL Path to JavaScriptLint (default: "jsl")
+#
+# JSL_FLAGS_NODE Additional flags to pass through to JSL
+# JSL_FLAGS_WEB
+# JSL_FLAGS
+#
+# JSSTYLE Path to jsstyle (default: jsstyle)
+#
+# JSSTYLE_FLAGS Additional flags to pass through to jsstyle
+#
+
+#
+# Defaults for the various tools we use.
+#
+BASH ?= bash
+BASHSTYLE ?= tools/bashstyle
+CP ?= cp
+CSCOPE ?= cscope
+JSL ?= jsl
+JSSTYLE ?= jsstyle
+MKDIR ?= mkdir -p
+MV ?= mv
+RESTDOWN ?= restdown
+RESTDOWN_FLAGS ?=
+RMTREE ?= rm -rf
+XMLLINT ?= xmllint --noout
+JSL_FLAGS ?= --nologo --nosummary
+
+#
+# Defaults for other fixed values.
+#
+SMF_DTD ?= tools/service_bundle.dtd.1
+
+BUILD = build
+CLEAN_FILES += $(BUILD)
+DOC_BUILD = $(BUILD)/docs/public
+
+#
+# Configure JSL_FLAGS_{NODE,WEB} based on JSL_CONF_{NODE,WEB}.
+#
+ifneq ($(origin JSL_CONF_NODE), undefined)
+ JSL_FLAGS_NODE += --conf=$(JSL_CONF_NODE)
+endif
+
+ifneq ($(origin JSL_CONF_WEB), undefined)
+ JSL_FLAGS_WEB += --conf=$(JSL_CONF_WEB)
+endif
+
+#
+# Targets. For descriptions on what these are supposed to do, see the
+# Joyent Engineering Guide.
+#
+# These recipes make heavy use of dynamically-created phony targets. The parent
+# Makefile defines a list of input files like BASH_FILES. We then say that each
+# of these files depends on a fake target called filename.bashchk, and then we
+# define a pattern rule for those targets that runs bash in check-syntax-only
+# mode. This mechanism has the nice properties that if you specify zero files,
+# the rule becomes a noop (unlike a single rule to check all bash files, which
+# would invoke bash with zero files), and you can check individual files from
+# the command line with "make filename.bashchk".
+#
+.PHONY: check-bash
+check-bash: $(BASH_FILES:%=%.bashchk) $(BASH_FILES:%=%.bashstyle)
+
+%.bashchk: %
+ $(BASH) -n $^
+
+%.bashstyle: %
+ $(BASHSTYLE) $^
+
+.PHONY: check-jsl check-jsl-node check-jsl-web
+check-jsl: check-jsl-node check-jsl-web
+
+check-jsl-node: $(JSL_FILES_NODE:%=%.jslnodechk)
+
+check-jsl-web: $(JSL_FILES_WEB:%=%.jslwebchk)
+
+%.jslnodechk: % $(JSL_SCRIPT)
+ $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_NODE) $<
+
+%.jslwebchk: % $(JSL_SCRIPT)
+ $(JSL) $(JSL_FLAGS) $(JSL_FLAGS_WEB) $<
+
+.PHONY: check-jsstyle
+check-jsstyle: $(JSSTYLE_FILES:%=%.jsstylechk)
+
+%.jsstylechk: % $(JSSTYLE_SCRIPT)
+ $(JSSTYLE) $(JSSTYLE_FLAGS) $<
+
+.PHONY: check-manifests
+check-manifests: $(SMF_MANIFESTS:%=%.smfchk)
+
+%.smfchk: %
+ $(XMLLINT) --path $(dir $(SMF_DTD)) --dtdvalid $(SMF_DTD) $^
+
+.PHONY: check
+check: check-jsl check-jsstyle check-bash check-manifests
+ @echo check ok
+
+.PHONY: clean
+clean:
+ -$(RMTREE) $(CLEAN_FILES)
+
+CSCOPE_FILES = cscope.in.out cscope.out cscope.po.out
+CLEAN_FILES += $(CSCOPE_FILES)
+
+.PHONY: xref
+xref: cscope.files
+ $(CSCOPE) -bqR
+
+.PHONY: cscope.files
+cscope.files:
+ find . -name '*.c' -o -name '*.h' -o -name '*.cc' -o -name '*.js' \
+ -o -name '*.s' -o -name '*.cpp' > $@
+
+#
+# The "docs" target is complicated because we do several things here:
+#
+# (1) Use restdown to build HTML and JSON files from each of DOC_FILES.
+#
+# (2) Copy these files into $(DOC_BUILD) (build/docs/public), which
+# functions as a complete copy of the documentation that could be
+# mirrored or served over HTTP.
+#
+# (3) Then copy any directories and media from docs/media into
+# $(DOC_BUILD)/media. This allows projects to include their own media,
+# including files that will override same-named files provided by
+# restdown.
+#
+# Step (3) is the surprisingly complex part: in order to do this, we need to
+# identify the subdirectories in docs/media, recreate them in
+# $(DOC_BUILD)/media, then do the same with the files.
+#
+DOC_MEDIA_DIRS := $(shell find docs/media -type d | grep -v "^docs/media$$")
+DOC_MEDIA_DIRS := $(DOC_MEDIA_DIRS:docs/media/%=%)
+DOC_MEDIA_DIRS_BUILD := $(DOC_MEDIA_DIRS:%=$(DOC_BUILD)/media/%)
+
+DOC_MEDIA_FILES := $(shell find docs/media -type f)
+DOC_MEDIA_FILES := $(DOC_MEDIA_FILES:docs/media/%=%)
+DOC_MEDIA_FILES_BUILD := $(DOC_MEDIA_FILES:%=$(DOC_BUILD)/media/%)
+
+#
+# Like the other targets, "docs" just depends on the final files we want to
+# create in $(DOC_BUILD), leveraging other targets and recipes to define how
+# to get there.
+#
+.PHONY: docs
+docs: \
+ $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.html) \
+ $(DOC_FILES:%.restdown=$(DOC_BUILD)/%.json) \
+ $(DOC_MEDIA_FILES_BUILD)
+
+#
+# We keep the intermediate files so that the next build can see whether the
+# files in DOC_BUILD are up to date.
+#
+.PRECIOUS: \
+ $(DOC_FILES:%.restdown=docs/%.html) \
+ $(DOC_FILES:%.restdown=docs/%json)
+
+#
+# We do clean those intermediate files, as well as all of DOC_BUILD.
+#
+CLEAN_FILES += \
+ $(DOC_BUILD) \
+ $(DOC_FILES:%.restdown=docs/%.html) \
+ $(DOC_FILES:%.restdown=docs/%.json)
+
+#
+# Before installing the files, we must make sure the directories exist. The |
+# syntax tells make that the dependency need only exist, not be up to date.
+# Otherwise, it might try to rebuild spuriously because the directory itself
+# appears out of date.
+#
+$(DOC_MEDIA_FILES_BUILD): | $(DOC_MEDIA_DIRS_BUILD)
+
+$(DOC_BUILD)/%: docs/% | $(DOC_BUILD)
+ $(CP) $< $@
+
+docs/%.json docs/%.html: docs/%.restdown | $(DOC_BUILD)
+ $(RESTDOWN) $(RESTDOWN_FLAGS) -m $(DOC_BUILD) $<
+
+$(DOC_BUILD):
+ $(MKDIR) $@
+
+info:
+ echo "DOC_MEDIA_FILES is '$(DOC_MEDIA_FILES)'"
+ echo "DOC_MEDIA_FILES_BUILD is '$(DOC_MEDIA_FILES_BUILD)'"
+
+$(DOC_MEDIA_DIRS_BUILD):
+ $(MKDIR) $@
+
+#
+# The default "test" target does nothing. This should usually be overridden by
+# the parent Makefile. It's included here so we can define "prepush" without
+# requiring the repo to define "test".
+#
+.PHONY: test
+test:
+
+.PHONY: prepush
+prepush: check test
74 README.md
@@ -0,0 +1,74 @@
+# Overview
+
+Usage examples for [node-workflow](http://kusor.github.com/node-workflow/).
+
+# Usage
+
+Pre-requirements:
+
+- Working Redis Server. (Version 2.4.+).
+
+# Clone the repo and build the deps:
+
+ git clone git://github.com/kusor/node-workflow-example.git
+ cd node-workflow
+ make all
+
+Note `make all` will setup all the required dependencies, node modules and run
+`make check`. In order to just setup node modules, `make setup` is enough.
+
+To run the Workflow API server:
+
+ ./bin/workflow-api path/to/config.json
+
+To run a Job Runner:
+
+ ./bin/workflow-runner path/to/config.json
+
+Note that it's perfectly fine to run more than one Runner, either on the same
+or different machines, as far as they have access to Redis Server.
+
+This repository contains everything needed to illustrate:
+
+- An example config file - `examples/config.json.sample` which should be
+ renamed to `examples/config.json` and modified to properly match your local
+ environment.
+
+Remember that, in order to process any `job` the `workflow-runner` needs
+to be initialized pointing to the aforementioned configuration file:
+
+ ./bin/workflow-runner examples/config.json
+
+Also, in order to be able to run the API based example mentioned below, the
+`workflow-api` HTTP server needs to be up and running too:
+
+ ./bin/workflow-api examples/config.json
+
+Contents for the other files are:
+
+- An example of how to use node-workflow as a node module in order to create
+ workflows, queue jobs and wait for the results. See `module.js`.
+- Also, an example of how to achieve same goal using Workflow API instead of
+ the node module. See `api.js`.
+- Both examples share the same workflow definition, contained at the file
+ `shared-workflow.js`. The beginning of the aforementioned files
+ can be useful to understand the differences when trying to create a workflow
+ using these different approaches.
+- Finally, this directory also contains a file `node.js` which does
+ exactly the same thing than the workflow/job does - create and star a gist
+ using your github's username and password - but straight from NodeJS. This
+ file is useful in order to understand the differences between writing code
+ to be executed by NodeJS directly, and using it to create workflows and the
+ associated tasks. Remember code withing tasks runs sandboxed using
+ [Node's VM API](http://nodejs.org/docs/latest/api/vm.html) and that tasks
+ are totally independent, and run each one on its own child process.
+
+# LICENSE
+
+The MIT License (MIT) Copyright (c) 2012 Pedro Palazón Candel
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
73 api.js
@@ -0,0 +1,73 @@
+// Copyright 2012 Pedro P. Candel <kusorbox@gmail.com>. All rights reserved.
+
+// Usage example for node-workflow using the REST API to create
+// workflows, queue jobs and obtain the results.
+
+// NOTE it needs `examples/wf-api.js` and `examples/wf-runner.js` running
+// before you run this file.
+
+// Call from parent directory with:
+// `node examples/api.js $login $password`
+
+if (process.argv.length < 4) {
+ console.error('Github username and password required as arguments');
+ process.exit(1);
+}
+
+var $login = process.argv[2],
+ $password = process.argv[3];
+
+var restify = require('restify'),
+ util = require('util'),
+ assert = require('assert');
+
+var client = restify.createJsonClient({
+ url: 'http://127.0.0.1:8080'
+});
+
+var aWorkflow = require('./shared-workflow');
+assert.ok(aWorkflow);
+
+// API needs everything being JSON, while node-module takes care of
+// this by itself so, stringify things here:
+aWorkflow.chain[0].body = aWorkflow.chain[0].body.toString();
+aWorkflow.chain[1].body = aWorkflow.chain[1].body.toString();
+aWorkflow.chain[1].fallback = aWorkflow.chain[1].fallback.toString();
+aWorkflow.onerror[0].body = aWorkflow.onerror[0].body.toString();
+
+client.post('/workflows', aWorkflow, function (err, req, res, wf) {
+ assert.ifError(err);
+ assert.ok(wf.uuid);
+ var aJob = {
+ target: '/gists',
+ workflow: wf.uuid,
+ login: $login,
+ password: $password
+ };
+ client.post('/jobs', aJob, function (err, req, res, job) {
+ assert.ifError(err);
+ assert.ok(job);
+ assert.equal(job.execution, 'queued');
+ assert.ok(job.uuid);
+ var intervalId = setInterval(function () {
+ client.get('/jobs/' + job.uuid, function (err, req, res, obj) {
+ assert.ifError(err);
+ if (obj.execution === 'queued') {
+ console.log('Job waiting to be processed');
+ } else if (obj.execution === 'running') {
+ console.log('Job in progress ...');
+ } else {
+ console.log('Job finished. Here come the results:');
+ console.log(util.inspect(obj, false, 8));
+ // Only one workflow with the same name, need to delete it to allow
+ // creating it again:
+ client.del('/workflows/' + wf.uuid, function (err, req, res, obj) {
+ assert.ifError(err);
+ clearInterval(intervalId);
+ process.exit(0);
+ });
+ }
+ });
+ }, 3000);
+ });
+});
22 config.json.sample
@@ -0,0 +1,22 @@
+{
+ "backend": {
+ "module": "../lib/workflow-redis-backend",
+ "opts": {
+ "port": 6379,
+ "host": "127.0.0.1",
+ "db": 14
+ }
+ },
+ "api": {
+ "port": 8080
+ },
+ "runner": {
+ "identifier": "cd925eef-93fb-4bfe-a820-2aaedf9fc006",
+ "forks": 10,
+ "run_interval": 60,
+ "sandbox": {
+ "restify": "restify",
+ "uuid": "node-uuid"
+ }
+ }
+}
1 deps/javascriptlint
@@ -0,0 +1 @@
+Subproject commit 5693fd3ce6f31f66f85bfde275ab64e609ea04d0
1 deps/jsstyle
@@ -0,0 +1 @@
+Subproject commit da42b50ceb12d431437b32efd4c411a8e2fac0c8
1 deps/restdow
@@ -0,0 +1 @@
+Subproject commit 315b7a4dc8477f9aef508e7ba8ee55b66347ab9f
82 module.js
@@ -0,0 +1,82 @@
+// Copyright 2012 Pedro P. Candel <kusorbox@gmail.com>. All rights reserved.
+
+// Usage example for node-workflow using it as a node module to create
+// workflows, queue jobs and obtain the results.
+
+// NOTE it needs `examples/wf-runner.js` running before you run this file.
+
+// Call from parent directory with:
+// `node examples/module.js $login $password`
+
+if (process.argv.length < 4) {
+ console.error('Github username and password required as arguments');
+ process.exit(1);
+}
+
+var $login = process.argv[2],
+ $password = process.argv[3];
+
+var util = require('util'),
+ assert = require('assert'),
+ path = require('path'),
+ fs = require('fs'),
+ Factory = require('../lib/index').Factory,
+ aWorkflow = require('./shared-workflow');
+
+aWorkflow.name = 'a gist created using node-workflow module';
+
+var config_file = path.normalize(__dirname + '/config.json');
+fs.readFile(config_file, 'utf8', function (err, data) {
+ if (err) {
+ throw err;
+ }
+
+ var config = JSON.parse(data),
+ Backend = require(config.backend.module),
+ backend = new Backend(config.backend.opts),
+ factory;
+
+ backend.init(function () {
+ factory = Factory(backend);
+ factory.workflow(aWorkflow, function (err, wf) {
+ assert.ifError(err);
+ assert.ok(wf);
+ var aJob = {
+ target: '/gists',
+ workflow: wf.uuid,
+ params: {
+ login: $login,
+ password: $password
+ }
+ };
+ factory.job(aJob, function (err, job) {
+ assert.ifError(err);
+ assert.ok(job);
+ assert.equal(job.execution, 'queued');
+ assert.ok(job.uuid);
+
+ var intervalId = setInterval(function () {
+ backend.getJob(job.uuid, function (err, obj) {
+ assert.ifError(err);
+ if (obj.execution === 'queued') {
+ console.log('Job waiting to be processed');
+ } else if (obj.execution === 'running') {
+ console.log('Job in progress ...');
+ } else {
+ console.log('Job finished. Here come the results:');
+ console.log(util.inspect(obj, false, 8));
+ // Only one workflow with the same name, need to delete it
+ // to allow creating it again:
+ backend.deleteWorkflow(wf, function (err, res) {
+ assert.ifError(err);
+ assert.ok(res);
+ clearInterval(intervalId);
+ process.exit(0);
+ });
+ }
+ });
+ }, 3000);
+ });
+ });
+ });
+});
73 node.js
@@ -0,0 +1,73 @@
+// Copyright 2012 Pedro P. Candel <kusorbox@gmail.com>. All rights reserved.
+
+// This is an example of the same gist API requests made straight from NodeJS
+// without using node-workflow, so differences can be quickly stablished with
+// the way to proceed to write workflow tasks
+
+if (process.argv.length < 4) {
+ console.error('Github username and password required as arguments');
+ process.exit(1);
+}
+
+var $login = process.argv[2],
+ $password = process.argv[3];
+
+var restify = require('restify'),
+ util = require('util');
+
+var client = restify.createJsonClient({
+ url: 'https://api.github.com'
+});
+
+client.basicAuth($login, $password);
+
+client.post('/gists', {
+ 'description': 'a gist created using node-workflow',
+ 'public': false,
+ 'files': {
+ 'example.json': {
+ 'content': JSON.stringify({
+ foo: 'bar',
+ bar: 'baz'
+ })
+ }
+ }
+}, function (err, req, res, obj) {
+ if (err) {
+ console.error(err.name + ': ' + err.body.message);
+ if (err.statusCode === 401) {
+ process.exit(1);
+ }
+ } else {
+ // res.statusCode === 201
+ // res.location === obj.url
+ // obj.url === client.url + req.path + '/' + obj.id
+ var gist = obj;
+ console.info('Gist object with id ' + gist.id + ' created');
+ client.get('/gists/' + gist.id + '/star', function (err, req, res, obj) {
+ console.log(util.inspect(err, false, 8));
+ console.log(util.inspect(obj, false, 8));
+ if (err) {
+ if (err.statusCode === 404) {
+ client.put(
+ '/gists/' + gist.id + '/star', {},
+ function (err, req, res, obj) {
+ if (err) {
+ console.error(err.name + ': ' + err.body.message);
+ process.exit(1);
+ } else {
+ console.info('Gist is starred: ' + gist.html_url);
+ process.exit(0);
+ }
+ });
+ } else {
+ console.error(err.name + ': ' + err.body.message);
+ process.exit(1);
+ }
+ } else {
+ console.info('Gist is starred: ' + gist.html_url);
+ process.exit(0);
+ }
+ });
+ }
+});
20 package.json
@@ -0,0 +1,20 @@
+{
+ "author": "Pedro Palazón Candel <kusorbox@gmail.com> (http://www.joyent.com)",
+ "name": "workflow-example",
+ "description": "Node Workflow usage examples",
+ "version": "0.1.0",
+ "homepage": "https://github.com/kusor/node-workflow-example",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/kusor/node-workflow-example.git"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "dependencies": {
+ "workflow": "0.1.0",
+ "workflow-redis-backend": "0.1.0",
+ "restify": "1.0.0"
+ },
+ "devDependencies": {}
+}
118 shared-workflow.js
@@ -0,0 +1,118 @@
+// Copyright 2012 Pedro P. Candel <kusorbox@gmail.com>. All rights reserved.
+
+// This is shared by api.js and module.js examples
+
+// This is not really needed, but javascriptlint will complain otherwise:
+var restify = require('restify');
+
+var workflow = module.exports = {
+ name: 'Sample workflow using gist API',
+ chain: [ {
+ name: 'Post gist',
+ timeout: 30,
+ retry: 1,
+ body: function (job, cb) {
+ if (!job.params.login || !job.params.password) {
+ return cb('No login/password provided');
+ }
+ var client = restify.createJsonClient({
+ url: 'https://api.github.com'
+ });
+ client.basicAuth(job.params.login, job.params.password);
+ return client.post('/gists', {
+ 'description': 'a gist created using node-workflow',
+ 'public': false,
+ 'files': {
+ 'example.json': {
+ 'content': JSON.stringify({
+ foo: 'bar',
+ bar: 'baz'
+ })
+ }
+ }
+ }, function (err, req, res, obj) {
+ if (err) {
+ return cb(err.name + ': ' + err.body.message);
+ } else {
+ job.gist_id = obj.id;
+ return cb(null, 'Gist created: ' + obj.html_url);
+ }
+ });
+ }
+ }, {
+ name: 'Get starred gist',
+ timeout: 60,
+ retry: 2,
+ body: function (job, cb) {
+ if (!job.params.login || !job.params.password) {
+ return cb('No login/password provided');
+ }
+ if (!job.gist_id) {
+ return cb('Unknown gist id');
+ }
+ var client = restify.createJsonClient({
+ url: 'https://api.github.com'
+ });
+ client.basicAuth(job.params.login, job.params.password);
+ return client.get(
+ '/gists/' + job.gist_id + '/star',
+ function (err, req, res, obj) {
+ // Indeed, there should be an error here, which will triger our
+ // fallback, where we'll add the star to our gist
+ if (err) {
+ return cb(err);
+ } else {
+ // It shouldn't be starred, but ...
+ return cb(null, 'What!?, gist was already starred');
+ }
+ });
+ },
+ fallback: function (err, job, cb) {
+ if (err.statusCode && err.statusCode === 404) {
+ // We know how to fix this: star it!:
+ var client = restify.createJsonClient({
+ url: 'https://api.github.com'
+ });
+ client.basicAuth(job.params.login, job.params.password);
+ return client.put(
+ '/gists/' + job.gist_id + '/star', {},
+ function (err, req, res, obj) {
+ if (err) {
+ return cb(err);
+ } else {
+ return cb(null, 'Gist starred!.');
+ }
+ });
+ } else {
+ return cb(err);
+ }
+ }
+ }],
+ timeout: 180,
+ onerror: [ {
+ name: 'Delete gist if exists',
+ body: function (job, cb) {
+ if (!job.params.login || !job.params.password) {
+ return cb('No login/password provided');
+ }
+ // If we created a gist and something failed later, let's remove it:
+ if (job.gist_id) {
+ var client = restify.createJsonClient({
+ url: 'https://api.github.com'
+ });
+ client.basicAuth(job.params.login, job.params.password);
+ return client.del(
+ '/gists/' + job.gist_id,
+ function (err, req, res, obj) {
+ if (err) {
+ return cb(err);
+ } else {
+ return cb('Cleanup done');
+ }
+ });
+ } else {
+ return cb('Nothing to cleanup');
+ }
+ }
+ }]
+};
106 tools/bashstyle
@@ -0,0 +1,106 @@
+#!/usr/bin/env node
+
+/*
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ *
+ * bashstyle: check bash scripts for adherence to style guidelines, including:
+ *
+ * o no lines longer than 80 characters
+ * o file does not end with a blank line
+ *
+ * Future enhancements could include:
+ * o indents consistent with respect to tabs, spaces
+ * o indents consistently sized (all are some multiple of the smallest
+ * indent, which must be a tab or 4 or 8 spaces)
+ */
+
+var mod_assert = require('assert');
+var mod_fs = require('fs');
+
+var nerrors = 0;
+
+main();
+process.exit(0);
+
+function main()
+{
+ var files = process.argv.slice(2);
+
+ if (files.length === 0) {
+ console.error('usage: %s file1 [...]',
+ process.argv.slice(0, 2).join(' '));
+ process.exit(2);
+ }
+
+ files.forEach(checkFile);
+
+ if (nerrors != 0)
+ process.exit(1);
+}
+
+function checkFile(filename)
+{
+ var text = mod_fs.readFileSync(filename, 'utf-8');
+ var lines = text.split('\n');
+ var i;
+
+ mod_assert.ok(lines.length > 0);
+
+ /*
+ * Expand tabs in each line and check for long lines.
+ */
+ for (i = 1; i <= lines.length; i++) {
+ var line = expandTabs(lines[i - 1]);
+
+ if (line.length > 80) {
+ nerrors++;
+ console.log('%s: %d: line exceeds 80 columns',
+ filename, i);
+ }
+ }
+
+ /*
+ * No sane editor lets you save a file without a newline at the very end.
+ */
+ if (lines[lines.length - 1].length !== 0) {
+ nerrors++;
+ console.log('%s: %d: file does not end with newline',
+ filename, lines.length);
+ }
+
+ /*
+ * Since the file will always end with a newline, the last entry of
+ * "lines" will actually be blank.
+ */
+ if (lines.length > 1 && lines[lines.length - 2].length === 0) {
+ nerrors++;
+ console.log('%s: %d: file ends with a blank line',
+ filename, lines.length - 1);
+ }
+}
+
+function expandTabs(text)
+{
+ var out = '';
+ var col = 0;
+ var j, k;
+
+ for (j = 0; j < text.length; j++) {
+ if (text[j] != '\t') {
+ out += text[j];
+ col++;
+ continue;
+ }
+
+ k = 8 - (col % 8);
+ col += k;
+
+ do {
+ out += ' ';
+ } while (--k > 0);
+
+ col += k;
+ }
+
+ return (out);
+}
138 tools/jsl.node.conf
@@ -0,0 +1,138 @@
+#
+# Configuration File for JavaScript Lint
+#
+# This configuration file can be used to lint a collection of scripts, or to enable
+# or disable warnings for scripts that are linted via the command line.
+#
+
+### Warnings
+# Enable or disable warnings based on requirements.
+# Use "+WarningName" to display or "-WarningName" to suppress.
+#
++ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent
++ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
++ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
++anon_no_return_value # anonymous function does not always return value
++assign_to_function_call # assignment to a function call
+-block_without_braces # block statement without curly braces
++comma_separated_stmts # multiple statements separated by commas (use semicolons?)
++comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
++default_not_at_end # the default case is not at the end of the switch statement
++dup_option_explicit # duplicate "option explicit" control comment
++duplicate_case_in_switch # duplicate case in switch statement
++duplicate_formal # duplicate formal argument {name}
++empty_statement # empty statement or extra semicolon
+-identifier_hides_another # identifer {name} hides an identifier in a parent scope
+-inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
++incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version.
++invalid_fallthru # unexpected "fallthru" control comment
++invalid_pass # unexpected "pass" control comment
++jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
++leading_decimal_point # leading decimal point may indicate a number or an object member
++legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
++meaningless_block # meaningless block; curly braces have no impact
++mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence
++misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
++missing_break # missing break statement
++missing_break_for_last_case # missing break statement for last case in switch
++missing_default_case # missing default case in switch statement
++missing_option_explicit # the "option explicit" control comment is missing
++missing_semicolon # missing semicolon
++missing_semicolon_for_lambda # missing semicolon for lambda assignment
++multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
++nested_comment # nested comment
++no_return_value # function {name} does not always return a value
++octal_number # leading zeros make an octal number
++parseint_missing_radix # parseInt missing radix parameter
++partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
++redeclared_var # redeclaration of {name}
++trailing_comma_in_array # extra comma is not recommended in array initializers
++trailing_decimal_point # trailing decimal point may indicate a number or an object member
++undeclared_identifier # undeclared identifier: {name}
++unreachable_code # unreachable code
+-unreferenced_argument # argument declared but never referenced: {name}
+-unreferenced_function # function is declared but never referenced: {name}
++unreferenced_variable # variable is declared but never referenced: {name}
++unsupported_version # JavaScript {version} is not supported
++use_of_label # use of label
++useless_assign # useless assignment
++useless_comparison # useless comparison; comparing identical expressions
+-useless_quotes # the quotation marks are unnecessary
++useless_void # use of the void type may be unnecessary (void is always undefined)
++var_hides_arg # variable {name} hides argument
++want_assign_or_call # expected an assignment or function call
++with_statement # with statement hides undeclared variables; use temporary variable instead
+
+
+### Output format
+# Customize the format of the error message.
+# __FILE__ indicates current file path
+# __FILENAME__ indicates current file name
+# __LINE__ indicates current line
+# __COL__ indicates current column
+# __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__)
+# __ERROR_NAME__ indicates error name (used in configuration file)
+# __ERROR_PREFIX__ indicates error prefix
+# __ERROR_MSG__ indicates error message
+#
+# For machine-friendly output, the output format can be prefixed with
+# "encode:". If specified, all items will be encoded with C-slashes.
+#
+# Visual Studio syntax (default):
++output-format __FILE__(__LINE__): __ERROR__
+# Alternative syntax:
+#+output-format __FILE__:__LINE__: __ERROR__
+
+
+### Context
+# Show the in-line position of the error.
+# Use "+context" to display or "-context" to suppress.
+#
++context
+
+
+### Control Comments
+# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
+# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
+# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
+# although legacy control comments are enabled by default for backward compatibility.
+#
+-legacy_control_comments
+
+
+### Defining identifiers
+# By default, "option explicit" is enabled on a per-file basis.
+# To enable this for all files, use "+always_use_option_explicit"
+-always_use_option_explicit
+
+# Define certain identifiers of which the lint is not aware.
+# (Use this in conjunction with the "undeclared identifier" warning.)
+#
+# Common uses for webpages might be:
++define __dirname
++define clearInterval
++define clearTimeout
++define console
++define exports
++define global
++define process
++define require
++define module
++define setInterval
++define setTimeout
++define Buffer
++define JSON
++define Math
+
+### JavaScript Version
+# To change the default JavaScript version:
+#+default-type text/javascript;version=1.5
+#+default-type text/javascript;e4x=1
+
+### Files
+# Specify which files to lint
+# Use "+recurse" to enable recursion (disabled by default).
+# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
+# or "+process Folder\Path\*.htm".
+#
+
137 tools/jsl.web.conf
@@ -0,0 +1,137 @@
+#
+# Configuration File for JavaScript Lint
+# Developed by Matthias Miller (http://www.JavaScriptLint.com)
+#
+# This configuration file can be used to lint a collection of scripts, or to enable
+# or disable warnings for scripts that are linted via the command line.
+#
+
+### Warnings
+# Enable or disable warnings based on requirements.
+# Use "+WarningName" to display or "-WarningName" to suppress.
+#
++ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent
++ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
++ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
++anon_no_return_value # anonymous function does not always return value
++assign_to_function_call # assignment to a function call
+-block_without_braces # block statement without curly braces
++comma_separated_stmts # multiple statements separated by commas (use semicolons?)
++comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
++default_not_at_end # the default case is not at the end of the switch statement
++dup_option_explicit # duplicate "option explicit" control comment
++duplicate_case_in_switch # duplicate case in switch statement
++duplicate_formal # duplicate formal argument {name}
++empty_statement # empty statement or extra semicolon
++identifier_hides_another # identifer {name} hides an identifier in a parent scope
++inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
++incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version.
++invalid_fallthru # unexpected "fallthru" control comment
++invalid_pass # unexpected "pass" control comment
++jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
++leading_decimal_point # leading decimal point may indicate a number or an object member
++legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
++meaningless_block # meaningless block; curly braces have no impact
++mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence
++misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
++missing_break # missing break statement
++missing_break_for_last_case # missing break statement for last case in switch
++missing_default_case # missing default case in switch statement
++missing_option_explicit # the "option explicit" control comment is missing
++missing_semicolon # missing semicolon
++missing_semicolon_for_lambda # missing semicolon for lambda assignment
++multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
++nested_comment # nested comment
++no_return_value # function {name} does not always return a value
++octal_number # leading zeros make an octal number
++parseint_missing_radix # parseInt missing radix parameter
++partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
++redeclared_var # redeclaration of {name}
++trailing_comma_in_array # extra comma is not recommended in array initializers
++trailing_decimal_point # trailing decimal point may indicate a number or an object member
++undeclared_identifier # undeclared identifier: {name}
++unreachable_code # unreachable code
++unreferenced_argument # argument declared but never referenced: {name}
++unreferenced_function # function is declared but never referenced: {name}
++unreferenced_variable # variable is declared but never referenced: {name}
++unsupported_version # JavaScript {version} is not supported
++use_of_label # use of label
++useless_assign # useless assignment
++useless_comparison # useless comparison; comparing identical expressions
++useless_quotes # the quotation marks are unnecessary
++useless_void # use of the void type may be unnecessary (void is always undefined)
++var_hides_arg # variable {name} hides argument
++want_assign_or_call # expected an assignment or function call
++with_statement # with statement hides undeclared variables; use temporary variable instead
+
+
+### Output format
+# Customize the format of the error message.
+# __FILE__ indicates current file path
+# __FILENAME__ indicates current file name
+# __LINE__ indicates current line
+# __COL__ indicates current column
+# __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__)
+# __ERROR_NAME__ indicates error name (used in configuration file)
+# __ERROR_PREFIX__ indicates error prefix
+# __ERROR_MSG__ indicates error message
+#
+# For machine-friendly output, the output format can be prefixed with
+# "encode:". If specified, all items will be encoded with C-slashes.
+#
+# Visual Studio syntax (default):
++output-format __FILE__(__LINE__): __ERROR__
+# Alternative syntax:
+#+output-format __FILE__:__LINE__: __ERROR__
+
+
+### Context
+# Show the in-line position of the error.
+# Use "+context" to display or "-context" to suppress.
+#
++context
+
+
+### Control Comments
+# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
+# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
+# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
+# although legacy control comments are enabled by default for backward compatibility.
+#
+-legacy_control_comments
+
+
+### Defining identifiers
+# By default, "option explicit" is enabled on a per-file basis.
+# To enable this for all files, use "+always_use_option_explicit"
++always_use_option_explicit
+
+# Define certain identifiers of which the lint is not aware.
+# (Use this in conjunction with the "undeclared identifier" warning.)
+#
+# Common uses for webpages might be:
++define JSON
++define Math
++define $
++define XMLHttpRequest
++define alert
++define clearInterval
++define clearTimeout
++define confirm
++define document
++define setInterval
++define setTimeout
++define window
+
+### JavaScript Version
+# To change the default JavaScript version:
+#+default-type text/javascript;version=1.5
+#+default-type text/javascript;e4x=1
+
+### Files
+# Specify which files to lint
+# Use "+recurse" to enable recursion (disabled by default).
+# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
+# or "+process Folder\Path\*.htm".
+#
+
85 tools/npmfreeze.js
@@ -0,0 +1,85 @@
+#!/usr/bin/env node
+// -*- mode: js -*-
+//
+// Copyright (c) 2012, Joyent, Inc. All rights reserved.
+//
+// Generate a "dependencies" block for a top-level package.json that includes
+// the explicit versions for all recursive npm modules. See "Method 3" in
+// <https://head.no.de/docs/eng> for why this is interesting.
+//
+// Usage:
+// find . -name "package.json" | xargs ./tools/npmfreeze.js
+//
+// If two parts of the node_modules tree includes separate versions of a
+// particular module, then the greater version is used.
+
+var fs = require('fs');
+var semver = require('semver');
+var spawn = require('child_process').spawn;
+
+
+///--- Globals
+var deps = {};
+
+
+///--- Helpers
+
+function done() {
+ console.log(JSON.stringify(deps, null, 2));
+}
+
+
+function waitForDone() {
+ process.nextTick(function() {
+ if (wait === 0)
+ return done();
+
+ return waitForDone();
+ });
+}
+
+
+///--- Main
+
+process.argv.slice(2).forEach(function(fname) {
+ var pkg = JSON.parse(fs.readFileSync(fname, 'utf8'));
+ if (!pkg.dependencies)
+ return;
+
+ var tmp = pkg.dependencies;
+ Object.keys(tmp).forEach(function(dep) {
+ if (!deps[dep] || semver.gt(tmp[dep], deps[dep]))
+ deps[dep] = semver.clean(tmp[dep]) || '*';
+ });
+});
+
+// Make a pass and clean up all the '*'
+var wait = 0;
+Object.keys(deps).forEach(function(k) {
+ if (deps[k] !== '*')
+ return;
+
+ wait++;
+ var npm = spawn('npm', ['info', k]);
+ var json = '';
+ npm.stdout.on('data', function(data) {
+ if (data)
+ json += data;
+ });
+
+ npm.stdout.on('end', function(code) {
+ if (code) {
+ console.error('npm info %s exited: %d', k, code);
+ process.exit(code);
+ }
+
+ var val;
+ eval('val = ' + json);
+
+ deps[k] = val['dist-tags'].latest;
+ wait--;
+ });
+});
+
+return (wait === 0 ? done() : waitForDone());
+
1,091 tools/service_bundle.dtd.1
@@ -0,0 +1,1091 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+
+ CDDL HEADER START
+
+ The contents of this file are subject to the terms of the
+ Common Development and Distribution License (the "License").
+ You may not use this file except in compliance with the License.
+
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ or http://www.opensolaris.org/os/licensing.
+ See the License for the specific language governing permissions
+ and limitations under the License.
+
+ When distributing Covered Code, include this CDDL HEADER in each
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ If applicable, add the following below this CDDL HEADER, with the
+ fields enclosed by brackets "[]" replaced with your own identifying
+ information: Portions Copyright [yyyy] [name of copyright owner]
+
+ CDDL HEADER END
+-->
+
+<!--
+ Service description DTD
+
+ Most attributes are string values (or an individual string from a
+ restricted set), but attributes with a specific type requirement are
+ noted in the comment describing the element.
+-->
+
+<!--
+ XInclude support
+
+ A series of service bundles may be composed via the xi:include tag.
+ smf(5) tools enforce that all bundles be of the same type.
+-->
+
+<!--
+ These entities are used for the property, propval and property_group
+ elements, that require type attributes for manifest, while for profiles
+ the type attributes are only implied.
+-->
+
+<!ENTITY % profile "IGNORE">
+<!ENTITY % manifest "INCLUDE">
+
+<!ELEMENT xi:include
+ (xi:fallback)
+ >
+<!ATTLIST xi:include
+ href CDATA #REQUIRED
+ parse (xml|text) "xml"
+ encoding CDATA #IMPLIED
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
+ >
+
+<!ELEMENT xi:fallback
+ ANY
+ >
+<!ATTLIST xi:fallback
+ xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
+ >
+
+<!--
+ stability
+
+ This element associates an SMI stability level with the parent
+ element. See attributes(5) for an explanation of interface
+ stability levels.
+
+ Its attribute is
+
+ value The stability level of the parent element.
+-->
+
+<!ELEMENT stability EMPTY>
+
+<!ATTLIST stability
+ value ( Standard | Stable | Evolving | Unstable |
+ External | Obsolete ) #REQUIRED >
+
+<!-- Property value lists -->
+
+<!--
+ value_node
+
+ This element represents a single value within any of the typed
+ property value lists.
+
+ Its attribute is
+
+ value The value for this node in the list.
+-->
+
+<!ELEMENT value_node EMPTY>
+
+<!ATTLIST value_node
+ value CDATA #REQUIRED>
+
+<!--
+ count_list
+ integer_list
+ opaque_list
+ host_list
+ hostname_list
+ net_address_list
+ net_address_v4_list
+ net_address_v6_list
+ time_list
+ astring_list
+ ustring_list
+ boolean_list
+ fmri_list
+ uri_list
+
+ These elements represent the typed lists of values for a property.
+ Each contains one or more value_node elements representing each
+ value on the list.
+
+ None of these elements has attributes.
+-->
+
+<!ELEMENT count_list
+ ( value_node+ )>
+
+<!ATTLIST count_list>
+
+<!ELEMENT integer_list
+ ( value_node+ )>
+
+<!ATTLIST integer_list>
+
+<!ELEMENT opaque_list
+ ( value_node+ )>
+
+<!ATTLIST opaque_list>
+
+<!ELEMENT host_list
+ ( value_node+ )>
+
+<!ATTLIST host_list>
+
+<!ELEMENT hostname_list
+ ( value_node+ )>
+
+<!ATTLIST hostname_list>
+
+<!ELEMENT net_address_list
+ ( value_node+ )>
+
+<!ATTLIST net_address_list>
+
+<!ELEMENT net_address_v4_list
+ ( value_node+ )>
+
+<!ATTLIST net_address_v4_list>
+
+<!ELEMENT net_address_v6_list
+ ( value_node+ )>
+
+<!ATTLIST net_address_v6_list>
+
+<!ELEMENT time_list
+ ( value_node+ )>
+
+<!ATTLIST time_list>
+
+<!ELEMENT astring_list
+ ( value_node+ )>
+
+<!ATTLIST astring_list>
+
+<!ELEMENT ustring_list
+ ( value_node+ )>
+
+<!ATTLIST ustring_list>
+
+<!ELEMENT boolean_list
+ ( value_node+ )>
+
+<!ATTLIST boolean_list>
+
+<!ELEMENT fmri_list
+ ( value_node+ )>
+
+<!ATTLIST fmri_list>
+
+<!ELEMENT uri_list
+ ( value_node+ )>
+
+<!ATTLIST uri_list>
+
+<!-- Properties and property groups -->
+
+<!--
+ property
+
+ This element is for a singly or multiply valued property within a
+ property group. It contains an appropriate value list element,
+ which is expected to be consistent with the type attribute.
+
+ Its attributes are
+
+ name The name of this property.
+
+ type The data type for this property.
+
+ override These values should replace values already in the
+ repository.
+-->
+
+<![%profile;[
+<!ELEMENT property
+ ( count_list | integer_list | opaque_list | host_list | hostname_list |
+ net_address_list | net_address_v4_list | net_address_v6_list |
+ time_list | astring_list | ustring_list | boolean_list | fmri_list |
+ uri_list )? >
+
+<!ATTLIST property
+ name CDATA #REQUIRED
+ type ( count | integer | opaque | host | hostname |
+ net_address | net_address_v4 | net_address_v6 | time |
+ astring | ustring | boolean | fmri | uri ) #IMPLIED
+ override ( true | false ) "false" >
+]]>
+
+<![%manifest;[
+<!ELEMENT property
+ ( count_list | integer_list | opaque_list | host_list | hostname_list |
+ net_address_list | net_address_v4_list | net_address_v6_list |
+ time_list | astring_list | ustring_list | boolean_list | fmri_list |
+ uri_list )? >
+
+<!ATTLIST property
+ name CDATA #REQUIRED
+ type ( count | integer | opaque | host | hostname |
+ net_address | net_address_v4 | net_address_v6 | time |
+ astring | ustring | boolean | fmri | uri ) #REQUIRED
+ override ( true | false ) "false" >
+]]>
+
+<!--
+ propval
+
+ This element is for a singly valued property within a property
+ group. List-valued properties must use the property element above.
+
+ Its attributes are
+
+ name The name of this property.
+
+ type The data type for this property.
+
+ value The value for this property. Must match type
+ restriction of type attribute.
+
+ override This value should replace any values already in the
+ repository.
+-->
+
+<![%profile;[
+<!ELEMENT propval EMPTY>
+
+<!ATTLIST propval
+ name CDATA #REQUIRED
+ type ( count | integer | opaque | host | hostname |
+ net_address | net_address_v4 | net_address_v6 | time |
+ astring | ustring | boolean | fmri | uri ) #IMPLIED
+ value CDATA #REQUIRED
+ override ( true | false ) "false" >
+]]>
+
+<![%manifest;[
+<!ELEMENT propval EMPTY>
+
+<!ATTLIST propval
+ name CDATA #REQUIRED
+ type ( count | integer | opaque | host | hostname |
+ net_address | net_address_v4 | net_address_v6 | time |
+ astring | ustring | boolean | fmri | uri ) #REQUIRED
+ value CDATA #REQUIRED
+ override ( true | false ) "false" >
+]]>
+
+<!--
+ property_group
+
+ This element is for a set of related properties on a service or
+ instance. It contains an optional stability element, as well as
+ zero or more property-containing elements.
+
+ Its attributes are
+
+ name The name of this property group.
+
+ type A category for this property group. Groups of type
+ "framework", "implementation" or "template" are primarily
+ of interest to the service management facility, while
+ groups of type "application" are expected to be only of
+ interest to the service to which this group is attached.
+ Other types may be introduced using the service symbol
+ namespace conventions.
+
+ delete If in the repository, this property group should be removed.
+-->
+
+<![%profile;[
+<!ELEMENT property_group
+ ( stability?, ( propval | property )* )>
+
+<!ATTLIST property_group
+ name CDATA #REQUIRED
+ type CDATA #IMPLIED
+ delete ( true | false ) "false" >
+]]>
+
+<![%manifest;[
+<!ELEMENT property_group
+ ( stability?, ( propval | property )* )>
+
+<!ATTLIST property_group
+ name CDATA #REQUIRED
+ type CDATA #REQUIRED
+ delete ( true | false ) "false" >
+]]>
+
+<!--
+ service_fmri
+
+ This element defines a reference to a service FMRI (for either a
+ service or an instance).
+
+ Its attribute is
+
+ value The FMRI.
+-->
+
+<!ELEMENT service_fmri EMPTY>
+
+<!ATTLIST service_fmri
+ value CDATA #REQUIRED>
+
+<!-- Dependencies -->
+
+<!--
+ dependency
+
+ This element identifies a group of FMRIs upon which the service is
+ in some sense dependent. Its interpretation is left to the
+ restarter to which a particular service instance is delegated. It
+ contains a group of service FMRIs, as well as a block of properties.
+
+ Its attributes are
+
+ name The name of this dependency.
+
+ grouping The relationship between the various FMRIs grouped
+ here; "require_all" of the FMRIs to be online, "require_any"
+ of the FMRIs to be online, or "exclude_all" of the FMRIs
+ from being online or in maintenance for the dependency to
+ be satisfied. "optional_all" dependencies are satisfied
+ when all of the FMRIs are either online or unable to come
+ online (because they are disabled, misconfigured, or one
+ of their dependencies is unable to come online).
+
+ restart_on The type of events from the FMRIs that the service should
+ be restarted for. "error" restarts the service if the
+ dependency is restarted due to hardware fault. "restart"
+ restarts the service if the dependency is restarted for
+ any reason, including hardware fault. "refresh" restarts
+ the service if the dependency is refreshed or restarted for
+ any reason. "none" will never restart the service due to
+ dependency state changes.
+
+ type The type of dependency: on another service ('service'), on
+ a filesystem path ('path'), or another dependency type.
+
+ delete This dependency should be deleted.
+-->
+
+<!ELEMENT dependency
+ ( service_fmri*, stability?, ( propval | property )* ) >
+
+<!ATTLIST dependency
+ name CDATA #REQUIRED
+ grouping ( require_all | require_any | exclude_all |
+ optional_all ) #REQUIRED
+ restart_on ( error | restart | refresh | none ) #REQUIRED
+ type CDATA #REQUIRED
+ delete ( true | false ) "false" >
+
+<!-- Dependents -->
+
+<!--
+ dependent
+
+ This element identifies a service which should depend on this service. It
+ corresponds to a dependency in the named service. The grouping and type
+ attributes of that dependency are implied to be "require_all" and
+ "service", respectively.
+
+ Its attributes are
+
+ name The name of the dependency property group to create in the
+ dependent entity.
+
+ grouping The grouping relationship of the dependency property
+ group to create in the dependent entity. See "grouping"
+ attribute on the dependency element.
+
+ restart_on The type of events from this service that the named service
+ should be restarted for.
+
+ delete True if this dependent should be deleted.
+
+ override Whether to replace an existing dependent of the same name.
+
+-->
+
+<!ELEMENT dependent
+ ( service_fmri, stability?, ( propval | property )* ) >
+
+<!ATTLIST dependent
+ name CDATA #REQUIRED
+ grouping ( require_all | require_any | exclude_all |
+ optional_all) #REQUIRED
+ restart_on ( error | restart | refresh | none) #REQUIRED
+ delete ( true | false ) "false"
+ override ( true | false ) "false" >
+
+<!-- Method execution context, security profile, and credential definitions -->
+
+<!--
+ envvar
+
+ An environment variable. It has two attributes:
+
+ name The name of the environment variable.
+ value The value of the environment variable.
+-->
+
+<!ELEMENT envvar EMPTY>
+
+<!ATTLIST envvar
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED >
+
+<!--
+ method_environment
+
+ This element defines the environment for a method. It has no
+ attributes, and one or more envvar child elements.
+-->
+
+<!ELEMENT method_environment (envvar+) >
+
+<!ATTLIST method_environment>
+
+<!--
+ method_profile
+
+ This element indicates which exec_attr(5) profile applies to the
+ method context being defined.
+
+ Its attribute is
+
+ name The name of the profile.
+-->
+
+<!ELEMENT method_profile EMPTY>
+
+<!ATTLIST method_profile
+ name CDATA #REQUIRED >
+
+<!--
+ method_credential
+
+ This element specifies credential attributes for the execution
+ method to use.
+
+ Its attributes are
+
+ user The user ID, in numeric or text form.
+
+ group The group ID, in numeric or text form. If absent or
+ ":default", the group associated with the user in the
+ passwd database.
+
+ supp_groups Supplementary group IDs to be associated with the
+ method, separated by commas or spaces. If absent or
+ ":default", initgroups(3C) will be used.
+
+ privileges An optional string specifying the privilege set.
+
+ limit_privileges An optional string specifying the limit
+ privilege set.
+-->
+
+<!ELEMENT method_credential EMPTY>
+
+<!ATTLIST method_credential
+ user CDATA #REQUIRED
+ group CDATA #IMPLIED
+ supp_groups CDATA #IMPLIED
+ privileges CDATA #IMPLIED
+ limit_privileges CDATA #IMPLIED >
+
+<!--
+ method_context
+
+ This element combines credential and resource management attributes
+ for execution methods. It may contain a method_environment, or
+ a method_profile or method_credential element.
+
+ Its attributes are
+
+ working_directory The home directory to launch the method from.
+ ":default" can be used as a token to indicate use of the
+ user specified by the credential or profile specified.
+
+ project The project ID, in numeric or text form. ":default" can
+ be used as a token to indicate use of the project
+ identified by getdefaultproj(3PROJECT) for the non-root
+ user specified by the credential or profile specified.
+ If the user is root, ":default" designates the project
+ the restarter is running in.
+
+ resource_pool The resource pool name to launch the method on.
+ ":default" can be used as a token to indicate use of the
+ pool specified in the project(4) entry given in the
+ "project" attribute above.
+-->
+<!ELEMENT method_context
+ ( (method_profile | method_credential)?, method_environment? ) >
+
+<!ATTLIST method_context
+ working_directory CDATA #IMPLIED
+ project CDATA #IMPLIED
+ resource_pool CDATA #IMPLIED >
+
+<!-- Restarter delegation, methods, and monitors -->
+
+<!--
+ exec_method
+
+ This element describes one of the methods used by the designated
+ restarter to act on the service instance. Its interpretation is
+ left to the restarter to which a particular service instance is
+ delegated. It contains a set of attributes, an optional method
+ context, and an optional stability element for the optional
+ properties that can be included.
+
+ Its attributes are
+
+ type The type of method, either "method" or "monitor".
+
+ name Name of this execution method. The method names are
+ usually a defined interface of the restarter to which an
+ instance of this service is delegated.
+
+ exec The string identifying the action to take. For
+ svc.startd(1M), this is a string suitable to pass to
+ exec(2).
+
+ timeout_seconds [integer] Duration, in seconds, to wait for this
+ method to complete. A '0' or '-1' denotes an infinite
+ timeout.
+
+ delete If in the repository, the property group for this method
+ should be removed.
+-->
+
+<!ELEMENT exec_method
+ ( method_context?, stability?, ( propval | property )* ) >
+
+<!ATTLIST exec_method
+ type ( method | monitor ) #REQUIRED
+ name CDATA #REQUIRED
+ exec CDATA #REQUIRED
+ timeout_seconds CDATA #REQUIRED
+ delete ( true | false ) "false" >
+
+<!--
+ restarter
+
+ A flag element identifying the restarter to which this service or
+ service instance is delegated. Contains the FMRI naming the
+ delegated restarter.
+
+ This element has no attributes.
+-->
+
+<!ELEMENT restarter
+ ( service_fmri ) >
+
+<!ATTLIST restarter>
+
+<!--
+ Templates
+-->
+
+<!--
+ doc_link
+
+ The doc_link relates a resource described by the given URI to the
+ service described by the containing template. The resource is
+ expected to be a documentation or elucidatory reference of some
+ kind.
+
+ Its attributes are
+
+ name A label for this resource.
+
+ uri A URI to the resource.
+-->
+
+<!ELEMENT doc_link EMPTY>
+
+<!ATTLIST doc_link
+ name CDATA #REQUIRED
+ uri CDATA #REQUIRED >
+
+<!--
+ manpage
+
+ The manpage element connects the reference manual page to the
+ template's service.
+
+ Its attributes are
+
+ title The manual page title.
+
+ section The manual page's section.
+
+ manpath The MANPATH environment variable, as described in man(1)
+ that is required to reach the named manual page
+-->
+
+<!ELEMENT manpage EMPTY>
+
+<!ATTLIST manpage
+ title CDATA #REQUIRED
+ section CDATA #REQUIRED
+ manpath CDATA ":default" >
+
+<!--
+ documentation
+
+ The documentation element groups an arbitrary number of doc_link
+ and manpage references.
+
+ It has no attributes.
+-->
+
+<!ELEMENT documentation
+ ( doc_link | manpage )* >
+
+<!ATTLIST documentation>
+
+<!--
+ loctext
+
+ The loctext element is a container for localized text.
+
+ Its sole attribute is
+
+ xml:lang The name of the locale, in the form accepted by LC_ALL,
+ etc. See locale(5).
+-->
+<!ELEMENT loctext
+ (#PCDATA) >
+
+<!ATTLIST loctext
+ xml:lang CDATA #REQUIRED >
+
+<!--
+ description
+
+ The description holds a set of potentially longer, localized strings that
+ consist of a short description of the service.
+
+ The description has no attributes.
+-->
+<!ELEMENT description
+ ( loctext+ ) >
+
+<!ATTLIST description>
+
+<!--
+ common_name
+
+ The common_name holds a set of short, localized strings that
+ represent a well-known name for the service in the given locale.
+
+ The common_name has no attributes.
+-->
+<!ELEMENT common_name
+ ( loctext+ ) >
+
+<!ATTLIST common_name>
+
+<!--
+ units
+
+ The units a numerical property is expressed in.
+-->
+
+<!ELEMENT units
+ ( loctext+ ) >
+
+<!ATTLIST units>
+
+<!--
+ visibility
+
+ Expresses how a property is typically accessed. This isn't
+ intended as access control, but as an indicator as to how a
+ property is used.
+
+ Its attributes are:
+
+ value 'hidden', 'readonly', or 'readwrite' indicating that
+ the property should be hidden from the user, shown but
+ read-only, or modifiable.
+-->
+
+<!ELEMENT visibility EMPTY>
+
+<!ATTLIST visibility
+ value ( hidden | readonly | readwrite ) #REQUIRED >
+
+<!--
+ value
+
+ Describes a legal value for a property value, and optionally contains a
+ human-readable name and description for the specified property
+ value.
+
+ Its attributes are:
+
+ name A string representation of the value.
+-->
+
+<!ELEMENT value
+ ( common_name?, description? ) >
+
+<!ATTLIST value
+ name CDATA #REQUIRED >
+
+<!--
+ values
+
+ Human-readable names and descriptions for valid values of a property.
+-->
+
+<!ELEMENT values
+ (value+) >
+
+<!ATTLIST values>
+
+<!--
+ cardinality
+
+ Places a constraint on the number of values the property can take
+ on.
+
+ Its attributes are:
+ min minimum number of values
+ max maximum number of values
+
+ Both attributes are optional. If min is not specified, it defaults to
+ 0. If max is not specified it indicates an unlimited number of values.
+ If neither is specified this indicates 0 or more values.
+-->
+
+<!ELEMENT cardinality EMPTY>
+
+<!ATTLIST cardinality
+ min CDATA "0"
+ max CDATA "18446744073709551615">
+
+<!--
+ internal_separators
+
+ Indicates the separators used within a property's value used to
+ separate the actual values. Used in situations where multiple
+ values are packed into a single property value instead of using a
+ multi-valued property.
+-->
+
+<!ELEMENT internal_separators
+ (#PCDATA) >
+
+<!ATTLIST internal_separators>
+
+<!--
+ range
+
+ Indicates a range of possible integer values.
+
+ Its attributes are:
+
+ min The minimum value of the range (inclusive).
+ max The maximum value of the range (inclusive).
+-->
+
+<!ELEMENT range EMPTY>
+
+<!ATTLIST range
+ min CDATA #REQUIRED
+ max CDATA #REQUIRED >
+
+<!--
+ constraints
+
+ Provides a set of constraints on the values a property can take on.
+-->
+
+<!ELEMENT constraints
+ ( value*, range* ) >
+<!ATTLIST constraints>
+
+<!--
+ include_values
+
+ Includes an entire set of values in the choices block.
+
+ Its attributes are:
+
+ type Either "constraints" or "values", indicating an
+ inclusion of all values allowed by the property's
+ constraints or all values for which there are
+ human-readable names and descriptions, respectively.
+-->
+
+<!ELEMENT include_values EMPTY>
+
+<!ATTLIST include_values
+ type ( constraints | values ) #REQUIRED >
+
+<!--
+ choices
+
+ Provides a set of common choices for the values a property can take
+ on. Useful in those cases where the possibilities are unenumerable
+ or merely inconveniently legion, and a manageable subset is desired
+ for presentation in a user interface.
+-->
+
+<!ELEMENT choices
+ ( value*, range*, include_values* ) >
+
+<!ATTLIST choices>
+
+<!--
+ prop_pattern
+
+
+ The prop_pattern describes one property of the enclosing property group
+ pattern.
+
+ Its attributes are:
+
+ name The property's name.
+ type The property's type.
+ required
+ If the property group is present, this property is required.
+
+ type can be omitted if required is false.
+-->
+
+<!ELEMENT prop_pattern
+ ( common_name?, description?, units?, visibility?, cardinality?,
+ internal_separators?, values?, constraints?, choices? ) >
+
+<!ATTLIST prop_pattern
+ name CDATA #REQUIRED
+ type ( count | integer | opaque | host | hostname |
+ net_address | net_address_v4 | net_address_v6 | time |
+ astring | ustring | boolean | fmri | uri ) #IMPLIED
+ required ( true | false ) "false" >
+
+<!--
+ pg_pattern
+
+ The pg_pattern describes one property group.
+ Depending on the element's attributes, these descriptions may apply
+ to just the enclosing service/instance, instances of the enclosing
+ service, delegates of the service (assuming it is a restarter), or
+ all services.
+
+ Its attributes are:
+
+ name The property group's name. If not specified, it
+ matches all property groups with the specified type.
+ type The property group's type. If not specified, it
+ matches all property groups with the specified name.
+ required
+ If the property group is required.
+ target The scope of the pattern, which may be all, delegate,
+ instance, or this. 'all' is reserved for framework use
+ and applies the template to all services on the system.
+ 'delegate' is reserved for restarters, and means the
+ template applies to all services which use the restarter.
+ 'this' would refer to the defining service or instance.
+ 'instance' can only be used in a service's template block,
+ and means the definition applies to all instances of this
+ service.
+
+-->
+
+<!ELEMENT pg_pattern
+ ( common_name?, description?, prop_pattern* ) >
+
+<!ATTLIST pg_pattern
+ name CDATA ""
+ type CDATA ""
+ required ( true | false ) "false"
+ target ( this | instance | delegate | all ) "this" >
+
+<!--
+ template
+
+ The template contains a collection of metadata about the service.
+ It contains a localizable string that serves as a common,
+ human-readable name for the service. (This name should be less than
+ 60 characters in a single byte locale.) The template may optionally
+ contain a longer localizable description of the service, a
+ collection of links to documentation, either in the form of manual
+ pages or in the form of URI specifications to external documentation
+ sources (such as docs.sun.com).
+
+ The template has no attributes.
+-->
+<!ELEMENT template
+ ( common_name, description?, documentation?, pg_pattern* ) >
+
+<!ATTLIST template>
+
+<!-- Notification Parameters -->
+
+<!ELEMENT paramval EMPTY>
+
+<!ATTLIST paramval
+ name CDATA #REQUIRED
+ value CDATA #REQUIRED>
+
+<!ELEMENT parameter
+ ( value_node* )>
+
+<!ATTLIST parameter
+ name CDATA #REQUIRED>
+
+<!ELEMENT event EMPTY>
+
+<!ATTLIST event
+ value CDATA #REQUIRED>
+
+<!ELEMENT type
+ ( ( parameter | paramval )* )>
+
+<!ATTLIST type
+ name CDATA #REQUIRED
+ active ( true | false ) "true" >
+
+<!--
+ notification parameters
+
+ This element sets the notification parameters for Software Events and
+ Fault Management problem lifecycle events.
+-->
+
+<!ELEMENT notification_parameters
+ ( event, type+ )>
+
+<!ATTLIST notification_parameters>
+
+<!-- Services and instances -->
+
+<!--
+ create_default_instance
+
+ A flag element indicating that an otherwise empty default instance
+ of this service (named "default") should be created at install, with
+ its enabled property set as given.
+
+ Its attribute is
+
+ enabled [boolean] The initial value for the enabled state of
+ this instance.
+-->
+
+<!ELEMENT create_default_instance EMPTY >
+
+<!ATTLIST create_default_instance
+ enabled ( true | false ) #REQUIRED >
+
+<!--
+ single_instance
+
+ A flag element stating that this service can only have a single
+ instance on a particular system.
+-->
+
+<!ELEMENT single_instance EMPTY>
+
+<!ATTLIST single_instance>
+
+<!--
+ instance
+
+ The service instance is the object representing a software component
+ that will run on the system if enabled. It contains an enabled
+ element, a set of dependencies on other services, potentially
+ customized methods or configuration data, an optional method
+ context, and a pointer to its restarter. (If no restarter is
+ specified, the master restarter, svc.startd(1M), is assumed to be
+ responsible for the service.)
+
+ Its attributes are
+
+ name The canonical name for this instance of the service.
+
+ enabled [boolean] The initial value for the enabled state of
+ this instance.
+-->
+
+<!ELEMENT instance
+ ( restarter?, dependency*, dependent*, method_context?,
+ exec_method*, notification_parameters*, property_group*,
+ template? ) >
+
+<!ATTLIST instance
+ name CDATA #REQUIRED
+ enabled ( true | false ) #REQUIRED >
+
+<!--
+ service
+
+ The service contains the set of instances defined by default for
+ this service, an optional method execution context, any default
+ methods, the template, and various restrictions or advice applicable
+ at installation. The method execution context and template elements
+ are required for service_bundle documents with type "manifest", but
+ are optional for "profile" or "archive" documents.
+
+ Its attributes are
+
+ name The canonical name for the service.
+
+ version [integer] The integer version for this service.
+
+ type Whether this service is a simple service, a delegated
+ restarter, or a milestone (a synthetic service that
+ collects a group of dependencies).
+-->
+
+<!ELEMENT service
+ ( create_default_instance?, single_instance?, restarter?,
+ dependency*, dependent*, method_context?, exec_method*,
+ notification_parameters*, property_group*, instance*,
+ stability?, template? ) >
+
+<!ATTLIST service
+ name CDATA #REQUIRED
+ version CDATA #REQUIRED
+ type ( service | restarter | milestone ) #REQUIRED >
+
+<!--
+ service_bundle
+
+ The bundle possesses two attributes:
+
+ type How this file is to be understood by the framework (or
+ used in a non-framework compliant way). Standard types
+ are 'archive', 'manifest', and 'profile'.
+
+ name A name for the bundle. Manifests should be named after
+ the package which delivered them; profiles should be
+ named after the "feature set nickname" they intend to
+ enable.
+-->
+
+<!ELEMENT service_bundle
+ ( service_bundle* | service* | xi:include* )>
+
+<!ATTLIST service_bundle
+ type CDATA #REQUIRED
+ name CDATA #REQUIRED>

0 comments on commit 231e783

Please sign in to comment.