Merge "Remove 'shared' from Neutron Firewall table"

This commit is contained in:
Jenkins 2015-07-02 18:46:18 +00:00 committed by Gerrit Code Review
commit fa50d79721
5 changed files with 1 additions and 15 deletions

View File

@ -360,9 +360,6 @@ class FirewallsTable(tables.DataTable):
status = tables.Column("status",
verbose_name=_("Status"),
display_choices=STATUS_DISPLAY_CHOICES)
shared = tables.Column("shared",
verbose_name=_("Shared"),
filters=(filters.yesno, filters.capfirst))
admin_state = tables.Column("admin_state",
verbose_name=_("Admin State"),
display_choices=ADMIN_STATE_DISPLAY_CHOICES)

View File

@ -350,7 +350,6 @@ class FirewallTests(test.TestCase):
form_data = {'name': firewall.name,
'description': firewall.description,
'firewall_policy_id': firewall.firewall_policy_id,
'shared': firewall.shared,
'admin_state_up': firewall.admin_state_up
}
if router_extension:
@ -403,7 +402,6 @@ class FirewallTests(test.TestCase):
form_data = {'name': firewall.name,
'description': firewall.description,
'firewall_policy_id': None,
'shared': firewall.shared,
'admin_state_up': firewall.admin_state_up
}
api.neutron.is_extension_supported(

View File

@ -278,9 +278,6 @@ class AddFirewallAction(workflows.Action):
label=_("Description"),
required=False)
firewall_policy_id = forms.ChoiceField(label=_("Policy"))
shared = forms.BooleanField(label=_("Shared"),
initial=False,
required=False)
admin_state_up = forms.ChoiceField(choices=[(True, _('UP')),
(False, _('DOWN'))],
label=_("Admin State"))
@ -302,9 +299,6 @@ class AddFirewallAction(workflows.Action):
for p in policies:
firewall_policy_id_choices.append((p.id, p.name_or_id))
self.fields['firewall_policy_id'].choices = firewall_policy_id_choices
# only admin can set 'shared' attribute to True
if not request.user.is_superuser:
self.fields['shared'].widget.attrs['disabled'] = 'disabled'
class Meta(object):
name = _("AddFirewall")
@ -317,7 +311,7 @@ class AddFirewallAction(workflows.Action):
class AddFirewallStep(workflows.Step):
action_class = AddFirewallAction
contributes = ("name", "firewall_policy_id", "description",
"shared", "admin_state_up")
"admin_state_up")
def contribute(self, data, context):
context = super(AddFirewallStep, self).contribute(data, context)

View File

@ -325,7 +325,6 @@ class FwaasApiTests(test.APITestCase):
form_data = {'name': firewall.name,
'description': firewall.description,
'firewall_policy_id': firewall.firewall_policy_id,
'shared': firewall.shared,
'admin_state_up': firewall.admin_state_up
}

View File

@ -986,7 +986,6 @@ def data(TEST):
'router_ids': [TEST.routers.first().id],
'description': 'firewall description',
'status': 'PENDING_CREATE',
'shared': True,
'admin_state_up': True}
TEST.api_firewalls.add(fw1_dict)
@ -1003,7 +1002,6 @@ def data(TEST):
'name': '',
'description': '',
'status': 'PENDING_CREATE',
'shared': True,
'admin_state_up': True}
TEST.api_firewalls.add(fw1_dict)