Skip to content

Commit f293441

Browse files
committed
removing parameter options
1 parent 09cf3c9 commit f293441

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License. See License.txt in the project root for license information.
3+
# --------------------------------------------------------------------------------------------
4+
5+
from azure.cli.core.breaking_change import register_other_breaking_change
6+
7+
register_other_breaking_change('sf managed-application update', 'Options list has changed, run help command to see allowed options')

src/azure-cli/azure/cli/command_modules/servicefabric/_params.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ def load_arguments(self, _): # pylint: disable=too-many-statements
178178
c.argument('maximum_nodes', arg_type=maximum_nodes)
179179
c.argument('force_restart', arg_type=get_three_state_flag(),
180180
help='Indicates that the service host restarts even if the upgrade is a configuration-only change.')
181-
c.argument('service_type_health_policy_map', options_list=['--service-type-health-policy-map', '--service-type-policy'],
181+
c.argument('service_type_health_policy_map', options_list=['--service-type-health-policy-map'],
182182
help='Specify the map of the health policy to use for different service types as a hash table in the following format: {\"ServiceTypeName\" : \"MaxPercentUnhealthyPartitionsPerService,MaxPercentUnhealthyReplicasPerPartition,MaxPercentUnhealthyServices\"}. For example: @{ \"ServiceTypeName01\" = \"5,10,5\"; \"ServiceTypeName02\" = \"5,5,5\" }')
183183

184184
with self.argument_context('sf application update', arg_group='Upgrade description') as c:
185-
c.argument('upgrade_replica_set_check_timeout', options_list=['--upgrade-replica-set-check-timeout', '--replica-check-timeout', '--rep-check-timeout'],
185+
c.argument('upgrade_replica_set_check_timeout', options_list=['--replica-check-timeout', '--rep-check-timeout'],
186186
help='Specify the maximum time, in seconds, that Service Fabric waits for a service to reconfigure into a safe state, if not already in a safe state, before Service Fabric proceeds with the upgrade.')
187187
c.argument('failure_action', arg_type=get_enum_type(['Rollback', 'Manual']),
188188
help='Specify the action to take if the monitored upgrade fails. The acceptable values for this parameter are Rollback or Manual.')
@@ -198,13 +198,13 @@ def load_arguments(self, _): # pylint: disable=too-many-statements
198198
help='Specify the maximum time, in seconds, that Service Fabric takes for the entire upgrade. After this period, the upgrade fails.')
199199
c.argument('consider_warning_as_error', options_list=['--warning-as-error', '--consider-warning-as-error'], arg_type=get_three_state_flag(),
200200
help='Indicates whether to treat a warning health event as an error event during health evaluation.')
201-
c.argument('default_service_type_max_percent_unhealthy_partitions_per_service', options_list=['--max-porcent-unhealthy-partitions', '--max-unhealthy-parts'],
201+
c.argument('default_service_type_max_percent_unhealthy_partitions_per_service', options_list=['--max-unhealthy-parts'],
202202
help='Specify the maximum percent of unhelthy partitions per service allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are form 0 to 100.')
203-
c.argument('default_service_type_max_percent_unhealthy_replicas_per_partition', options_list=['--max-porcent-unhealthy-replicas', '--max-unhealthy-reps'],
203+
c.argument('default_service_type_max_percent_unhealthy_replicas_per_partition', options_list=['--max-unhealthy-reps'],
204204
help='Specify the maximum percent of unhelthy replicas per service allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are form 0 to 100.')
205-
c.argument('default_service_type_max_percent_unhealthy_services', options_list=['--max-porcent-unhealthy-services', '--max-unhealthy-servs'],
205+
c.argument('default_service_type_max_percent_unhealthy_services', options_list=['--max-unhealthy-servs'],
206206
help='Specify the maximum percent of unhelthy services allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are form 0 to 100.')
207-
c.argument('max_percent_unhealthy_deployed_applications', options_list=['--max-porcent-unhealthy-apps', '--max-unhealthy-apps'],
207+
c.argument('max_percent_unhealthy_deployed_applications', options_list=['--max-unhealthy-apps'],
208208
help='Specify the maximum percentage of the application instances deployed on the nodes in the cluster that have a health state of error before the application health state for the cluster is error. Allowed values are form 0 to 100.')
209209

210210
with self.argument_context('sf application create', validator=validate_create_application) as c:
@@ -368,7 +368,7 @@ def load_arguments(self, _): # pylint: disable=too-many-statements
368368

369369
# managed-application
370370
service_type_health_policy_map = CLIArgumentType(
371-
options_list=['--service-type-health-policy-map', '--service-type-policy'],
371+
options_list=['--service-type-health-policy-map'],
372372
action=AddServiceTypeHealthPolicyAction,
373373
nargs='*',
374374
help='Specify the map of the health policy to use for different service types as key/value pairs in the following format: \"ServiceTypeName\"=\"MaxPercentUnhealthyPartitionsPerService,MaxPercentUnhealthyReplicasPerPartition,MaxPercentUnhealthyServices\". '
@@ -387,9 +387,9 @@ def load_arguments(self, _): # pylint: disable=too-many-statements
387387
help='Indicates that the service host restarts even if the upgrade is a configuration-only change.')
388388
c.argument('recreate_application', arg_type=get_three_state_flag(),
389389
help='Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed.')
390-
c.argument('upgrade_replica_set_check_timeout', options_list=['--upgrade-replica-set-check-timeout', '--replica-check-timeout', '--rep-check-timeout'],
390+
c.argument('upgrade_replica_set_check_timeout', options_list=['--replica-check-timeout', '--rep-check-timeout'],
391391
help='Specify the maximum time, in seconds, that Service Fabric waits for a service to reconfigure into a safe state, if not already in a safe state, before Service Fabric proceeds with the upgrade.')
392-
c.argument('instance_close_delay_duration', options_list=['--instance-close-delay-duration', '--instance-close-duration', '--close-duration'],
392+
c.argument('instance_close_delay_duration', options_list=['--instance-close-delay-duration'],
393393
help='Specify the duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description.')
394394
c.argument('failure_action', arg_type=get_enum_type(FailureAction),
395395
help='Specify the action to take if the monitored upgrade fails. The acceptable values for this parameter are Rollback or Manual.')
@@ -405,16 +405,16 @@ def load_arguments(self, _): # pylint: disable=too-many-statements
405405
help='Specify the maximum time, in seconds, that Service Fabric takes to upgrade a single upgrade domain. After this period, the upgrade fails.')
406406
c.argument('upgrade_timeout',
407407
help='Specify the maximum time, in seconds, that Service Fabric takes for the entire upgrade. After this period, the upgrade fails.')
408-
c.argument('consider_warning_as_error', options_list=['--warning-as-error', '--consider-warning-as-error'], arg_type=get_three_state_flag(),
408+
c.argument('consider_warning_as_error', options_list=['--warning-as-error'], arg_type=get_three_state_flag(),
409409
help='Indicates whether to treat a warning health event as an error event during health evaluation.')
410-
c.argument('default_service_type_max_percent_unhealthy_partitions_per_service', options_list=['--max-percent-unhealthy-partitions', '--max-unhealthy-parts'],
410+
c.argument('default_service_type_max_percent_unhealthy_partitions_per_service', options_list=['--max-unhealthy-parts'],
411411
help='Specify the maximum percent of unhelthy partitions per service allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are from 0 to 100.')
412-
c.argument('default_service_type_max_percent_unhealthy_replicas_per_partition', options_list=['--max-percent-unhealthy-replicas', '--max-unhealthy-reps'],
412+
c.argument('default_service_type_max_percent_unhealthy_replicas_per_partition', options_list=['--max-unhealthy-reps'],
413413
help='Specify the maximum percent of unhelthy replicas per service allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are from 0 to 100.')
414-
c.argument('default_service_type_max_percent_unhealthy_services', options_list=['--max-percent-unhealthy-services', '--max-unhealthy-servs'],
414+
c.argument('default_service_type_max_percent_unhealthy_services', options_list=['--max-unhealthy-servs'],
415415
help='Specify the maximum percent of unhelthy services allowed by the health policy for the default service type to use for the monitored upgrade. Allowed values are from 0 to 100.')
416416
c.argument('service_type_health_policy_map', arg_type=service_type_health_policy_map)
417-
c.argument('max_percent_unhealthy_deployed_applications', options_list=['--max-percent-unhealthy-deployed-applications', '--max-percent-unhealthy-apps', '--max-unhealthy-apps'],
417+
c.argument('max_percent_unhealthy_deployed_applications', options_list=['--max-unhealthy-apps'],
418418
help='Specify the maximum percentage of the application instances deployed on the nodes in the cluster that have a health state of error before the application health state for the cluster is error. Allowed values are form 0 to 100.')
419419

420420
with self.argument_context('sf managed-application create', validator=validate_create_managed_application) as c:

0 commit comments

Comments
 (0)