Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions src/bastion/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Release History
===============
1.4.1
++++++
* Enable SSH connectivity support for Developer SKU.

1.4.0
++++++
* Add support for bastion developer create.
Expand Down
11 changes: 9 additions & 2 deletions src/bastion/azext_bastion/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ def ssh_bastion_host(cmd, auth_type, target_resource_id, target_ip_address, reso
if not resource_port:
resource_port = 22

if _is_sku_standard_or_higher(bastion['sku']['name']) is not True or \
bastion['enableTunneling'] is not True:
if not _is_nativeclient_enabled(bastion):
raise ClientRequestError('Bastion Host SKU must be Standard or Premium and Native Client must be enabled.')

ip_connect = _is_ipconnect_request(bastion, target_ip_address)
Expand Down Expand Up @@ -389,6 +388,14 @@ def _is_sku_standard_or_higher(sku):
return sku in allowed_skus


def _is_nativeclient_enabled(bastion):
if bastion['sku']['name'] == BastionSku.Developer.value:
return True
if _is_sku_standard_or_higher(bastion['sku']['name']):
return bastion['enableTunneling']
return False


def handle_error_response(response):
try:
errorMessage = json.loads(response.content).get('message', None)
Expand Down
2 changes: 1 addition & 1 deletion src/bastion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# HISTORY.rst entry.
VERSION = '1.4.0'
VERSION = '1.4.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
Loading