aboutsummaryrefslogtreecommitdiff
path: root/scripts/rpki/relaxng.py
AgeCommit message (Expand)Author
2007-10-22CheckpointRob Austein
2007-10-22list_resources child_id attribute no longer optional, per discussionRob Austein
2007-10-07NitRob Austein
2007-10-07DocRob Austein
2007-10-04URL handlingRob Austein
2007-10-04Rename *.peer_ta => *.cms_ta, add parent.https_ta and repository.https_ta.Rob Austein
2007-10-01Fold roa table into route_origin table.Rob Austein
2007-10-01Get rid of resource class silliness in left-right protocol.Rob Austein
2007-09-20Make RelaxNG schemas internal.Rob Austein
2007-08-12DocRob Austein
2007-08-06CheckpointRob Austein
2007-08-03CheckpointRob Austein
2007-07-30Convert to lxmlRob Austein
2007-07-25Cleanup and commentRob Austein
2007-07-24Internal RelaxNG validation without calling an external process.Rob Austein
2007-07-19BugfixRob Austein
2007-07-04CommentRob Austein
2007-07-03Start of an rpki module collection.Rob Austein
span>
06338278
f27cb9a3


5d2f1bcf
a3ac9a1d
949ff01f
fb36e938


be3b5ac9
a3ac9a1d
5d2f1bcf







fb36e938
a3ac9a1d

5d2f1bcf
a7cad7f4
3f82521d
5d2f1bcf
ab4384ac
a3ac9a1d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

                     
                                             
                                                          











                                                                             

                    
 
                                                          
                                               

                                 
              
          
 


                                      
                                                     
 
                          


                                    
                                                                         
                                                                           







                                                                                    
                                               

                                                   
                                
                                                                
 
                                                    
 
                      
#!/usr/bin/env python

# Copyright (C) 2011  SPARTA, Inc. dba Cobham
# Copyright (C) 2012, 2013  SPARTA, Inc. a Parsons Company
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND SPARTA DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS.  IN NO EVENT SHALL SPARTA BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

__version__ = '$Id$'

# probably should be exported from rpki.gui.cacheview.util
default_logfile = '/var/rcynic/data/rcynic.xml'
default_root = '/var/rcynic/data'

import logging
import sys

from rpki.gui.script_util import setup
setup()

from rpki.gui.cacheview.util import import_rcynic_xml

if __name__ == '__main__':
    import optparse

    parser = optparse.OptionParser()
    parser.add_option("-l", "--level", dest="log_level", default='ERROR',
                      help="specify the logging level [default: %default]")
    parser.add_option(
        "-f", "--file", dest="logfile",
        help="specify the rcynic XML file to parse [default: %default]",
        default=default_logfile)
    parser.add_option(
        "-r", "--root",
        help="specify the chroot directory for the rcynic jail [default: %default]",
        metavar="DIR", default=default_root)
    options, args = parser.parse_args(sys.argv)

    v = getattr(logging, options.log_level.upper())
    logging.basicConfig(level=v)
    logging.info('log level set to %s', logging.getLevelName(v))

    import_rcynic_xml(options.root, options.logfile)

    logging.shutdown()