160 likes | 254 Views
#N14 Pattern Value (aka Substring attribute). SDD 1.1 Proposal. Current Situation. descriptorLanguageBundle is an optional attribute for both the Package Descriptor and the Deployment Descriptor Thus, requires text in the Spec as:
E N D
#N14 Pattern Value(aka Substring attribute) SDD 1.1 Proposal
Current Situation • descriptorLanguageBundle is an optional attribute for both the Package Descriptor and the Deployment Descriptor • Thus, requires text in the Spec as: • The descriptorLanguageBundle attribute can be specified in both the PackageDescriptor and the DeploymentDescriptor, although the latter is not required. If it is included in both, the values entered in the descriptorLanguageBundle attribute MUST match exactly. • The schema causes this issue which makes it unnecessarily hard for both SDD creation tools and SDD runtime tools
Current Schema • DescriptorInfoGroup • <xsd:attributeGroup name="DescriptorInfoGroup"> • <xsd:attribute name="schemaVersion" type="xsd:string" fixed="1.0" use="required"/> • <xsd:attribute name="descriptorID" type="sdd-common:UUIDType" use="required"/> • <xsd:attribute name="lastModified" type="xsd:dateTime" use="required"/> • <xsd:attribute name="descriptorLanguageBundle" type="xsd:token" use="optional"/> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:attributeGroup> • DeploymentDescriptor • <xsd:complexType name="DeploymentDescriptorType"> • <xsd:sequence> • <xsd:element name="Topology" type="sdd-dd:TopologyType"/> • <xsd:choice> • <xsd:choice> • <xsd:element name="InstallableUnit" type="sdd-dd:InstallableUnitType"/> • <xsd:element name="ConfigurationUnit" type="sdd-dd:ConfigurationUnitType"/> • <xsd:element name="LocalizationUnit" type="sdd-dd:LocalizationUnitType"/> • </xsd:choice> • <xsd:sequence maxOccurs="unbounded"> • <xsd:element name="CompositeInstallable" type="sdd-dd:CompositeInstallableType"/> • </xsd:sequence> • </xsd:choice> • <xsd:element name="Requisites" type="sdd-dd:RequisitesType" minOccurs="0"/> • <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> • </xsd:sequence> • <xsd:attributeGroup ref="sdd-common:DescriptorInfoGroup"/> • </xsd:complexType> • PackageDescriptor • <xsd:complexType name="PackageDescriptorType"> • <xsd:sequence> • <xsd:element name="PackageIdentity" type="sdd-pd:PackageIdentityType"/> • <xsd:element name="Contents" type="sdd-pd:ContentsType"/> • <xsd:element ref="ds:Signature" minOccurs="0"/> • </xsd:sequence> • <xsd:attributeGroup ref="sdd-common:DescriptorInfoGroup"/> • </xsd:complexType>
Propsed Schema • DescriptorInfoGroup • <xsd:attributeGroup name="DescriptorInfoGroup"> • <xsd:attribute name="schemaVersion" type="xsd:string" fixed="1.0" use="required"/> • <xsd:attribute name="descriptorID" type="sdd-common:UUIDType" use="required"/> • <xsd:attribute name="lastModified" type="xsd:dateTime" use="required"/> • </xsd:attributeGroup> • DeploymentDescriptor • <xsd:complexType name="DeploymentDescriptorType"> • <xsd:sequence> • <xsd:element name="Topology" type="sdd-dd:TopologyType"/> • <xsd:choice> • <xsd:choice> • <xsd:element name="InstallableUnit" type="sdd-dd:InstallableUnitType"/> • <xsd:element name="ConfigurationUnit" type="sdd-dd:ConfigurationUnitType"/> • <xsd:element name="LocalizationUnit" type="sdd-dd:LocalizationUnitType"/> • </xsd:choice> • <xsd:sequence maxOccurs="unbounded"> • <xsd:element name="CompositeInstallable" type="sdd-dd:CompositeInstallableType"/> • </xsd:sequence> • </xsd:choice> • <xsd:element name="Requisites" type="sdd-dd:RequisitesType" minOccurs="0"/> • <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> • </xsd:sequence> • <xsd:attributeGroup ref="sdd-common:DescriptorInfoGroup"/> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:complexType> • PackageDescriptor • <xsd:complexType name="PackageDescriptorType"> • <xsd:sequence> • <xsd:element name="PackageIdentity" type="sdd-pd:PackageIdentityType"/> • <xsd:element name="Contents" type="sdd-pd:ContentsType"/> • <xsd:element ref="ds:Signature" minOccurs="0"/> • </xsd:sequence> • <xsd:attributeGroup ref="sdd-common:DescriptorInfoGroup"/> • <xsd:attribute name="descriptorLanguageBundle" type="xsd:token" use="optional"/> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:complexType>
Proposal (new) • Both xpath and java’s regular expression support if more complex than what is needed. • Thus, to keep it simple • Add an attribute that states what “format” the value of the element is: • String (default) • Literal • Case sensitive string • Variable Reference • $(var) - reference • Wildcard • * - wildcard • Prefer “*” over Java’s “.” • Negation • Not required for we have the “test value” attribute
Proposed Schema Change • The elements identified (circled in red) on the next few charts will be changed from type="sdd-dd:VariableExpressionType“ to type="sdd-dd:ElementValueType” • <xsd:complexType name=“ElementValueType"> • <xsd:simpleContent> • <xsd:extension base="xsd:string"> • <xsd:attribute name=“pattern" type=“sdd-dd:StringPatternType" use="optional“ default=“string”/> • </xsd:extension> • </xsd:simpleContent> • </xsd:complexType> • <xsd:simpleType name=“StringPatternType"> • <xsd:restriction base="xsd:string"> • <xsd:enumeration value=“string"/> • <xsd:enumeration value=“literal"/> • <xsd:enumeration value=“variableReference"/> • <xsd:enumeration value=“wildcard"/> • </xsd:restriction> • </xsd:simpleType> • Note: Allows for other types, e.g. pattern syntax, to be supported
Proposed Schema Change • The following could NOT be changed for they are attributes Thus, they are changed to an xsd:string. • <xsd:complexType name="ArgumentType"> • <xsd:attribute name="name" type=“xsd:string" use="required"/> • <xsd:attribute name="value" type=“xsd:string" use="optional"/> • <xsd:attribute name="required" type="xsd:boolean" use="optional" default="true"/> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:complexType> • <xsd:complexType name="ContentSelectionFeatureType"> • <xsd:simpleContent> • <xsd:extension base="xsd:token"> • <xsd:attribute name="selections" type=“xsd:string" use="optional"/> • </xsd:extension> • </xsd:simpleContent> • </xsd:complexType> • <xsd:complexType name="BaseParameterType"> • <xsd:sequence> • <xsd:group ref="sdd-dd:DisplayElementGroup" minOccurs="0"/> • </xsd:sequence> • <xsd:attribute name="id" type="xsd:ID" use="required"/> • <xsd:attribute name="defaultValue" type=“xsd:string" use="optional"/> • <xsd:attribute name="sensitive" type="xsd:boolean" use="optional" default="false"/> • <xsd:attribute name="required" type="xsd:boolean" use="optional" default="true"/> • <xsd:attribute name="operation" type="sdd-dd:OperationListType" use="optional"/> • </xsd:complexType>
Proposed Elements to ChangeResource Constraints - (All places it applies)
Proposed Elements to ChangeResource Constraints - (All places it applies)
Proposed Elements to ChangeArtifacts Note: Applies to all artifact types, e.g. UninstallArtifact
Use this slide for full proposals. It is optional for general direction proposals and would not be expected to be complete. Proposed Specification Change • For the attributes on slide 5, the value should be handled as a literal string. The only exception is that if the value starts with “$(“ and ends with “)”, then the value should be treated as a variable reference.
Examples • Literal • <sdd-dd:ResourceConstraint id="J2eeServletServer.check" resourceRef="J2eeServletServer"> • <sdd-dd:Name>Apache Tomcat</sdd-dd:Name> • Variable Reference • <sdd-dd:Property> • <sdd-dd:PropertyName>sp:CIM_ConnectedTo.Protocol</sdd-dd:PropertyName> • <sdd-dd:Value pattern=“variableReference” >$(prototcolType)</sdd-dd:Value> • </sdd-dd:Property> • Literal would have been “JDBC” • Wildcard • <sdd-dd:ResourceConstraint id="OracleDatabaseServer.check" resourceRef="DatabaseServer"> • <sdd-dd:Name pattern=“wildcard” >Oracle*</sdd-dd:Name> • Literal would have been “Oracle 9iAS”