Modify

Ticket #1004 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

bcfg2-repo-validate doesn't handle including files from subdirs into clients.xml

Reported by: https://www.google.com/accounts/o8/id?id=AItOawlP6DRBvIJ7NLpLWILbgzURvGbMtGEyd8U Owned by: desai
Priority: minor Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-server Version: 1.0
Keywords: Cc:

Description

In clients.xml, files from subdirectories can be included using XInclude. However, neither the schema nor bcfg2-repo-validate are set up to handle that:

$ cat Metadata/clients.xml
<Clients version='3.0' xmlns:xi='http://www.w3.org/2001/XInclude'>
  <xi:include href='subdir/foo.xml'/>
</Clients>

$ cat Metadata/subdir/foo.xml
<Clients>
  <Client name='one.zedat.fu-berlin.de' profile='server' pingable='Y'/>
  <Client name='two.zedat.fu-berlin.de' profile='server' pingable='Y'/>
</Clients>

$ bcfg2-repo-validate
/server/bcfg2/server/repository/Metadata/clients.xml ***FAILS*** to verify              <----
subdir/foo.xml:1: element Clients: Schemas validity error : Element 'Clients', attribute '{http://www.w3.org/XML/1998/namespace}base': The attribute '{http://www.w3.org/XML/1998/namespace}base' is not allowed.
subdir/foo.xml:3: element Client: Schemas validity error : Element 'Client': This element is not expected.
/server/bcfg2/server/repository/Metadata/clients.xml fails to validate

Attachments

Change History

comment:1 Changed 12 years ago by https://www.google.com/accounts/o8/id?id=AItOawlP6DRBvIJ7NLpLWILbgzURvGbMtGEyd8U

The new bcfg2-lint(8) tool handles XIncludes just fine, so this ticket can be closed.

comment:2 Changed 12 years ago by solj

  • Status changed from new to closed
  • Resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.