Advertisement
Guest User

Untitled

a guest
Feb 15th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.98 KB | None | 0 0
  1. from __future__ import absolute_import
  2.  
  3. import logging
  4.  
  5. from django.conf import settings
  6. from neutronclient.v2_0 import client as neutron_client
  7.  
  8. from horizon.utils.memoized import memoized  # noqa
  9. from openstack_dashboard.api import neutron
  10. from openstack_dashboard.api.neutron import NeutronAPIDictWrapper
  11.  
  12.  
  13. LOG = logging.getLogger(__name__)
  14.  
  15. neutronclient = neutron.neutronclient
  16.  
  17. def reachabilitytest_list(request):
  18.     LOG.debug("reachabilitytest_list() called")
  19.     print("neutron api got request:")
  20.     print(request)
  21.     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"})]
  22.  
  23. """    reachabilitytests = neutronclient(request)\
  24.                            .list_reachabilitytests()
  25.    return [NeutronAPIDictWrapper(obj) \
  26.                for obj in reachabilitytests['reachabilitytests']]
  27. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement