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

[AutoPR datafactory] [DataFactory] add traceLevel, continueOnError, and runConcurrently properties to Da… #438

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 0 additions & 4 deletions src/datafactory/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
Release History
===============

0.2.0
++++++
* add update command for linked services and triggers and datasets

0.1.0
++++++
* Initial release.
27 changes: 15 additions & 12 deletions src/datafactory/azext_datafactory/generated/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@

helps['datafactory factory list'] = """
type: command
short-summary: "Lists factories under the specified subscription."
short-summary: "Lists factories. And Lists factories under the specified subscription."
examples:
- name: Factories_ListByResourceGroup
text: |-
az datafactory factory list --resource-group "exampleResourceGroup"
- name: Factories_List
text: |-
az datafactory factory list
"""

helps['datafactory factory show'] = """
Expand All @@ -37,7 +40,7 @@

helps['datafactory factory create'] = """
type: command
short-summary: "Creates or updates a factory."
short-summary: "Create a factory."
parameters:
- name: --factory-vsts-configuration
short-summary: "Factory's VSTS repo information."
Expand Down Expand Up @@ -203,7 +206,7 @@

helps['datafactory integration-runtime managed create'] = """
type: command
short-summary: "Creates or updates an integration runtime."
short-summary: "Create an integration runtime."
"""

helps['datafactory integration-runtime self-hosted'] = """
Expand All @@ -213,7 +216,7 @@

helps['datafactory integration-runtime self-hosted create'] = """
type: command
short-summary: "Creates or updates an integration runtime."
short-summary: "Create an integration runtime."
examples:
- name: IntegrationRuntimes_Create
text: |-
Expand Down Expand Up @@ -432,7 +435,7 @@

helps['datafactory linked-service create'] = """
type: command
short-summary: "Creates or updates a linked service."
short-summary: "Create a linked service."
examples:
- name: LinkedServices_Create
text: |-
Expand All @@ -444,7 +447,7 @@

helps['datafactory linked-service update'] = """
type: command
short-summary: "Creates or updates a linked service."
short-summary: "Update a linked service."
examples:
- name: LinkedServices_Update
text: |-
Expand Down Expand Up @@ -488,7 +491,7 @@

helps['datafactory dataset create'] = """
type: command
short-summary: "Creates or updates a dataset."
short-summary: "Create a dataset."
examples:
- name: Datasets_Create
text: |-
Expand All @@ -502,7 +505,7 @@

helps['datafactory dataset update'] = """
type: command
short-summary: "Creates or updates a dataset."
short-summary: "Update a dataset."
parameters:
- name: --folder
short-summary: "The folder that this Dataset is in. If not specified, Dataset will appear at the root level."
Expand Down Expand Up @@ -556,7 +559,7 @@

helps['datafactory pipeline create'] = """
type: command
short-summary: "Creates or updates a pipeline."
short-summary: "Create a pipeline."
examples:
- name: Pipelines_Create
text: |-
Expand All @@ -576,7 +579,7 @@

helps['datafactory pipeline update'] = """
type: command
short-summary: "Creates or updates a pipeline."
short-summary: "Update a pipeline."
examples:
- name: Pipelines_Update
text: |-
Expand Down Expand Up @@ -739,7 +742,7 @@

helps['datafactory trigger create'] = """
type: command
short-summary: "Creates or updates a trigger."
short-summary: "Create a trigger."
examples:
- name: Triggers_Create
text: |-
Expand All @@ -753,7 +756,7 @@

helps['datafactory trigger update'] = """
type: command
short-summary: "Creates or updates a trigger."
short-summary: "Update a trigger."
examples:
- name: Triggers_Update
text: |-
Expand Down
2 changes: 2 additions & 0 deletions src/datafactory/azext_datafactory/generated/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def load_arguments(self, _):
'GitHub repo information.', arg_group='RepoConfiguration')
c.argument('global_parameters', type=validate_file_or_dict, help='List of parameters for factory. Expected '
'value: json-string/@json-file.')
c.argument('public_network_access', arg_type=get_enum_type(['Enabled', 'Disabled']), help='Whether or not '
'public network access is allowed for the data factory.')

with self.argument_context('datafactory factory update') as c:
c.argument('resource_group_name', resource_group_name_type)
Expand Down
8 changes: 5 additions & 3 deletions src/datafactory/azext_datafactory/generated/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def datafactory_factory_create(client,
tags=None,
factory_vsts_configuration=None,
factory_git_hub_configuration=None,
global_parameters=None):
global_parameters=None,
public_network_access=None):
all_repo_configuration = []
if factory_vsts_configuration is not None:
all_repo_configuration.append(factory_vsts_configuration)
Expand All @@ -56,7 +57,8 @@ def datafactory_factory_create(client,
tags=tags,
identity=None,
repo_configuration=repo_configuration,
global_parameters=global_parameters)
global_parameters=global_parameters,
public_network_access=public_network_access)


def datafactory_factory_update(client,
Expand All @@ -66,7 +68,7 @@ def datafactory_factory_update(client,
return client.update(resource_group_name=resource_group_name,
factory_name=factory_name,
tags=tags,
identity={"type": "SystemAssigned"})
identity=json.loads("{\"type\": \"SystemAssigned\"}"))


def datafactory_factory_delete(client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))


# Env setup
@try_manual
def setup(test, rg):
pass
Expand Down Expand Up @@ -671,11 +672,13 @@ def step_factories_delete(test, rg):
checks=[])


# Env cleanup
@try_manual
def cleanup(test, rg):
pass


# Testcase
@try_manual
def call_scenario(test, rg):
setup(test, rg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def __init__(
self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2018-06-01"
self.credential_scopes = ['https://management.azure.com/.default']
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'datafactorymanagementclient/{}'.format(VERSION))
self._configure(**kwargs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._data_factory_management_client_async import DataFactoryManagementClient
from ._data_factory_management_client import DataFactoryManagementClient
__all__ = ['DataFactoryManagementClient']
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------

from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

VERSION = "unknown"

class DataFactoryManagementClientConfiguration(Configuration):
"""Configuration for DataFactoryManagementClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The subscription identifier.
:type subscription_id: str
"""

def __init__(
self,
credential: "AsyncTokenCredential",
subscription_id: str,
**kwargs: Any
) -> None:
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(DataFactoryManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2018-06-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'datafactorymanagementclient/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
self,
**kwargs: Any
) -> None:
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading