Exemple #1
0
    def strap_erddap(self, data_product_id=None):
        '''
        Copies the datasets.xml to /tmp
        '''
        datasets_xml_path = RegistrationProcess.get_datasets_xml_path(CFG)
        if os.path.lexists('/tmp/datasets.xml'):
            os.unlink('/tmp/datasets.xml')
        os.symlink(datasets_xml_path, '/tmp/datasets.xml')
        if data_product_id:
            with open('/tmp/erddap/flag/data%s' % data_product_id, 'a'):
                pass

        gevent.sleep(5)
        from subprocess import call
        call(['open', 'http://localhost:9000/erddap/tabledap/data%s.html' % data_product_id])
Exemple #2
0
    def strap_erddap(self, data_product_id=None):
        """
        Copies the datasets.xml to /tmp
        """
        datasets_xml_path = RegistrationProcess.get_datasets_xml_path(CFG)
        if os.path.lexists("/tmp/datasets.xml"):
            os.unlink("/tmp/datasets.xml")
        os.symlink(datasets_xml_path, "/tmp/datasets.xml")
        if data_product_id:
            with open("/tmp/erddap/flag/data%s" % data_product_id, "a"):
                pass

        gevent.sleep(5)
        from subprocess import call

        call(["open", "http://localhost:9000/erddap/tabledap/data%s.html" % data_product_id])
    def strap_erddap(self, data_product_id=None, open_page=True):
        '''
        Copies the datasets.xml to /tmp
        '''
        datasets_xml_path = RegistrationProcess.get_datasets_xml_path(CFG)
        if os.path.lexists('/tmp/datasets.xml'):
            os.unlink('/tmp/datasets.xml')
        os.symlink(datasets_xml_path, '/tmp/datasets.xml')
        if data_product_id:
            with open('/tmp/erddap/flag/data%s' % data_product_id, 'a'):
                pass

        if open_page:
            gevent.sleep(5)
            from subprocess import call
            call(['open', 'http://localhost:9000/erddap/tabledap/data%s.html' % data_product_id])