def setUp(self):
        logger.debug('setUp')

        self.sysmod_port = get_next_open_port()
        self.cmd_line_port = get_next_open_port()
        # self.cmd_line_port will be different from self.sysmod_port
        stop_port = get_next_open_port()

        pathutil.clear_folder(config_dir)
        params = {
            'proto': 'http',
            'sysmod_port': self.sysmod_port,
            'target_hostname': target_hostname,
            'target_port': target_port,
            'cmd_line_port': self.cmd_line_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('valve-self-common', params=params)
        apply_config_set('single-node-with-proto', params=params)
        apply_config_set('container-no-port', params=params)
        self.valve = valve.Valve(config_dir=config_dir,
                                 stop_port=stop_port)
        time.sleep(sleep_duration)
    def setUp(self):
        logger.debug('setUp')

        self.port11 = get_next_open_port()
        self.port12 = get_next_open_port()
        self.port21 = get_next_open_port()
        self.port22 = get_next_open_port()
        self.stop_port = get_next_open_port()

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': 'http',
            'target_hostname': target_hostname,
            'target_port': target_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
            'port11': self.port11,
            'port12': self.port12,
            'port21': self.port21,
            'port22': self.port22,
        }
        apply_config_set('valve-self-common', params=self.params)
        apply_config_set('container-no-port', params=self.params)
        apply_config_set('two-clusters-two-nodes-each', params=self.params)
        self.valve = valve.Valve(config_dir=config_dir,
                                 stop_port=self.stop_port)
        time.sleep(2 * sleep_duration)
    def setUp(self):
        logger.debug('setUp')

        self.port11 = 18888
        self.port12 = 18889
        self.port21 = 18890
        self.port22 = 18891

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': 'http',
            'target_hostname': target_hostname,
            'target_port': target_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
            'port11': self.port11,
            'port12': self.port12,
            'port21': self.port21,
            'port22': self.port22,
        }
        apply_config_set('valve-self-common', params=self.params)
        apply_config_set('container-no-port', params=self.params)
        apply_config_set('two-clusters-two-nodes-each', params=self.params)
        self.repose = repose.ReposeValve(config_dir=config_dir,
                                         stop_port=stop_port)
        time.sleep(25)
Beispiel #4
0
    def setUp(self):
        logger.debug('setUp')

        self.repose_port = get_next_open_port()
        self.stop_port = get_next_open_port()
        self.deproxy_port = get_next_open_port()

        logger.debug('repose port: %s' % self.repose_port)
        logger.debug('stop port: %s' % self.stop_port)
        logger.debug('deproxy port: %s' % self.deproxy_port)

        self.deproxy = deproxy.Deproxy()
        self.deproxy.add_endpoint(('localhost', self.deproxy_port))

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': 'http',
            'target_hostname': 'localhost',
            'target_port': self.deproxy_port,
            'deployment_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
            'port': self.repose_port,
        }
        apply_configs('configs', params=self.params)

        self.valve = valve.Valve(config_dir=config_dir,
                                 stop_port=self.stop_port,
                                 port=self.repose_port,
                                 wait_on_start=True,
                                 conn_fw='jersey')
Beispiel #5
0
    def setUp(self):
        logger.debug('setUp')

        deproxy_port = deproxy_port_base - 3

        self.deproxy = deproxy.Deproxy()
        self.end_point = self.deproxy.add_endpoint(('localhost', deproxy_port))

        pathutil.clear_folder(config_dir)
        params = {
            'port1': repose_port,
            'port2': repose_port + 1,
            'target_hostname': 'localhost',
            'target_port': deproxy_port,
            'deployment_dir': deployment_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('configs/two-nodes/.config-set.xml', params=params)
        self.valve = repose.ReposeValve(config_dir=config_dir,
                                        stop_port=stop_port)
        repose.wait_for_node_to_start(port=repose_port)
        repose.wait_for_node_to_start(port=repose_port + 1)

        time.sleep(startup_wait_time)
Beispiel #6
0
    def setUp(self):
        logger.debug('setUp')

        self.port11 = get_next_open_port()
        self.port12 = get_next_open_port()
        self.port21 = get_next_open_port()
        self.port22 = get_next_open_port()
        self.stop_port = get_next_open_port()

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': 'http',
            'target_hostname': target_hostname,
            'target_port': target_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
            'port11': self.port11,
            'port12': self.port12,
            'port21': self.port21,
            'port22': self.port22,
        }
        apply_config_set('valve-self-common', params=self.params)
        apply_config_set('container-no-port', params=self.params)
        apply_config_set('two-clusters-two-nodes-each', params=self.params)
        self.valve = valve.Valve(config_dir=config_dir,
                                 stop_port=self.stop_port)
        time.sleep(2 * sleep_duration)
    def setUp(self):
        logger.debug('setUp')

        self.repose_port = get_next_open_port()
        self.stop_port = get_next_open_port()
        self.deproxy_port = get_next_open_port()

        logger.debug('repose port: %s' % self.repose_port)
        logger.debug('stop port: %s' % self.stop_port)
        logger.debug('deproxy port: %s' % self.deproxy_port)

        self.deproxy = deproxy.Deproxy()
        self.deproxy.add_endpoint(('localhost', self.deproxy_port))

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': 'http',
            'target_hostname': 'localhost',
            'target_port': self.deproxy_port,
            'deployment_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
            'port': self.repose_port,
        }
        apply_configs('configs', params=self.params)

        self.valve = valve.Valve(config_dir=config_dir,
                                 stop_port=self.stop_port,
                                 port=self.repose_port, wait_on_start=True,
                                 conn_fw='jersey')
Beispiel #8
0
    def setUp(self):
        logger.debug('setUp')

        self.sysmod_port = get_next_open_port()
        self.cmd_line_port = get_next_open_port()
        # self.cmd_line_port will be different from self.sysmod_port
        stop_port = get_next_open_port()

        pathutil.clear_folder(config_dir)
        params = {
            'proto': 'http',
            'sysmod_port': self.sysmod_port,
            'target_hostname': target_hostname,
            'target_port': target_port,
            'cmd_line_port': self.cmd_line_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('valve-self-common', params=params)
        apply_config_set('single-node-with-proto', params=params)
        apply_config_set('container-no-port', params=params)
        self.valve = valve.Valve(config_dir=config_dir,
                                 port=self.cmd_line_port,
                                 stop_port=stop_port)
        time.sleep(sleep_duration)
Beispiel #9
0
    def setUp(self):
        logger.debug("setUp")

        self.repose_port = get_next_open_port()
        self.stop_port = get_next_open_port()
        self.deproxy_port = get_next_open_port()

        logger.debug("repose port: %s" % self.repose_port)
        logger.debug("stop port: %s" % self.stop_port)
        logger.debug("deproxy port: %s" % self.deproxy_port)

        self.deproxy = deproxy.Deproxy()
        self.deproxy.add_endpoint(("localhost", self.deproxy_port))

        pathutil.clear_folder(config_dir)
        self.params = {
            "proto": "http",
            "target_hostname": "localhost",
            "target_port": self.deproxy_port,
            "deployment_dir": deploy_dir,
            "artifact_dir": artifact_dir,
            "log_file": log_file,
            "port": self.repose_port,
        }
        apply_configs("configs", params=self.params)

        self.valve = valve.Valve(
            config_dir=config_dir, stop_port=self.stop_port, port=self.repose_port, wait_on_start=True, conn_fw="apache"
        )
Beispiel #10
0
    def setUp(self):
        logger.debug('setUp')

        deproxy_port = deproxy_port_base - 3

        self.deproxy = deproxy.Deproxy()
        self.end_point = self.deproxy.add_endpoint(('localhost', deproxy_port))

        pathutil.clear_folder(config_dir)
        params = {
            'port1': repose_port,
            'port2': repose_port + 1,
            'target_hostname': 'localhost',
            'target_port': deproxy_port,
            'deployment_dir': deployment_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('configs/two-nodes/.config-set.xml', params=params)
        self.valve = repose.ReposeValve(config_dir=config_dir,
                                        stop_port=stop_port)
        repose.wait_for_node_to_start(port=repose_port)
        repose.wait_for_node_to_start(port=repose_port + 1)

        time.sleep(startup_wait_time)
    def setUp(self):
        logger.debug('setUp')

        self.port11 = 18888
        self.port12 = 18889
        self.port21 = 18890
        self.port22 = 18891

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': 'http',
            'target_hostname': target_hostname,
            'target_port': target_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
            'port11' : self.port11,
            'port12' : self.port12,
            'port21' : self.port21,
            'port22' : self.port22,
        }
        apply_config_set('valve-self-common', params=self.params)
        apply_config_set('container-no-port', params=self.params)
        apply_config_set('two-clusters-two-nodes-each', params=self.params)
        self.repose = repose.ReposeValve(config_dir=config_dir,
                                         stop_port=stop_port)
        time.sleep(25)
    def setUp(self):
        logger.debug('setUp')

        self.port = 11111

        pathutil.clear_folder(config_dir)
        params = {
            'target_hostname': target_hostname,
            'target_port': target_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
        }
        apply_config_set('valve-self-common', params=params)
        apply_config_set('container-no-port', params=params)
        apply_config_set('zero-nodes', params=params)
        self.repose = repose.ReposeValve(config_dir=config_dir,
                                         stop_port=stop_port)
        time.sleep(25)
    def setUp(self):
        logger.debug('setUp')

        self.port = 11111

        pathutil.clear_folder(config_dir)
        params = {
            'target_hostname': target_hostname,
            'target_port': target_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
        }
        apply_config_set('valve-self-common', params=params)
        apply_config_set('container-no-port', params=params)
        apply_config_set('zero-nodes', params=params)
        self.repose = repose.ReposeValve(config_dir=config_dir,
                                         stop_port=stop_port)
        time.sleep(25)
Beispiel #14
0
    def setUp(self):
        logger.debug('setUp')

        self.port = get_next_open_port()
        self.stop_port = get_next_open_port()

        pathutil.clear_folder(config_dir)
        params = {
            'target_hostname': target_hostname,
            'target_port': target_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
        }
        apply_config_set('valve-self-common', params=params)
        apply_config_set('container-no-port', params=params)
        apply_config_set('zero-nodes', params=params)
        self.valve = valve.Valve(config_dir=config_dir,
                                 stop_port=self.stop_port)
        time.sleep(sleep_duration)
    def setUp(self):
        logger.debug('setUp')

        self.port = get_next_open_port()
        self.stop_port = get_next_open_port()

        pathutil.clear_folder(config_dir)
        params = {
            'target_hostname': target_hostname,
            'target_port': target_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
        }
        apply_config_set('valve-self-common', params=params)
        apply_config_set('container-no-port', params=params)
        apply_config_set('zero-nodes', params=params)
        self.valve = valve.Valve(config_dir=config_dir,
                                 stop_port=self.stop_port)
        time.sleep(sleep_duration)
    def setUp(self):
        logger.debug('setUp')

        self.init_params()

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': self.proto,
            'sysmod_port': self.sysmod_port,
            'target_hostname': target_hostname,
            'target_port': target_port,
            'cmd_line_port': self.cmd_line_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('valve-self-common', params=self.params)
        apply_config_set('single-node-with-proto', params=self.params)
        apply_config_set('container-no-port', params=self.params)
        self.repose = self.start_repose()
        time.sleep(25)
    def setUp(self):
        logger.debug('setUp')

        self.init_params()

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': self.proto,
            'sysmod_port': self.sysmod_port,
            'target_hostname': target_hostname,
            'target_port': target_port,
            'cmd_line_port': self.cmd_line_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('valve-self-common', params=self.params)
        apply_config_set('single-node-with-proto', params=self.params)
        apply_config_set('container-no-port', params=self.params)
        self.repose = self.start_repose()
        time.sleep(25)
    def setUp(self):
        logger.debug('setUp')

        self.init_params()

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': self.proto,
            'sysmod_port': self.sysmod_port,
            'target_hostname': target_hostname,
            'target_port': target_port,
            'con_port': self.con_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('valve-self-common', params=self.params)
        apply_config_set('single-node-with-proto', params=self.params)
        apply_config_set(self.main_config_set_name, params=self.params)
        self.repose = repose.ReposeValve(config_dir=config_dir,
                                         stop_port=stop_port)
        time.sleep(25)
Beispiel #19
0
    def setUp(self):
        logger.debug('setUp')

        deproxy_port = deproxy_port_base - 0

        self.deproxy = deproxy.Deproxy()
        self.end_point = self.deproxy.add_endpoint(('localhost', deproxy_port))

        pathutil.clear_folder(config_dir)
        params = {
            'port': repose_port,
            'target_hostname': 'localhost',
            'target_port': deproxy_port,
            'deployment_dir': deployment_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('configs/no-whitelist/.config-set.xml', params=params)
        self.valve = repose.ReposeValve(config_dir=config_dir,
                                        stop_port=stop_port, port=repose_port,
                                        wait_on_start=True)
        time.sleep(startup_wait_time)
    def setUp(self):
        logger.debug('setUp')

        self.init_params()

        pathutil.clear_folder(config_dir)
        self.params = {
            'proto': self.proto,
            'sysmod_port': self.sysmod_port,
            'target_hostname': target_hostname,
            'target_port': target_port,
            'con_port': self.con_port,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('valve-self-common', params=self.params)
        apply_config_set('single-node-with-proto', params=self.params)
        apply_config_set(self.main_config_set_name, params=self.params)
        self.repose = repose.ReposeValve(config_dir=config_dir,
                                         stop_port=stop_port)
        time.sleep(25)
Beispiel #21
0
    def setUp(self):
        logger.debug('setUp')

        deproxy_port = deproxy_port_base - 0

        self.deproxy = deproxy.Deproxy()
        self.end_point = self.deproxy.add_endpoint(deproxy_port,'localhost')

        pathutil.clear_folder(config_dir)
        params = {
            'port': repose_port,
            'target_hostname': 'localhost',
            'target_port': deproxy_port,
            'deployment_dir': deployment_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file
        }
        apply_config_set('configs/.config-set.xml', params=params)
        self.valve = valve.Valve(config_dir=config_dir,
                                        stop_port=stop_port, port=repose_port,
                                        wait_on_start=True,insecure=True)
        time.sleep(startup_wait_time)
    def setUp(self):
        logger.debug('setUp')

        self.port1 = 11111
        self.port2 = 22222
        self.port3 = 33333

        pathutil.clear_folder(config_dir)
        params = {
            'proto': 'http',
            'target_hostname': target_hostname,
            'target_port': target_port,
            'sysmod_port': self.port1,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
        }
        apply_config_set('valve-self-common', params=params)
        apply_config_set('container-no-port', params=params)
        apply_config_set('single-node-with-proto', params=params)
        self.repose = repose.ReposeValve(config_dir=config_dir,
                                         stop_port=stop_port)
        time.sleep(25)
    def setUp(self):
        logger.debug('setUp')

        self.port1 = 11111
        self.port2 = 22222
        self.port3 = 33333

        pathutil.clear_folder(config_dir)
        params = {
            'proto': 'http',
            'target_hostname': target_hostname,
            'target_port': target_port,
            'sysmod_port' : self.port1,
            'deploy_dir': deploy_dir,
            'artifact_dir': artifact_dir,
            'log_file': log_file,
        }
        apply_config_set('valve-self-common', params=params)
        apply_config_set('container-no-port', params=params)
        apply_config_set('single-node-with-proto', params=params)
        self.repose = repose.ReposeValve(config_dir=config_dir,
                                         stop_port=stop_port)
        time.sleep(25)
Beispiel #24
0
def setUpModule():
    pathutil.create_folder('test/bin')
    pathutil.create_folder('test/conf')
    pathutil.create_folder('test/log')
    pathutil.create_folder('test/var')
    #pathutil.clear_folder('test/bin')
    pathutil.clear_folder('test/conf')
    pathutil.clear_folder('test/log')
    pathutil.clear_folder('test/var')
    if not os.path.exists('test/bin/repose-valve.jar'):
        rmc = ReposeMavenConnector()
        logger.debug('Downloading valve jar')
        rmc.get_repose(valve_dest='test/bin/repose-valve.jar',
                       get_filter=False, get_ext_filter=False)
    if not os.path.exists('test/bin/filter-bundle.ear'):
        rmc = ReposeMavenConnector()
        logger.debug('Downloading filter bundle')
        rmc.get_repose(filter_dest='test/bin/filter-bundle.ear',
                       get_valve=False, get_ext_filter=False)
    logger.debug('module setup complete')
Beispiel #25
0
def setUpModule():
    pathutil.create_folder('test/bin')
    pathutil.create_folder('test/conf')
    pathutil.create_folder('test/log')
    pathutil.create_folder('test/var')
    #pathutil.clear_folder('test/bin')
    pathutil.clear_folder('test/conf')
    pathutil.clear_folder('test/log')
    pathutil.clear_folder('test/var')
    if not os.path.exists('test/bin/repose-valve.jar'):
        rmc = ReposeMavenConnector()
        logger.debug('Downloading valve jar')
        rmc.get_repose(valve_dest='test/bin/repose-valve.jar',
                       get_filter=False,
                       get_ext_filter=False)
    if not os.path.exists('test/bin/filter-bundle.ear'):
        rmc = ReposeMavenConnector()
        logger.debug('Downloading filter bundle')
        rmc.get_repose(filter_dest='test/bin/filter-bundle.ear',
                       get_valve=False,
                       get_ext_filter=False)
    logger.debug('module setup complete')