Topic
4 replies Latest Post - ‏2012-12-07T16:11:00Z by lenisha
lenisha
lenisha
22 Posts
ACCEPTED ANSWER

Pinned topic XML Schema for DP configuration objects

‏2012-12-05T18:03:16Z |
Folks,

Is there a schema file available somewhere in DP that describes all Datapower XML objects like AAAPolicy etc... that we could use to validate configs?

Thanks a lot
Updated on 2012-12-07T16:11:00Z at 2012-12-07T16:11:00Z by lenisha
  • kenhygh
    kenhygh
    1308 Posts
    ACCEPTED ANSWER

    Re: XML Schema for DP configuration objects

    ‏2012-12-05T19:32:53Z  in response to lenisha
    they're all in the store:/// directory on your device. Check the xml-mgmt* files.
    Ken
    • lenisha
      lenisha
      22 Posts
      ACCEPTED ANSWER

      Re: XML Schema for DP configuration objects

      ‏2012-12-06T19:48:29Z  in response to kenhygh
      Thank you looks like definitions are in these schemas.
      Although DP schemas do not pass Schema Validation:

      File \DP\xml-mgmt-base.xsd is not valid.
      Value '(((\da-fA-F{1,4}|\:|)(\:|)){1,7}(\da-fA-F{1,4}|\:))' is not a valid XML regular expression.
      Error location: xsd:schema / xsd:simpleType / xsd:restriction / xsd:pattern / @value
      Details
      dt-pattern: Value '(((\da-fA-F{1,4}|\:|)(\:|)){1,7}(\da-fA-F{1,4}|\:))' is not a valid XML regular expression.

      <xsd:simpleType name="dmIPHostAddress">
      <xsd:restriction base="xsd:string">
      <xsd:pattern value="0-9+\.0-9+\.0-9\.0-9"/>
      <xsd:pattern value="(((\da-fA-F{1,4}|\:|)(\:|)){1,7}(\da-fA-F{1,4}|\:))"/>
      <xsd:pattern value="(((\da-fA-F{1,4}|\:|)(\:|)){1,5}(\da-fA-F{1,4}|)\:((1-9?\d|1\d{2}|20-4\d|250-5)\.){3}(1-9?\d|1\d{2}|20-4\d|250-5))"/>
      <!-- IPV4 -->
      <!-- IPV6 addr, such as "::1", "::", "1::", "::FFFF:127.0.0.1" or "fe80::211:11ff:febb:ff31" -->
      <!-- IPV6 contains V4 compatible address. -->
      </xsd:restriction>
      <!-- This is an IP address.
      The IP address can be a V4 or V6 notation. -->
      </xsd:simpleType>
      • HermannSW
        HermannSW
        4155 Posts
        ACCEPTED ANSWER

        Re: XML Schema for DP configuration objects

        ‏2012-12-07T10:27:49Z  in response to lenisha
        I am not sure what you are trying to do.

        For validation you need a XML file.
        So I assume that you have exported as "XML Config" and not as "ZIP Bundle".

        If so, store:///xml-mgmt*xsd Schemata will not help you.
        They are for requests/responses against DataPower XML management interface.

        Any manual changes to a DataPower export (XML or ZIP) are not supported.
        Therefore I cannot see a need for a Schema file to validate exported configuration.
        DataPower will export correctly, and import correctly unmodified exports/backups.

         
        If you are interested in DP configuration just for information, then there is a file which can give you the details.
        It is not available in WebGUI directly, but you can get it by doing any backup from DataPower as "ZIP Bundle".

        The file(s) you may find interesting are located in dp-aux directory of the generated .zip file.
        The most important file is "dp-aux/drMgmt.xml".
        See slide 17 of this WSTE webcast on how to extract DP object class hierarchy from it:
        http://www-01.ibm.com/support/docview.wss?uid=swg27019119

        You can find stylesheet DPClasses.xsl in appendix on slide 20 for "copy&paste".

         
        Stylesheet "dp-aux/clixform.xsl" is really interesting, it is used to convert the export.xml file(s)
        in DP backup to sequences of CLI commands. Nice application zip2html executing that stylesheet
        to generate a single HTML page view on a complete backup/export can be found in this posting:
        https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/entry/zip2html6

         
        Hermann<myXsltBlog/> <myXsltTweets/>
        • lenisha
          lenisha
          22 Posts
          ACCEPTED ANSWER

          Re: XML Schema for DP configuration objects

          ‏2012-12-07T16:11:00Z  in response to HermannSW
          > HermannSW wrote:
          >
          > For validation you need a XML file.
          > So I assume that you have exported as "XML Config" and not as "ZIP Bundle".

          Yes we exported XML objects from the DP.

          >
          > If so, store:///xml-mgmt*xsd Schemata will not help you.
          > They are for requests/responses against DataPower XML management interface.

          As is it xml-mgmt* did not help as they do not define root elements, but we hoped that generally
          defitions of objects there should match Datapower XML objects in export.....
          Looks like it's not 100% correct. and even xml-mgmt* schemas on Datapower store do not pass validation of themselves, the schemas are invalid.... which is rather bad.

          >
          > Any manual changes to a DataPower export (XML or ZIP) are not supported.
          > Therefore I cannot see a need for a Schema file to validate exported configuration.
          > DataPower will export correctly, and import correctly unmodified exports/backups.

          Yes in our process we are trying to establish we need to enable proper version control and parallel development for the team, as a result we are splitting XML objects and putting it in version control similar to Java files.
          And deployment/build script merges them.

          >  
          > If you are interested in DP configuration just for information, then there is a file which can give you the details.
          > It is not available in WebGUI directly, but you can get it by doing any backup from DataPower as "ZIP Bundle".
          >
          > The file(s) you may find interesting are located in dp-aux directory of the generated .zip file.
          > The most important file is "dp-aux/drMgmt.xml".
          > See slide 17 of this WSTE webcast on how to extract DP object class hierarchy from it:
          > http://www-01.ibm.com/support/docview.wss?uid=swg27019119
          >
          > You can find stylesheet DPClasses.xsl in appendix on slide 20 for "copy&paste".

          >  
          > Stylesheet "dp-aux/clixform.xsl" is really interesting, it is used to convert the export.xml file(s)
          > in DP backup to sequences of CLI commands. Nice application zip2html executing that stylesheet
          > to generate a single HTML page view on a complete backup/export can be found in this posting:
          > https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/entry/zip2html6
          Thank you it's very useful information

          >  
          > Hermann<myXsltBlog/> <myXsltTweets/>
          enerosweb