diff options
Diffstat (limited to 'sli/common')
-rw-r--r--[-rwxr-xr-x] | sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java | 40 | ||||
-rwxr-xr-x | sli/common/src/main/resources/svclogic.xsd | 635 | ||||
-rwxr-xr-x | sli/common/src/test/resources/svclogic.xsd | 635 |
3 files changed, 666 insertions, 644 deletions
diff --git a/sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java b/sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java index e3bd099..d494eaa 100755..100644 --- a/sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java +++ b/sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java @@ -50,14 +50,14 @@ import org.slf4j.LoggerFactory; public class SvcLogicDblibStore implements SvcLogicStore { private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; - + private static final Logger LOG = LoggerFactory .getLogger(SvcLogicDblibStore.class); private static final String DBLIB_SERVICE = // "org.openecomp.sdnc.sli.resource.dblib.DBLibService"; "org.openecomp.sdnc.sli.resource.dblib.DBResourceManager"; - + Properties props = null; public void init(Properties props) throws ConfigurationException { @@ -148,7 +148,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { try { dbConn = ((DBResourceManager) dbSvc).getConnection(); PreparedStatement fetchGraphStmt; - + ArrayList<String> args = new ArrayList<String>(); args.add(module); args.add(rpc); @@ -159,7 +159,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { } else { fetchGraphStmt = dbConn.prepareStatement(fetchVersionGraphSql); } - + fetchGraphStmt.setString(1, module); fetchGraphStmt.setString(2, rpc); fetchGraphStmt.setString(3, mode); @@ -168,7 +168,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { } results = fetchGraphStmt.executeQuery(); - + if (results.next()) { Blob graphBlob = results.getBlob("graph"); @@ -442,12 +442,12 @@ public class SvcLogicDblibStore implements SvcLogicStore { DbLibService dblibSvc = null; ServiceReference sref = null; BundleContext bctx = null; - + Bundle bundle = FrameworkUtil.getBundle(SvcLogicDblibStore.class); - + if (bundle != null) { bctx = bundle.getBundleContext(); - + if (bctx != null) { sref = bctx.getServiceReference(DBLIB_SERVICE); } @@ -458,7 +458,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { } else { dblibSvc = (DbLibService) bctx.getService(sref); if (dblibSvc == null) { - + LOG.warn("Could not find service reference for DBLIB service (" + DBLIB_SERVICE + ")"); } @@ -470,34 +470,34 @@ public class SvcLogicDblibStore implements SvcLogicStore { // Try to create a DbLibService object from dblib properties if(JavaSingleton.getInstance() == null){ Properties dblibProps = new Properties(); - + String propDir = System.getenv(SDNC_CONFIG_DIR); if (propDir == null) { - + propDir = "/opt/sdnc/data/properties"; } String propPath = propDir + "/dblib.properties"; - + File propFile = new File(propPath); - + if (!propFile.exists()) { - + LOG.warn( "Missing configuration properties file : " + propFile); return(null); } - + try { - + dblibProps.load(new FileInputStream(propFile)); } catch (Exception e) { LOG.warn( "Could not load properties file " + propPath, e); return(null); - + } - + try { dblibSvc = DBResourceManager.create(dblibProps); JavaSingleton.setInstance(dblibSvc); @@ -511,7 +511,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { return (dblibSvc); } - + static class JavaSingleton { /* Private constructor */ private JavaSingleton() { @@ -525,7 +525,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { public static DbLibService getInstance() { return INSTANCE; } - + public static void setInstance(DbLibService dbresource) { INSTANCE = dbresource; } diff --git a/sli/common/src/main/resources/svclogic.xsd b/sli/common/src/main/resources/svclogic.xsd index 614a118..0743089 100755 --- a/sli/common/src/main/resources/svclogic.xsd +++ b/sli/common/src/main/resources/svclogic.xsd @@ -1,312 +1,323 @@ -<?xml version = "1.0" encoding = "UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.openecomp.org/sdnc/svclogic" xmlns="http://www.openecomp.org/sdnc/svclogic"> - - <xsd:simpleType name="modeType"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="sync" /> - <xsd:enumeration value="async" /> - </xsd:restriction> - </xsd:simpleType> - - <xsd:group name="node"> - <xsd:choice> - <xsd:element ref="block" /> - <xsd:element ref="is-available" /> - <xsd:element ref="exists" /> - <xsd:element ref="reserve" /> - <xsd:element ref="release" /> - <xsd:element ref="allocate" /> - <xsd:element ref="get-resource" /> - <xsd:element ref="configure" /> - <xsd:element ref="return" /> - <xsd:element ref="switch" /> - <xsd:element ref="record" /> - <xsd:element ref="save" /> - <xsd:element ref="for" /> - <xsd:element ref="set" /> - <xsd:element ref="execute" /> - <xsd:element ref="delete" /> - <xsd:element ref="update" /> - <xsd:element ref="call" /> - <xsd:element ref="notify" /> - </xsd:choice> - </xsd:group> - - <xsd:element name="service-logic"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="method" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="module" use="required" type="xsd:string" /> - <xsd:attribute name="version" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="method"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="rpc" use="required" type="xsd:string" /> - <xsd:attribute name="mode" use="optional" type="modeType" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="block"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="atomic" use="optional" type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="is-available"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="exists"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="outcome"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="ref" use="optional" type="xsd:string" /> - <xsd:attribute name="value" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="reserve"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="select" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="release"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="record"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="allocate"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - <xsd:attribute name="pfx" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="get-resource"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="order-by" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="configure"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="adaptor" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - <xsd:attribute name="activate" use="optional" type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - - <xsd:element name="parameter"> - <xsd:complexType> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="value" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - - <xsd:element name="return"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="status" use="optional" type="xsd:string" /> - <xsd:attribute name="value" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="switch"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="test" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="save"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="force" use="optional" type="xsd:boolean" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="delete"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - <!-- local-only is retired and does not do anything --> - <xsd:attribute name="local-only" use="optional" type="xsd:string" /> - <!-- pfx is retired and does not do anything --> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="for"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="atomic" use="optional" type="xsd:boolean" /> - <xsd:attribute name="index" use="required" type="xsd:string" /> - <xsd:attribute name="start" use="required" type="xsd:string" /> - <xsd:attribute name="end" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="set"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="only-if-unset" use="optional" - type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="execute"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="method" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="update"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="force" use="optional" type="xsd:boolean" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="call"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="module" use="optional" type="xsd:string" /> - <xsd:attribute name="rpc" use="required" type="xsd:string" /> - <xsd:attribute name="version" use="optional" type="xsd:string" /> - <xsd:attribute name="mode" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="notify"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="optional" type="xsd:string" /> - <xsd:attribute name="resource" use="optional" type="xsd:string" /> - <xsd:attribute name="action" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - -</xsd:schema> +<?xml version = "1.0" encoding = "UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.openecomp.org/sdnc/svclogic" xmlns="http://www.openecomp.org/sdnc/svclogic">
+
+ <xsd:simpleType name="modeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="sync" />
+ <xsd:enumeration value="async" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:group name="node">
+ <xsd:choice>
+ <xsd:element ref="block" />
+ <xsd:element ref="is-available" />
+ <xsd:element ref="exists" />
+ <xsd:element ref="reserve" />
+ <xsd:element ref="release" />
+ <xsd:element ref="allocate" />
+ <xsd:element ref="get-resource" />
+ <xsd:element ref="configure" />
+ <xsd:element ref="return" />
+ <xsd:element ref="switch" />
+ <xsd:element ref="record" />
+ <xsd:element ref="save" />
+ <xsd:element ref="for" />
+ <xsd:element ref="set" />
+ <xsd:element ref="execute" />
+ <xsd:element ref="delete" />
+ <xsd:element ref="update" />
+ <xsd:element ref="call" />
+ <xsd:element ref="notify" />
+ <xsd:element ref="break" />
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:element name="service-logic">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="method" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="module" use="required" type="xsd:string" />
+ <xsd:attribute name="version" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="method">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="rpc" use="required" type="xsd:string" />
+ <xsd:attribute name="mode" use="optional" type="modeType" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="block">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="atomic" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="is-available">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="exists">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="outcome">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="ref" use="optional" type="xsd:string" />
+ <xsd:attribute name="value" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="reserve">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="select" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="release">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="record">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="allocate">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ <xsd:attribute name="pfx" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="get-resource">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="order-by" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="configure">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="adaptor" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ <xsd:attribute name="activate" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="parameter">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="value" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="return">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="status" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="switch">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="test" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="save">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="force" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="delete">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ <!-- local-only is retired and does not do anything -->
+ <xsd:attribute name="local-only" use="optional" type="xsd:string" />
+ <!-- pfx is retired and does not do anything -->
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="for">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="atomic" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="index" use="required" type="xsd:string" />
+ <xsd:attribute name="start" use="required" type="xsd:string" />
+ <xsd:attribute name="end" use="required" type="xsd:string" />
+ <xsd:attribute name="silentFailure" use="optional" type="xsd:boolean" default="false" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="set">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="only-if-unset" use="optional"
+ type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="execute">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="method" use="required" type="xsd:string" />
+ <xsd:attribute name="emitsOutcome" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="update">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="force" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="call">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="module" use="optional" type="xsd:string" />
+ <xsd:attribute name="rpc" use="required" type="xsd:string" />
+ <xsd:attribute name="version" use="optional" type="xsd:string" />
+ <xsd:attribute name="mode" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="notify">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="optional" type="xsd:string" />
+ <xsd:attribute name="resource" use="optional" type="xsd:string" />
+ <xsd:attribute name="action" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="break">
+ <xsd:complexType />
+ </xsd:element>
+
+</xsd:schema>
diff --git a/sli/common/src/test/resources/svclogic.xsd b/sli/common/src/test/resources/svclogic.xsd index 614a118..0743089 100755 --- a/sli/common/src/test/resources/svclogic.xsd +++ b/sli/common/src/test/resources/svclogic.xsd @@ -1,312 +1,323 @@ -<?xml version = "1.0" encoding = "UTF-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.openecomp.org/sdnc/svclogic" xmlns="http://www.openecomp.org/sdnc/svclogic"> - - <xsd:simpleType name="modeType"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="sync" /> - <xsd:enumeration value="async" /> - </xsd:restriction> - </xsd:simpleType> - - <xsd:group name="node"> - <xsd:choice> - <xsd:element ref="block" /> - <xsd:element ref="is-available" /> - <xsd:element ref="exists" /> - <xsd:element ref="reserve" /> - <xsd:element ref="release" /> - <xsd:element ref="allocate" /> - <xsd:element ref="get-resource" /> - <xsd:element ref="configure" /> - <xsd:element ref="return" /> - <xsd:element ref="switch" /> - <xsd:element ref="record" /> - <xsd:element ref="save" /> - <xsd:element ref="for" /> - <xsd:element ref="set" /> - <xsd:element ref="execute" /> - <xsd:element ref="delete" /> - <xsd:element ref="update" /> - <xsd:element ref="call" /> - <xsd:element ref="notify" /> - </xsd:choice> - </xsd:group> - - <xsd:element name="service-logic"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="method" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="module" use="required" type="xsd:string" /> - <xsd:attribute name="version" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="method"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="rpc" use="required" type="xsd:string" /> - <xsd:attribute name="mode" use="optional" type="modeType" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="block"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="atomic" use="optional" type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="is-available"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="exists"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="outcome"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="ref" use="optional" type="xsd:string" /> - <xsd:attribute name="value" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="reserve"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="select" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="release"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="record"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="allocate"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - <xsd:attribute name="pfx" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="get-resource"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="order-by" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="configure"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="adaptor" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - <xsd:attribute name="activate" use="optional" type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - - <xsd:element name="parameter"> - <xsd:complexType> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="value" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - - <xsd:element name="return"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="status" use="optional" type="xsd:string" /> - <xsd:attribute name="value" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="switch"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="test" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="save"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="force" use="optional" type="xsd:boolean" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="delete"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - <!-- local-only is retired and does not do anything --> - <xsd:attribute name="local-only" use="optional" type="xsd:string" /> - <!-- pfx is retired and does not do anything --> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="for"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="atomic" use="optional" type="xsd:boolean" /> - <xsd:attribute name="index" use="required" type="xsd:string" /> - <xsd:attribute name="start" use="required" type="xsd:string" /> - <xsd:attribute name="end" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="set"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="only-if-unset" use="optional" - type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="execute"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="method" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="update"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="force" use="optional" type="xsd:boolean" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="call"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="module" use="optional" type="xsd:string" /> - <xsd:attribute name="rpc" use="required" type="xsd:string" /> - <xsd:attribute name="version" use="optional" type="xsd:string" /> - <xsd:attribute name="mode" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="notify"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="optional" type="xsd:string" /> - <xsd:attribute name="resource" use="optional" type="xsd:string" /> - <xsd:attribute name="action" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - -</xsd:schema> +<?xml version = "1.0" encoding = "UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.openecomp.org/sdnc/svclogic" xmlns="http://www.openecomp.org/sdnc/svclogic">
+
+ <xsd:simpleType name="modeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="sync" />
+ <xsd:enumeration value="async" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:group name="node">
+ <xsd:choice>
+ <xsd:element ref="block" />
+ <xsd:element ref="is-available" />
+ <xsd:element ref="exists" />
+ <xsd:element ref="reserve" />
+ <xsd:element ref="release" />
+ <xsd:element ref="allocate" />
+ <xsd:element ref="get-resource" />
+ <xsd:element ref="configure" />
+ <xsd:element ref="return" />
+ <xsd:element ref="switch" />
+ <xsd:element ref="record" />
+ <xsd:element ref="save" />
+ <xsd:element ref="for" />
+ <xsd:element ref="set" />
+ <xsd:element ref="execute" />
+ <xsd:element ref="delete" />
+ <xsd:element ref="update" />
+ <xsd:element ref="call" />
+ <xsd:element ref="notify" />
+ <xsd:element ref="break" />
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:element name="service-logic">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="method" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="module" use="required" type="xsd:string" />
+ <xsd:attribute name="version" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="method">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="rpc" use="required" type="xsd:string" />
+ <xsd:attribute name="mode" use="optional" type="modeType" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="block">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="atomic" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="is-available">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="exists">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="outcome">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="ref" use="optional" type="xsd:string" />
+ <xsd:attribute name="value" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="reserve">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="select" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="release">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="record">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="allocate">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ <xsd:attribute name="pfx" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="get-resource">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="order-by" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="configure">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="adaptor" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ <xsd:attribute name="activate" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="parameter">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="value" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="return">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="status" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="switch">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="test" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="save">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="force" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="delete">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ <!-- local-only is retired and does not do anything -->
+ <xsd:attribute name="local-only" use="optional" type="xsd:string" />
+ <!-- pfx is retired and does not do anything -->
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="for">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="atomic" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="index" use="required" type="xsd:string" />
+ <xsd:attribute name="start" use="required" type="xsd:string" />
+ <xsd:attribute name="end" use="required" type="xsd:string" />
+ <xsd:attribute name="silentFailure" use="optional" type="xsd:boolean" default="false" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="set">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="only-if-unset" use="optional"
+ type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="execute">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="method" use="required" type="xsd:string" />
+ <xsd:attribute name="emitsOutcome" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="update">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="force" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="call">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="module" use="optional" type="xsd:string" />
+ <xsd:attribute name="rpc" use="required" type="xsd:string" />
+ <xsd:attribute name="version" use="optional" type="xsd:string" />
+ <xsd:attribute name="mode" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="notify">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="optional" type="xsd:string" />
+ <xsd:attribute name="resource" use="optional" type="xsd:string" />
+ <xsd:attribute name="action" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="break">
+ <xsd:complexType />
+ </xsd:element>
+
+</xsd:schema>
|