Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/azure-cli/azure/cli/command_modules/storage/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statem
routing_choice_type = CLIArgumentType(
arg_group='Routing Preference', arg_type=get_enum_type(t_routing_choice),
help='Routing Choice defines the kind of network routing opted by the user.',
is_preview=True, min_api='2019-06-01')
min_api='2019-06-01')
publish_microsoft_endpoints_type = CLIArgumentType(
arg_group='Routing Preference', arg_type=get_three_state_flag(), is_preview=True, min_api='2019-06-01',
arg_group='Routing Preference', arg_type=get_three_state_flag(), min_api='2019-06-01',
help='A boolean flag which indicates whether microsoft routing storage endpoints are to be published.')
publish_internet_endpoints_type = CLIArgumentType(
arg_group='Routing Preference', arg_type=get_three_state_flag(), is_preview=True, min_api='2019-06-01',
arg_group='Routing Preference', arg_type=get_three_state_flag(), min_api='2019-06-01',
help='A boolean flag which indicates whether internet routing storage endpoints are to be published.')

umask_type = CLIArgumentType(
Expand All @@ -144,12 +144,6 @@ def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statem
timeout_type = CLIArgumentType(
help='Request timeout in seconds. Applies to each call to the service.', type=int
)
marker_type = CLIArgumentType(
help='A string value that identifies the portion of the list of containers to be '
'returned with the next listing operation. The operation returns the NextMarker value within '
'the response body if the listing operation did not return all containers remaining to be listed '
'with the current page. If specified, this generator will begin returning results from the point '
'where the previous generator stopped.')

marker_type = CLIArgumentType(
help='A string value that identifies the portion of the list of containers to be '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
logger = get_logger(__name__)


def str2bool(v):
if v is not None:
return v.lower() == "true"
return v


def check_name_availability(cmd, client, name):
StorageAccountCheckNameAvailabilityParameters = cmd.get_models('StorageAccountCheckNameAvailabilityParameters')
account_name = StorageAccountCheckNameAvailabilityParameters(name=name)
Expand Down Expand Up @@ -128,8 +122,8 @@ def create_storage_account(cmd, resource_group_name, account_name, sku=None, loc
RoutingPreference = cmd.get_models('RoutingPreference')
params.routing_preference = RoutingPreference(
routing_choice=routing_choice,
publish_microsoft_endpoints=str2bool(publish_microsoft_endpoints),
publish_internet_endpoints=str2bool(publish_internet_endpoints)
publish_microsoft_endpoints=publish_microsoft_endpoints,
publish_internet_endpoints=publish_internet_endpoints
)
if allow_blob_public_access is not None:
params.allow_blob_public_access = allow_blob_public_access
Expand Down Expand Up @@ -353,9 +347,9 @@ def update_storage_account(cmd, instance, sku=None, tags=None, custom_domain=Non
if routing_choice is not None:
params.routing_preference.routing_choice = routing_choice
if publish_microsoft_endpoints is not None:
params.routing_preference.publish_microsoft_endpoints = str2bool(publish_microsoft_endpoints)
params.routing_preference.publish_microsoft_endpoints = publish_microsoft_endpoints
if publish_internet_endpoints is not None:
params.routing_preference.publish_internet_endpoints = str2bool(publish_internet_endpoints)
params.routing_preference.publish_internet_endpoints = publish_internet_endpoints

if allow_blob_public_access is not None:
params.allow_blob_public_access = allow_blob_public_access
Expand Down
Loading