Remove admin-state-down from lbaas-member-update

lbaas-member-update used --admin-state-down, which was deprecated
in Mitaka. It has been removed in this version using this patch.

Change-Id: I5c4492e6d121b0ae73e21aa3ba0594446fa46d3f
This commit is contained in:
reedip 2016-04-18 13:39:53 +09:00 committed by Reedip
parent 3c5b2839bf
commit 976cfe9434
2 changed files with 6 additions and 11 deletions

View File

@ -15,8 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import argparse
from neutronclient._i18n import _
from neutronclient.common import utils
from neutronclient.neutron import v2_0 as neutronV20
@ -128,27 +126,20 @@ class UpdateMember(neutronV20.UpdateCommand):
shadow_resource = 'lbaas_member'
def add_known_arguments(self, parser):
parser.add_argument(
'--admin-state-down',
dest='admin_state', action='store_false',
default=argparse.SUPPRESS,
help=_('[DEPRECATED in Mitaka] Set admin state up to false.'))
parser.add_argument(
'pool', metavar='POOL',
help=_('ID or name of the pool that this member belongs to.'))
utils.add_boolean_argument(
parser, '--admin-state-up',
dest='admin_state',
help=_('Update the administrative state of '
'the member (True meaning "Up").'))
# ToDo(reedip): After Mitaka, remove admin-state-down
_add_common_args(parser)
def args2body(self, parsed_args):
self.parent_id = _get_pool_id(self.get_client(), parsed_args.pool)
body = {}
if hasattr(parsed_args, 'admin_state'):
body['admin_state_up'] = parsed_args.admin_state
if hasattr(parsed_args, "admin_state_up"):
body['admin_state_up'] = parsed_args.admin_state_up
_parse_common_args(body, parsed_args)
return {self.resource: body}

View File

@ -0,0 +1,4 @@
---
deprecations:
- |
"admin-state-down" option was deprecated in Mitaka and has been removed in Newton.