Пример #1
0
    def test_pool_health_monitor_create(self):
        form_data = {
            'type': 'PING',
            'delay': '10',
            'timeout': '10',
            'max_retries': '10',
            'admin_state_up': True
        }
        monitor = {
            'health_monitor': {
                'id': 'abcdef-c3eb-4fee-9763-12de3338041e',
                'type': 'PING',
                'delay': '10',
                'timeout': '10',
                'max_retries': '10',
                'admin_state_up': True
            }
        }
        neutronclient.create_health_monitor({
            'health_monitor': form_data
        }).AndReturn(monitor)
        self.mox.ReplayAll()

        ret_val = api.lbaas.pool_health_monitor_create(self.request,
                                                       **form_data)
        self.assertIsInstance(ret_val, api.lbaas.PoolMonitor)
    def test_pool_health_monitor_create(self):
        form_data = {'type': 'PING',
                     'delay': '10',
                     'timeout': '10',
                     'max_retries': '10',
                     'admin_state_up': True
                     }
        monitor = {'health_monitor': {
                'id': 'abcdef-c3eb-4fee-9763-12de3338041e',
                'type': 'PING',
                'delay': '10',
                'timeout': '10',
                'max_retries': '10',
                'admin_state_up': True}}
        neutronclient.create_health_monitor({
                'health_monitor': form_data}).AndReturn(monitor)
        self.mox.ReplayAll()

        ret_val = api.lbaas.pool_health_monitor_create(
            self.request, **form_data)
        self.assertIsInstance(ret_val, api.lbaas.PoolMonitor)