Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ae0d6f9
Add batch data plane commands:
xingwu1 Jan 18, 2017
89c25d0
Added file stream support
annatisch Jan 18, 2017
487129b
bug fixes
annatisch Jan 18, 2017
b5a14db
Fixed regex raw strings
annatisch Jan 18, 2017
bed7efe
Added support for JSON input
annatisch Jan 18, 2017
1339f32
Custom and type validation (#4)
annatisch Jan 20, 2017
e7a17ea
Fix pylint errors and get rid unused codes.
xingwu1 Jan 20, 2017
971ba55
List and type validation (#5)
annatisch Jan 20, 2017
632b9cd
clean pylint error and add data plane command test.
xingwu1 Jan 21, 2017
18cd518
Bug fixes (#6)
annatisch Jan 23, 2017
e0c83ef
Move the update pool command to custom command.
xingwu1 Jan 24, 2017
ad3849e
Add custom commands test cases
xingwu1 Jan 24, 2017
7b4a726
Tests and delete confirmation (#7)
annatisch Jan 24, 2017
d5e58c7
More tests and fixes (#8)
annatisch Jan 25, 2017
e891301
Fix pylint and test errors.
xingwu1 Jan 25, 2017
bb04b27
Following PEP8 complaint.
xingwu1 Jan 26, 2017
e34309c
Use this decroator on doc transfer
xingwu1 Jan 26, 2017
800aa05
Deferred imports for performance (#9)
annatisch Jan 27, 2017
4396490
PyLint and PEP8 clean up.
xingwu1 Jan 27, 2017
1e50009
Use single parameter for storage account id and name.
xingwu1 Jan 27, 2017
0e02e1e
Review feedback + help fixes (#10)
annatisch Jan 28, 2017
2186a7f
Review fixes (#11)
annatisch Feb 2, 2017
a6a510c
Add enum list for vmsize and thumbprint algorithm.
xingwu1 Jan 31, 2017
275e9fe
Streamlined commands (#13)
annatisch Feb 6, 2017
319bbf6
Further command refinements (#14)
annatisch Feb 6, 2017
93929c6
Fixed tests (#15)
annatisch Feb 7, 2017
1947a80
Change the coding style.
xingwu1 Feb 7, 2017
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
5 changes: 5 additions & 0 deletions azure-cli.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
<Compile Include="command_modules\azure-cli-appservice\azure\cli\__init__.py" />
<Compile Include="command_modules\azure-cli-appservice\azure\__init__.py" />
<Compile Include="command_modules\azure-cli-appservice\setup.py" />
<Compile Include="command_modules\azure-cli-batch\azure\cli\command_modules\batch\tests\test_batch_commands.py" />
<Compile Include="command_modules\azure-cli-batch\azure\cli\command_modules\batch\tests\test_batch_data_plane_commands.py" />
<Compile Include="command_modules\azure-cli-batch\azure\cli\command_modules\batch\tests\test_batch_data_plane_command_base.py" />
<Compile Include="command_modules\azure-cli-batch\azure\cli\command_modules\batch\tests\test_batch_pool_commands.py" />
<Compile Include="command_modules\azure-cli-batch\azure\cli\command_modules\batch\_command_type.py" />
<Compile Include="command_modules\azure-cli-cloud\azure\cli\command_modules\cloud\commands.py" />
<Compile Include="command_modules\azure-cli-cloud\azure\cli\command_modules\cloud\custom.py" />
<Compile Include="command_modules\azure-cli-cloud\azure\cli\command_modules\cloud\_help.py" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

import azure.cli.command_modules.batch._help # pylint: disable=unused-import
import azure.cli.command_modules.batch._help # pylint: disable=unused-import


def load_params(_):
import azure.cli.command_modules.batch._params #pylint: disable=redefined-outer-name
import azure.cli.command_modules.batch._params # pylint: disable=redefined-outer-name


def load_commands():
import azure.cli.command_modules.batch.commands #pylint: disable=redefined-outer-name
import azure.cli.command_modules.batch.commands # pylint: disable=redefined-outer-name
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,73 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from azure.mgmt.batch import BatchManagementClient

from azure.cli.core.commands.client_factory import get_mgmt_service_client
def account_mgmt_client_factory(kwargs):
return batch_client_factory(**kwargs).batch_account


def application_mgmt_client_factory(kwargs):
return batch_client_factory(**kwargs).application


def application_package_client_factory(kwargs):
return batch_client_factory(**kwargs).application_package


def location_client_factory(kwargs):
return batch_client_factory(**kwargs).location


def application_client_factory(kwargs):
return batch_data_service_factory(kwargs).application


def account_client_factory(kwargs):
return batch_data_service_factory(kwargs).account


def certificate_client_factory(kwargs):
return batch_data_service_factory(kwargs).certificate


def pool_client_factory(kwargs):
return batch_data_service_factory(kwargs).pool


def job_client_factory(kwargs):
return batch_data_service_factory(kwargs).job


def job_schedule_client_factory(kwargs):
return batch_data_service_factory(kwargs).job_schedule


def task_client_factory(kwargs):
return batch_data_service_factory(kwargs).task


def file_client_factory(kwargs):
return batch_data_service_factory(kwargs).file


def compute_node_client_factory(kwargs):
return batch_data_service_factory(kwargs).compute_node


def batch_client_factory(**_):
from azure.mgmt.batch import BatchManagementClient
from azure.cli.core.commands.client_factory import get_mgmt_service_client

return get_mgmt_service_client(BatchManagementClient)


def batch_data_service_factory(kwargs):
import azure.batch.batch_service_client as batch
import azure.batch.batch_auth as batchauth

account_name = kwargs.pop('account_name', None)
account_key = kwargs.pop('account_key', None)
account_endpoint = kwargs.pop('account_endpoint', None)
kwargs.pop('force', None)
credentials = batchauth.SharedKeyCredentials(account_name, account_key)
return batch.BatchServiceClient(credentials, base_url=account_endpoint)
Loading