Exemple #1
0
def test_Actions():
    """
    Tests Actions
    """
    endpoint = Endpoint('foo')
    endpoint.endpoint_data = {'mac': '00:00:00:00:00:00'}
    s = SDNConnect()
    a = Actions(endpoint, s.sdnc)
    a.mirror_endpoint()
    a.unmirror_endpoint()
    a.shutdown_endpoint()
Exemple #2
0
def test_Actions():
    """
    Tests Actions
    """
    endpoint = endpoint_factory('foo')
    endpoint.endpoint_data = {
        'mac': '00:00:00:00:00:00', 'segment': 'foo', 'port': '1'}
    controller = get_test_controller()
    s = SDNConnect(controller, logger)
    a = Actions(endpoint, s.sdnc)
    a.mirror_endpoint()
    a.unmirror_endpoint()
    a.coprocess_endpoint()
    a.uncoprocess_endpoint()
    a.shutdown_endpoint()
Exemple #3
0
def test_Actions_nosdn():
    """
    Tests Actions with no SDN controller
    """
    endpoint = Endpoint('foo')
    endpoint.endpoint_data = {
        'mac': '00:00:00:00:00:00',
        'segment': 'foo',
        'port': '1'
    }
    s = SDNConnect()
    s.sdnc = None
    a = Actions(endpoint, s.sdnc)
    a.mirror_endpoint()
    a.unmirror_endpoint()
    a.shutdown_endpoint()
Exemple #4
0
def test_Actions_nosdn():
    """
    Tests Actions with no SDN controller
    """
    endpoint = endpoint_factory('foo')
    endpoint.endpoint_data = {
        'mac': '00:00:00:00:00:00',
        'segment': 'foo',
        'port': '1'
    }
    controller = Config().get_config()
    s = SDNConnect(controller)
    s.sdnc = None
    a = Actions(endpoint, s.sdnc)
    a.mirror_endpoint()
    a.unmirror_endpoint()
    a.coprocess_endpoint()
    a.uncoprocess_endpoint()
    a.shutdown_endpoint()