Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
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
30 changes: 30 additions & 0 deletions build_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python

#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------

import argparse
import os
import glob
from subprocess import check_call

DEFAULT_DEST_FOLDER = "./dist"

def create_package(name, dest_folder=DEFAULT_DEST_FOLDER):
# a package will exist in either one, or the other folder. this is why we can resolve both at the same time.
absdirs = [os.path.dirname(package) for package in (glob.glob('{}/setup.py'.format(name)) + glob.glob('sdk/*/{}/setup.py'.format(name)))]
absdirpath = os.path.abspath(absdirs[0])
check_call(['python', 'setup.py', 'bdist_wheel', '-d', dest_folder], cwd=absdirpath)
check_call(['python', 'setup.py', "sdist", "--format", "zip", '-d', dest_folder], cwd=absdirpath)

if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Build Azure package.')
parser.add_argument('name', help='The package name')
parser.add_argument('--dest', '-d', default=DEFAULT_DEST_FOLDER,
help='Destination folder. Relative to the package dir. [default: %(default)s]')
args = parser.parse_args()
create_package(args.name, args.dest)

8 changes: 8 additions & 0 deletions src/datafactory/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

0.1.0
++++++
* Initial release.
5 changes: 5 additions & 0 deletions src/datafactory/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Microsoft Azure CLI 'datafactory' Extension
==========================================

This package is for the 'datafactory' extension.
i.e. 'az datafactory'
31 changes: 31 additions & 0 deletions src/datafactory/azext_datafactory/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from .generated._help import helps


class DataFactoryManagementClientCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from .generated._client_factory import cf_datafactory
datafactory_custom = CliCommandType(
operations_tmpl='azext_datafactory.custom#{}',
client_factory=cf_datafactory)
super(DataFactoryManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=datafactory_custom)

def load_command_table(self, args):
from .generated.commands import load_command_table
load_command_table(self, args)
return self.command_table

def load_arguments(self, command):
from .generated._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = DataFactoryManagementClientCommandsLoader
12 changes: 12 additions & 0 deletions src/datafactory/azext_datafactory/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.action import * # noqa: F403
try:
from .manual.action import * # noqa: F403
except ImportError:
pass
4 changes: 4 additions & 0 deletions src/datafactory/azext_datafactory/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.0.67"
}
12 changes: 12 additions & 0 deletions src/datafactory/azext_datafactory/commands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.commands import * # noqa: F403
try:
from .manual.commands import * # noqa: F403
except ImportError:
pass
12 changes: 12 additions & 0 deletions src/datafactory/azext_datafactory/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=wildcard-import
# pylint: disable=unused-wildcard-import

from .generated.custom import * # noqa: F403
try:
from .manual.custom import * # noqa: F403
except ImportError:
pass
66 changes: 66 additions & 0 deletions src/datafactory/azext_datafactory/generated/_client_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------


def cf_datafactory(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.datafactory import DataFactoryManagementClient
return get_mgmt_service_client(cli_ctx, DataFactoryManagementClient)


def cf_factory(cli_ctx, *_):
return cf_datafactory(cli_ctx).factory


def cf_exposure_control(cli_ctx, *_):
return cf_datafactory(cli_ctx).exposure_control


def cf_integration_runtime(cli_ctx, *_):
return cf_datafactory(cli_ctx).integration_runtime


def cf_integration_runtime_object_metadata(cli_ctx, *_):
return cf_datafactory(cli_ctx).integration_runtime_object_metadata


def cf_integration_runtime_node(cli_ctx, *_):
return cf_datafactory(cli_ctx).integration_runtime_node


def cf_linked_service(cli_ctx, *_):
return cf_datafactory(cli_ctx).linked_service


def cf_dataset(cli_ctx, *_):
return cf_datafactory(cli_ctx).dataset


def cf_pipeline(cli_ctx, *_):
return cf_datafactory(cli_ctx).pipeline


def cf_pipeline_run(cli_ctx, *_):
return cf_datafactory(cli_ctx).pipeline_run


def cf_activity_run(cli_ctx, *_):
return cf_datafactory(cli_ctx).activity_run


def cf_trigger(cli_ctx, *_):
return cf_datafactory(cli_ctx).trigger


def cf_trigger_run(cli_ctx, *_):
return cf_datafactory(cli_ctx).trigger_run


def cf_data_flow(cli_ctx, *_):
return cf_datafactory(cli_ctx).data_flow


def cf_data_flow_debug_session(cli_ctx, *_):
return cf_datafactory(cli_ctx).data_flow_debug_session
Loading