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
7 changes: 0 additions & 7 deletions src/azure-cli/azure/cli/command_modules/hdinsight/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@
az hdinsight create -t spark -g MyResourceGroup -n MyCluster \\
-p "HttpPassword1234!" \\
--storage-account MyStorageAccount --encryption-at-host true
- name: Create a cluster with private link settings.
text: |-
az hdinsight create --esp -t spark -g MyResourceGroup -n MyCluster \\
-p "HttpPassword1234!" \\
--storage-account MyStorageAccount \\
--subnet "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1" \\
--public-network-access-type OutboundOnly --outbound-public-network-access-type PublicLoadBalancer
- name: Create a cluster with the Enterprise Security Package (ESP).
text: |-
az hdinsight create --esp -t spark -g MyResourceGroup -n MyCluster \\
Expand Down
12 changes: 1 addition & 11 deletions src/azure-cli/azure/cli/command_modules/hdinsight/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def load_arguments(self, _):
from ._completers import subnet_completion_list, cluster_admin_account_completion_list, \
cluster_user_group_completion_list, get_resource_name_completion_list_under_subscription
from knack.arguments import CLIArgumentType
from azure.mgmt.hdinsight.models import Tier, JsonWebKeyEncryptionAlgorithm, PublicNetworkAccess, \
OutboundOnlyPublicNetworkAccessType
from azure.mgmt.hdinsight.models import Tier, JsonWebKeyEncryptionAlgorithm
from argcomplete.completers import FilesCompleter
node_size_type = CLIArgumentType(arg_group='Node',
help='The size of the node. See also: https://docs.microsoft.com/azure/'
Expand Down Expand Up @@ -185,15 +184,6 @@ def load_arguments(self, _):
'Microsoft.ManagedIdentity/userAssignedIdentities'),
help="The name or ID of user assigned identity.")

# Private Link Network Settings
c.argument('public_network_access_type', arg_group='Private Link Network Settings',
arg_type=get_enum_type(PublicNetworkAccess), help='The public network access type.',
deprecate_info=c.deprecate(expiration='2.14.0'))
c.argument('outbound_public_network_access_type', arg_group='Private Link Network Settings',
arg_type=get_enum_type(OutboundOnlyPublicNetworkAccessType),
help='The outbound only public network access type.',
deprecate_info=c.deprecate(expiration='2.14.0'))

# Encryption In Transit
c.argument('encryption_in_transit', arg_group='Encryption In Transit', arg_type=get_three_state_flag(),
help='Indicates whether enable encryption in transit.')
Expand Down
15 changes: 4 additions & 11 deletions src/azure-cli/azure/cli/command_modules/hdinsight/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
assign_identity=None,
minimal_tls_version=None,
encryption_vault_uri=None, encryption_key_name=None, encryption_key_version=None,
encryption_algorithm='RSA-OAEP', public_network_access_type=None,
outbound_public_network_access_type=None, encryption_in_transit=None,
encryption_algorithm='RSA-OAEP', encryption_in_transit=None,
autoscale_type=None, autoscale_min_workernode_count=None, autoscale_max_workernode_count=None,
timezone=None, days=None, time=None, autoscale_workernode_count=None,
encryption_at_host=None, esp=False, idbroker=False, no_validation_timeout=False):
Expand All @@ -43,7 +42,7 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
ClusterDefinition, ComputeProfile, HardwareProfile, Role, OsProfile, LinuxOperatingSystemProfile, \
StorageProfile, StorageAccount, DataDisksGroups, SecurityProfile, \
DirectoryType, DiskEncryptionProperties, Tier, SshProfile, SshPublicKey, \
KafkaRestProperties, ClientGroupInfo, NetworkSettings, EncryptionInTransitProperties, \
KafkaRestProperties, ClientGroupInfo, EncryptionInTransitProperties, \
Autoscale, AutoscaleCapacity, AutoscaleRecurrence, AutoscaleSchedule, AutoscaleTimeAndCapacity

validate_esp_cluster_create_params(esp, cluster_name, resource_group_name, cluster_type,
Expand Down Expand Up @@ -117,7 +116,7 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
storage_account_key = key

# Attempt to provide a default container for WASB storage accounts
if not storage_default_container and is_wasb:
if not storage_default_container and storage_account and is_wasb:
storage_default_container = cluster_name.lower()
logger.warning('Default WASB container not specified, using "%s".', storage_default_container)
elif not storage_default_filesystem and not is_wasb:
Expand Down Expand Up @@ -275,7 +274,7 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
key=storage_account_key,
container=storage_default_container,
file_system=storage_default_filesystem,
resource_id=None if is_wasb else storage_account,
resource_id=storage_account,
msi_resource_id=storage_account_managed_identity,
is_default=True
)
Expand Down Expand Up @@ -338,11 +337,6 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
)
)

network_settings = (public_network_access_type or outbound_public_network_access_type) and NetworkSettings(
public_network_access=public_network_access_type,
outbound_only_public_network_access_type=outbound_public_network_access_type
)

encryption_in_transit_properties = encryption_in_transit and EncryptionInTransitProperties(
is_encryption_in_transit_enabled=encryption_in_transit
)
Expand All @@ -369,7 +363,6 @@ def create_cluster(cmd, client, cluster_name, resource_group_name, cluster_type,
disk_encryption_properties=disk_encryption_properties,
kafka_rest_properties=kafka_rest_properties,
min_supported_tls_version=minimal_tls_version,
network_settings=network_settings,
encryption_in_transit_properties=encryption_in_transit_properties
),
identity=cluster_identity
Expand Down
Loading