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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

/src/storage-or-preview/ @Juliehzl

/src/logic/ @bquantump
/src/logic/ @jsntcy @msyyc @kairu

/src/hardware-security-modules/ @bquantump

Expand Down
4 changes: 4 additions & 0 deletions src/logic/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

0.1.2
++++++
* `logic workflow update`: --definition is not to be mandatory while updating

0.1.1
++++++
* Fix parsing argument --integration-service-environment.
Expand Down
2 changes: 1 addition & 1 deletion src/logic/azext_logic/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.3.1"
"azext.minCliCoreVersion": "2.15.0"
}
37 changes: 37 additions & 0 deletions src/logic/azext_logic/manual/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from knack.util import CLIError


def logic_workflow_update(cmd,
client,
resource_group_name,
name,
definition=None,
tags=None,
state=None):

from azure.cli.core.azclierror import ValidationError

if definition is not None and "definition" not in definition:
raise ValidationError(str(definition) + " does not contain a 'definition' key")

workflow = client.get(resource_group_name=resource_group_name, workflow_name=name)

from ..generated.custom import logic_workflow_create
return logic_workflow_create(
cmd,
client,
resource_group_name,
name,
definition=definition if definition else {"definition": workflow.definition},
location=workflow.location,
tags=tags if tags else workflow.tags,
state=state if state else workflow.state,
endpoints_configuration=workflow.endpoints_configuration,
integration_account=workflow.integration_account,
integration_service_environment=workflow.integration_service_environment,
)
349 changes: 295 additions & 54 deletions src/logic/azext_logic/tests/latest/recordings/test_logic.yaml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/logic/azext_logic/tests/latest/test_logic_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ def test_logic(self, resource_group):
checks=[JMESPathCheck('tags.atag', 123),
JMESPathCheck('definition.triggers.When_a_feed_item_is_published.recurrence.interval', 2)])

self.cmd('az logic workflow update '
'--resource-group "{rg}" '
'--tag atag=foo '
'--name "{testWorkflow}"',
checks=[JMESPathCheck('tags.atag', 'foo'),
JMESPathCheck('definition.triggers.When_a_feed_item_is_published.recurrence.interval', 2)])

self.cmd('az logic workflow delete '
'--resource-group "{rg}" '
'--name "{testWorkflow}" '
Expand Down
2 changes: 1 addition & 1 deletion src/logic/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '0.1.1'
VERSION = '0.1.2'

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