Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import absolute_import
- import logging
- from django.conf import settings
- from neutronclient.v2_0 import client as neutron_client
- from horizon.utils.memoized import memoized # noqa
- from openstack_dashboard.api import neutron
- from openstack_dashboard.api.neutron import NeutronAPIDictWrapper
- LOG = logging.getLogger(__name__)
- neutronclient = neutron.neutronclient
- def reachabilitytest_list(request):
- LOG.debug("reachabilitytest_list() called")
- print("neutron api got request:")
- print(request)
- return [NeutronAPIDictWrapper({"id": "0ffb9bfa-ae27-4f78-9ea9-064176c1d1df", "name": "test1", "src_tenant_id": "tenant1", "src_segment_id": "segment1", "src_ip": "10.1.1.1", "dst_ip": "10.2.1.1", "expected_result": "dropped"})]
- """ reachabilitytests = neutronclient(request)\
- .list_reachabilitytests()
- return [NeutronAPIDictWrapper(obj) \
- for obj in reachabilitytests['reachabilitytests']]
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement