

def handle(self, request, context):
    try:
        data = {
            'vpnservice': {
                'name': context['name'],
                'description': context['description'],
                'admin_state_up': context['admin_state_up'],
            },
        }
        vpnservice = api.vpn.vpnservice_update(request, context['vpnservice_id'], **data)
        msg = (_('VPN Service %s was successfully updated.') % context['name'])
        LOG.debug(msg)
        messages.success(request, msg)
        return vpnservice
    except Exception as e:
        msg = (_('Failed to update VPN Service %s') % context['name'])
        LOG.info(('%s: %s' % (msg, e)))
        redirect = reverse(self.failure_url)
        exceptions.handle(request, msg, redirect=redirect)

dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/project/vpn/forms.py UpdateVPNService.handle/original