/usr/lib/python2.7/dist-packages/manila_ui/dashboards/project/shares/security_services/tables.py is in python-manila-ui 2.5.1-0.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | # Copyright (c) 2014 NetApp, Inc.
# All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from django.utils.translation import ugettext_lazy as _
from horizon import tables
from manila_ui.api import manila
class Create(tables.LinkAction):
name = "create_security_service"
verbose_name = _("Create Security Service")
url = "horizon:project:shares:create_security_service"
classes = ("ajax-modal", "btn-create")
icon = "plus"
policy_rules = (("share", "security_service:create"),)
class Delete(tables.DeleteAction):
data_type_singular = _("Security Service")
data_type_plural = _("Security Services")
policy_rules = (("share", "security_service:delete"),)
def delete(self, request, obj_id):
manila.security_service_delete(request, obj_id)
class Edit(tables.LinkAction):
name = "edit"
verbose_name = _("Edit Security Service")
url = "horizon:project:shares:update_security_service"
classes = ("ajax-modal", "btn-create")
policy_rules = (("share", "security_service:update"),)
class SecurityServiceTable(tables.DataTable):
name = tables.WrappingColumn(
"name", verbose_name=_("Name"),
link="horizon:project:shares:security_service_detail")
dns_ip = tables.Column("dns_ip", verbose_name=_("DNS IP"))
server = tables.Column("server", verbose_name=_("Server"))
domain = tables.Column("domain", verbose_name=_("Domain"))
user = tables.Column("user", verbose_name=_("User"))
def get_object_display(self, security_service):
return security_service.name or str(security_service.id)
def get_object_id(self, security_service):
return str(security_service.id)
class Meta(object):
name = "security_services"
verbose_name = _("Security Services")
table_actions = (
tables.NameFilterAction,
Create,
Delete)
row_actions = (
Edit,
Delete)
|