Esempio n. 1
0
    def setUpClass(cls):
        logger.debug('setting up')

        repose_port = get_next_open_port()
        stop_port = get_next_open_port()

        params = {
            'target_hostname': 'localhost',
            'target_port': deproxy_port,
            'port': repose_port,
            'repose_port': repose_port,
        }

        cls.url = 'http://localhost:{0}/resource'.format(repose_port)

        # set the common config files, like system model and container
        conf.process_folder_contents(folder='configs/common',
                                     dest_path='etc/repose', params=params)

        # set the specific config files, i.e. validator.cfg.xml
        conf.process_folder_contents(folder='configs/mf4p',
                                     dest_path='etc/repose', params=params)

        cls.repose = repose.ReposeValve(config_dir='etc/repose',
                                        stop_port=stop_port,
                                        wait_on_start=True, port=repose_port)
def apply_config_set(config_set_name, params=None):
    if params is None:
        params = {}
    conf.process_folder_contents(folder='configs/%s' % config_set_name,
                                 verbose=False,
                                 dest_path=config_dir,
                                 params=params)
Esempio n. 3
0
def apply_configs(folder, params=None):
    if params is None:
        params = {}
    conf.process_folder_contents(folder=folder,
                                 verbose=False,
                                 dest_path=config_dir,
                                 params=params)
Esempio n. 4
0
def common_setup():
    repose_port = get_next_open_port()
    stop_port = get_next_open_port()
    logger.info('stop port: {0}'.format(stop_port))
    logger.info('repose port: {0}'.format(repose_port))

    params = {
        'target_hostname': 'localhost',
        'target_port': globalvars.deproxy_port,
        'port': repose_port,
        'repose_port': repose_port,
        'identity_port': globalvars.identity_port,
    }

    url = 'http://localhost:{0}/resource'.format(repose_port)

    # configure Repose
    conf.process_folder_contents(folder='configs/common',
                                 dest_path='etc/repose',
                                 params=params)
    conf.process_folder_contents(folder='configs/auth-z',
                                 dest_path='etc/repose',
                                 params=params)

    # start Valve
    v = valve.Valve(config_dir='etc/repose',
                    stop_port=stop_port,
                    wait_on_start=True,
                    port=repose_port,
                    insecure=True)
    return (v, url)
Esempio n. 5
0
def common_setup():
    repose_port = get_next_open_port()
    stop_port = get_next_open_port()
    logger.info('stop port: {0}'.format(stop_port))
    logger.info('repose port: {0}'.format(repose_port))

    params = {
        'target_hostname': 'localhost',
        'target_port': globalvars.deproxy_port,
        'port': repose_port,
        'repose_port': repose_port,
        'identity_port': globalvars.identity_port,
    }

    url = 'http://localhost:{0}/resource'.format(repose_port)

    # configure Repose
    conf.process_folder_contents(folder='configs/common',
                                 dest_path='etc/repose', params=params)
    conf.process_folder_contents(folder='configs/auth-z',
                                 dest_path='etc/repose', params=params)

    # start Valve
    v = valve.Valve(config_dir='etc/repose', stop_port=stop_port,
                              wait_on_start=True, port=repose_port,
                              insecure=True)
    return (v, url)
Esempio n. 6
0
def apply_configs(folder, repose_port):
    params = {
        'target_hostname': 'localhost',
        'target_port': deproxy_port,
        'port': repose_port,
        'repose_port': repose_port,
    }
    conf.process_folder_contents(folder=folder, dest_path='etc/repose',
                                 params=params)
Esempio n. 7
0
def apply_configs(folder, repose_port):
    params = {
        'target_hostname': 'localhost',
        'target_port': deproxy_port,
        'port': repose_port,
        'repose_port': repose_port,
    }
    conf.process_folder_contents(folder=folder,
                                 dest_path='etc/repose',
                                 params=params)
