def __init__(self, *args, **kwargs): super(GenericConfigEventHandlerTestCase, self).__init__( *args, **kwargs) self.fo = fo.FakeObjects() self.empty = self.fo.empty_dict self.context = {'notification_data': {}, 'resource': 'interfaces'}
def __init__(self, *args, **kwargs): super(FwGenericConfigDriverTestCase, self).__init__(*args, **kwargs) self.fo = fo.FakeObjects() with mock.patch.object(cfg, 'CONF') as mock_cfg: mock_cfg.configure_mock(rest_timeout=120, host='foo') self.driver = fw_dvr.FwaasDriver(mock_cfg) self.resp = mock.Mock() self.fake_resp_dict = {'status': True, 'reason': 'not found!'} self.kwargs = self.fo._fake_resource_data()
def __init__(self, *args, **kwargs): super(FwaasDriverTestCase, self).__init__(*args, **kwargs) self.fo = fo.FakeObjects() with mock.patch.object(cfg, 'CONF') as mock_cfg: mock_cfg.configure_mock(rest_timeout=self.fo.timeout, host='foo') self.driver = fw_dvr.FwaasDriver(mock_cfg) self.resp = mock.Mock() self.fake_resp_dict = { 'status': True, 'message': 'something', 'config_success': True, 'delete_success': True } self.fo.firewall = self.fo._fake_firewall_obj() self.firewall = jsonutils.dumps(self.fo.firewall)
def __init__(self, *args, **kwargs): super(FwaasHandlerTestCase, self).__init__(*args, **kwargs) self.fo = fo.FakeObjects() self.ev = fo.FakeEventFirewall() self.firewall_rule = { 'id': 'rule-id', 'action': 'allow', 'destination_ip_address': '', 'destination_port': '80', 'enabled': 'enabled', 'ip_version': 'v4', 'protocol': 'tcp', 'source_ip_address': '', 'source_port': '', 'shared': False, 'position': 1 } self.ev.data['context']['agent_info']['resource'] = 'firewall'
def __init__(self, *args, **kwargs): super(GenericConfigRpcManagerTestCase, self).__init__(*args, **kwargs) self.fo = fo.FakeObjects()
def __init__(self, *args, **kwargs): super(FWaasRpcManagerTestCase, self).__init__(*args, **kwargs) self.fo = fo.FakeObjects()
def __init__(self, *args, **kwargs): super(FwaasHandlerTestCase, self).__init__(*args, **kwargs) self.fo = fo.FakeObjects() self.ev = fo.FakeEventFirewall() self.ev.data['context']['agent_info']['resource'] = 'firewall'
def __init__(self, *args, **kwargs): super(ServiceAgentDemuxerTestCase, self).__init__(*args, **kwargs) self.fo = fo.FakeObjects() self.demuxer = demuxer.ServiceAgentDemuxer() self.maxDiff = None