Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yaotongms committed Oct 25, 2024
1 parent 0eb47c5 commit 2f4b052
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="The name of the settings resource.",
required=True,
id_part="child_name_1",
default="\"default\"",
fmt=AAZStrArgFormat(
pattern="default",
),
Expand Down
2 changes: 1 addition & 1 deletion src/arcgateway/azext_arcgateway/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# pylint: disable=too-many-lines
# pylint: disable=too-many-statements

# from azure.cli.core.commands import CliCommandType
from azure.cli.core.commands import CliCommandType


def load_command_table(self, _): # pylint: disable=unused-argument
Expand Down
5 changes: 2 additions & 3 deletions src/arcgateway/azext_arcgateway/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
from azure.cli.core.aaz import register_command
from .aaz.latest.arcgateway.settings import Update as _Update

@register_command(
"arcgateway settings update",
)
logger = get_logger(__name__)

class Update(_Update):
"""Update the base Settings of the target resource.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

import os, json
from azure.cli.testsdk import ScenarioTest
from azure.cli.testsdk import ResourceGroupPreparer
from .example_steps import step_private_link_resource_list
from .example_steps import step_private_link_scope_create
from .example_steps import step_private_link_scope_update
from .example_steps import step_private_link_scope_show
from .example_steps import step_private_link_scope_list
from .example_steps import step_private_link_scope_list2
from .example_steps import step_private_link_scope_update_tag
from .example_steps import step_private_endpoint_connection_update
from .example_steps import step_private_endpoint_connection_list
from .example_steps import step_private_endpoint_connection_show
from .example_steps import step_private_endpoint_connection_delete
from .example_steps import step_private_link_scope_delete
from .. import (
try_manual,
raise_if,
calc_coverage
)
from azure.cli.testsdk.scenario_tests import (
live_only
)

TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))


class SettingScenarioTest(ScenarioTest):
@live_only()
@ResourceGroupPreparer(name_prefix='cli_test_setting')
def test_setting(self):
rand_string = 'test'
self.kwargs.update({
'machine': 'testmachine',
'rg': 'manojamp',
'location': 'eastus2euap',
'subscription': '00000000-0000-0000-0000-000000000000',
'gatewayName': 'myGateway',
'newResourceGroup': 'ytongtest',
})

# # bug in the service, add back once the api version is added to the service
# self.cmd('az connectedmachine setting update '
# '--resource-group "{newResourceGroup}" '
# '--subscription "{subscription}" '
# '--base-provider "Microsoft.HybridCompute" '
# '--base-resource-type "machines" '
# '--base-resource-name "testmachine" '
# '--settings-resource-name "default" '
# '--gateway-resource-id "/subscriptions/{subscription}/resourceGroups/manojamp/providers/Microsoft.HybridCompute/gateways/amkgw1" '
# '--name "default"',
# checks=[])

0 comments on commit 2f4b052

Please sign in to comment.