Merge "Remove --shared option from firewall-create"

This commit is contained in:
Jenkins
2015-08-24 18:00:51 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 11 deletions

View File

@@ -14,8 +14,6 @@
# under the License.
#
import argparse
from neutronclient.i18n import _
from neutronclient.neutron import v2_0 as neutronv20
@@ -51,11 +49,6 @@ class CreateFirewall(neutronv20.CreateCommand):
parser.add_argument(
'--description',
help=_('Description for the firewall rule.'))
parser.add_argument(
'--shared',
action='store_true',
help=_('Set shared to True (default is False).'),
default=argparse.SUPPRESS)
parser.add_argument(
'--admin-state-down',
dest='admin_state',
@@ -83,8 +76,7 @@ class CreateFirewall(neutronv20.CreateCommand):
neutronv20.find_resourceid_by_name_or_id(client, 'router', r)
for r in parsed_args.routers]
neutronv20.update_dict(parsed_args, body[self.resource],
['name', 'description', 'shared',
'tenant_id'])
['name', 'description', 'tenant_id'])
return body

View File

@@ -47,7 +47,6 @@ class CLITestV20FirewallJSON(test_cli20.CLITestV20Base):
tenant_id = 'my-tenant'
my_id = 'my-id'
args = ['--description', description,
'--shared',
'--admin-state-down',
'--tenant-id', tenant_id,
policy_id]
@@ -56,7 +55,7 @@ class CLITestV20FirewallJSON(test_cli20.CLITestV20Base):
self._test_create_resource(resource, cmd, name, my_id, args,
position_names, position_values,
description=description,
shared=True, admin_state_up=False,
admin_state_up=False,
tenant_id=tenant_id)
def test_create_firewall_with_routers(self):