def handle(self, request, data): try: reachabilitytest = neutron.reachabilitytest_create(request, **data) msg = _("Reachability Test %s was successfully created") \ % data['name'] LOG.debug(msg) messages.success(request, msg) return reachabilitytest except Exception: exceptions.handle(request, _("Failed to create reachability test"))
def handle(self, request, data): try: extract_src_tenant_and_segment(data) reachabilitytest = neutron.reachabilitytest_create(request, **data) msg = _("Reachability Test %s was successfully created") \ % data['name'] LOG.debug(msg) messages.success(request, msg) return reachabilitytest except Exception as e: exceptions.handle(request, _("Failed to create reachability test. Info: " "%s") % e.message)
def post(self, request): result = bsnneutron.reachabilitytest_create(request, **request.DATA) return result