Esempio n. 8
0
    def setUp(self):
        logger.debug('setting up')

        repose_port = get_next_open_port()
        stop_port = get_next_open_port()
        identity_port = get_next_open_port()
        atom_port = get_next_open_port()
        deproxy_port = get_next_open_port()

        logger.info('repose port: {0}'.format(repose_port))
        logger.info('stop port: {0}'.format(stop_port))
        logger.info('identity port: {0}'.format(identity_port))
        logger.info('atom port: {0}'.format(atom_port))
        logger.info('origin port: {0}'.format(deproxy_port))

        self.deproxy = deproxy.Deproxy()

        self.origin_endpoint = self.deproxy.add_endpoint(
            deproxy_port, 'origin service')

        self.identity_service = FakeIdentityService()
        handler = self.identity_service.handler
        endpoint = self.deproxy.add_endpoint(identity_port,
                                             'identity service',
                                             default_handler=handler)
        self.identity_endpoint = endpoint

        self.atom_service = FakeAtomService(atom_port)
        handler = self.atom_service.handler
        self.atom_endpoint = self.deproxy.add_endpoint(atom_port,
                                                       'atom service',
                                                       default_handler=handler)

        params = {
            'target_hostname': 'localhost',
            'target_port': deproxy_port,
            'port': repose_port,
            'repose_port': repose_port,
            'identity_port': identity_port,
            'atom_port': atom_port
        }

        self.url = 'http://localhost:{0}/resource'.format(repose_port)

        # configure Repose
        conf.process_folder_contents(folder='configs',
                                     dest_path='etc/repose',
                                     params=params)

        # start Valve
        self.valve = valve.Valve(config_dir='etc/repose',
                                 stop_port=stop_port,
                                 wait_on_start=True,
                                 port=repose_port,
                                 insecure=True)
    def setUp(self):
        logger.debug('setting up')

        repose_port = get_next_open_port()
        stop_port = get_next_open_port()
        identity_port = get_next_open_port()
        atom_port = get_next_open_port()
        deproxy_port = get_next_open_port()

        logger.info('repose port: {0}'.format(repose_port))
        logger.info('stop port: {0}'.format(stop_port))
        logger.info('identity port: {0}'.format(identity_port))
        logger.info('atom port: {0}'.format(atom_port))
        logger.info('origin port: {0}'.format(deproxy_port))

        self.deproxy = deproxy.Deproxy()

        self.origin_endpoint = self.deproxy.add_endpoint(deproxy_port,
                                                         'origin service')

        self.identity_service = FakeIdentityService()
        handler = self.identity_service.handler
        endpoint = self.deproxy.add_endpoint(identity_port, 'identity service',
                                             default_handler=handler)
        self.identity_endpoint = endpoint

        self.atom_service = FakeAtomService(atom_port)
        handler = self.atom_service.handler
        self.atom_endpoint = self.deproxy.add_endpoint(atom_port,
                                                       'atom service',
                                                       default_handler=handler)

        params = {
            'target_hostname': 'localhost',
            'target_port': deproxy_port,
            'port': repose_port,
            'repose_port': repose_port,
            'identity_port': identity_port,
            'atom_port': atom_port
        }

        self.url = 'http://localhost:{0}/resource'.format(repose_port)

        # configure Repose
        conf.process_folder_contents(folder='configs', dest_path='etc/repose',
                                     params=params)

        # start Valve
        self.valve = valve.Valve(config_dir='etc/repose', stop_port=stop_port,
                                 wait_on_start=True, port=repose_port,
                                 insecure=True)
Esempio n. 10
0
    def setUpClass(cls):
        logger.debug("setting up")

        repose_port = get_next_open_port()
        stop_port = get_next_open_port()

        params = {
            "target_hostname": "localhost",
            "target_port": deproxy_port,
            "port": repose_port,
            "repose_port": repose_port,
        }

        cls.url = "http://localhost:{0}/resource".format(repose_port)

        # set the common config files, like system model and container
        conf.process_folder_contents(folder="configs/common", dest_path="etc/repose", params=params)

        # set the specific config files, i.e. validator.cfg.xml
        conf.process_folder_contents(folder="configs/f4f5p", dest_path="etc/repose", params=params)

        cls.repose = repose.ReposeValve(
            config_dir="etc/repose", stop_port=stop_port, wait_on_start=True, port=repose_port
        )
def apply_config_set(config_set_name, params=None):
    if params is None:
        params = {}
    conf.process_folder_contents(folder='configs/%s' % config_set_name, verbose=False,
                                 dest_path=config_dir, params=params)
Esempio n. 12
0
 def setUp(self):
     self.valve = None
     logger.debug('Setting config files')
     conf.process_folder_contents(folder='test-configs',
                                  dest_path='test/conf',
                                  params={'port': 12345})
Esempio n. 13
0
def apply_configs(folder):
    conf.process_folder_contents(folder=folder, dest_path='etc/repose',
                                 params=params)
def apply_configs(folder, params=None):
    if params is None:
        params = {}
    conf.process_folder_contents(folder=folder, verbose=False,
                                 dest_path=config_dir, params=params)
Esempio n. 15
0
 def setUp(self):
     self.valve = None
     logger.debug('Setting config files')
     conf.process_folder_contents(folder='test-configs',
                                  dest_path='test/conf',
                                  params={'port': 12345})