Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix related to trusted access argument to create vis command #7745

Merged
merged 6 commits into from
Jun 27, 2024
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
3 changes: 3 additions & 0 deletions src/workloads/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Release History
===============

1.1.0b2
+++++++
* Fix for managed resources network access type option in create vis command
1.1.0b1
+++++++
* Add Soft Stop feature for VIS
Expand Down
2 changes: 1 addition & 1 deletion src/workloads/azext_workloads/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.55.0"
"azext.minCliCoreVersion": "2.57.0"
}
2 changes: 2 additions & 0 deletions src/workloads/azext_workloads/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def content(self):
properties.set_prop("environment", AAZStrType, ".environment", typ_kwargs={"flags": {"required": True}})
properties.set_prop("managedResourceGroupConfiguration", AAZObjectType)
properties.set_prop("sapProduct", AAZStrType, ".sap_product", typ_kwargs={"flags": {"required": True}})
properties.set_prop("managedResourcesNetworkAccessType", AAZStrType,
".managed_resources_network_access_type")

managed_resource_group_configuration = _builder.get(".properties.managedResourceGroupConfiguration")
if managed_resource_group_configuration is not None:
Expand Down

Large diffs are not rendered by default.

31 changes: 27 additions & 4 deletions src/workloads/azext_workloads/tests/latest/test_workloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,39 @@ def test_workloads_svi_update_tags(self):
@unittest.skip('recording file not getting generted properly throwing Subscription not found')
def test_workloads_svi_discover(self):
self.kwargs.update({
'name': 'C36',
'name': 'C13',
'msi': os.path.join(TEST_DIR, 'MSI.json'),
'centralservervmid': '/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/CLI-TESTING/providers/Microsoft.Compute/virtualMachines/c36ascsvm'
'centralservervmid': '/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/ps_cli_tf_rg/providers/microsoft.compute/virtualmachines/c13ascsvm'
})

self.cmd('workloads sap-virtual-instance create -g CLI-TESTING -n {name} --location eastus2euap --environment NonProd --sap-product S4HANA --central-server-vm {centralservervmid} --identity "{msi}"', checks=[
self.cmd('workloads sap-virtual-instance create -g PS_CLI_TF_RG -n {name} --location eastus --environment NonProd --sap-product S4HANA --central-server-vm {centralservervmid} --identity "{msi}"', checks=[
self.check('name', '{name}'),
self.check('resourceGroup', 'CLI-TESTING'),
self.check('resourceGroup', 'PS_CLI_TF_RG'),
self.check('sapProduct', 'S4HANA'),
self.check('environment', 'NonProd'),
self.check('provisioningState', 'Succeeded'),
self.check('configuration.configurationType', 'Discovery')
])

@unittest.skip('recording file not getting generted properly throwing Subscription not found')
def test_workloads_svi_discover_custom(self):
self.kwargs.update({
'name': 'C13',
'msi': os.path.join(TEST_DIR, 'MSI.json'),
'centralservervmid': '/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourcegroups/ps_cli_tf_rg/providers/microsoft.compute/virtualmachines/c13ascsvm',
'managedrgname': self.create_random_name(prefix='managedrg', length=15),
'managedrgsaname': self.create_random_name(prefix='managedrgsa', length=24),
'networkaccesstype': 'Private'
})

self.cmd('workloads sap-virtual-instance create -g PS_CLI_TF_RG -n {name} --location eastus --environment NonProd --sap-product S4HANA --central-server-vm {centralservervmid} --identity "{msi}" --managed-rg-name {managedrgname} --managed-rg-sa-name {managedrgsaname} --managed-resources-network-access-type {networkaccesstype}', checks=[
self.check('name', '{name}'),
self.check('resourceGroup', 'PS_CLI_TF_RG'),
self.check('sapProduct', 'S4HANA'),
self.check('environment', 'NonProd'),
self.check('managedResourceGroupConfiguration.name', '{managedrgname}'),
self.check('configuration.managedRgStorageAccountName', '{managedrgsaname}'),
self.check('managedResourcesNetworkAccessType', '{networkaccesstype}'),
self.check('provisioningState', 'Succeeded'),
self.check('configuration.configurationType', 'Discovery')
])
Expand Down
2 changes: 1 addition & 1 deletion src/workloads/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# HISTORY.rst entry.
VERSION = '1.1.0b1'
VERSION = '1.1.0b2'

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