Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
5ebba6e
[DPG][pipeline] integration to swagger pipeline (#24355)
msyyc May 9, 2022
bc9bb07
Create communication samples (#24268)
lzchen May 9, 2022
41bd866
[SchemaRegistry] avro update docstring (#24364)
swathipil May 9, 2022
353743e
[AutoRelease] t2-redhatopenshift-2022-05-05-85576(Do not merge) (#24302)
azclibot May 10, 2022
091ed45
[ACR] Pull/push support for OCI manifest and blob (#24004)
May 10, 2022
4bf7e7e
[AutoRelease] t2-network-2022-04-28-56088(Do not merge) (#24228)
azclibot May 10, 2022
d5e45f0
Increment package version after release of azure-identity (#24371)
azure-sdk May 10, 2022
4a7eeb5
[KeyVault] Administration Test to Test Proxy (#24334)
kashifkhan May 10, 2022
3bc5ce6
Increment version for eventhub releases (#24376)
azure-sdk May 10, 2022
5497978
Package py.typed file (#24361)
lmazuel May 10, 2022
3b11ae1
[textanalytics] update documentation (#24318)
kristapratico May 11, 2022
604e78a
[Docs] update guidance for test (#23955)
BigCat20196 May 11, 2022
8808128
regen on official swagger / remove local swagger (#24382)
kristapratico May 11, 2022
3299dc7
Increment package version after release of azure-containerregistry (#…
azure-sdk May 11, 2022
6038f4e
Increment package version after release of azure-data-tables (#24389)
azure-sdk May 11, 2022
0d56155
[App] deprecate app package (#24393)
BigCat20196 May 11, 2022
f653416
add test (#24394)
Wzb123456789 May 11, 2022
45b43f1
[change_log] write a script for change_log (#23952)
kazrael2119 May 11, 2022
a80bbdd
Increment version for schemaregistry releases (#24375)
azure-sdk May 11, 2022
7b20eb6
[Cosmos] post-archboard fixes (#24358)
simorenoh May 11, 2022
343c219
[translation] doc fixes (#24381)
kristapratico May 11, 2022
e558aea
Increment version for storage releases (#24377)
azure-sdk May 11, 2022
348b56f
Update tox.ini (#24401)
tjprescott May 11, 2022
0d0ce45
add CertificateCredential sample (#24400)
xiangyan99 May 11, 2022
eae4f8b
Update readme for -pre and -post TestResource scripts (#24405)
azure-sdk May 11, 2022
86be3ae
[AutoRelease] t2-datafactory-2022-05-05-52029(Do not merge) (#24304)
azclibot May 12, 2022
319d7d6
create doc (#24419)
BigCat20196 May 12, 2022
db028c0
Update Azure monitor OpenTelemetry exporter example (#24422)
jenshnielsen May 12, 2022
5699616
String parsing improvements to service directory resource names (#24398)
azure-sdk May 12, 2022
54ef18d
Update semantic convention mappings (#24366)
lzchen May 12, 2022
ec1b7e4
[Cosmos] use python3 typehints and move options to kwargs on async cl…
simorenoh May 12, 2022
35e10b4
Update Azure Account ext. workaround guidance (#24429)
scottaddie May 12, 2022
c01e178
fix typing (#24424)
xiangyan99 May 12, 2022
b124280
code (#24253)
msyyc May 13, 2022
d698c15
code and test (#24432)
azclibot May 13, 2022
31cd127
[VideoAnalyzer] deprecate package (#24434)
BigCat20196 May 13, 2022
d7b01d7
[VideoAnalyzer] deprecate videoanalyzer (#24436)
BigCat20196 May 13, 2022
a6057b3
add option for key credential (#24437)
msyyc May 13, 2022
8c4b715
add option for key credential (#24437)
msyyc May 13, 2022
acd6945
[Cosmos] mark populate_query_metrics flag to be deleted when used and…
simorenoh May 13, 2022
1bd414e
[Cosmos] Fix failing unit tests (#24287)
simorenoh May 13, 2022
f938bb1
[Cosmos] deprecate offer naming in methods - merge available (#24428)
simorenoh May 13, 2022
ad5da24
add type hints to overload impl (#24406)
kristapratico May 13, 2022
a91ffc9
Create test_crud_async.py (#24166)
JericHunter May 13, 2022
8c7d2c8
[textanalytics] unskip tests and rerecord now that kebab-case bug is …
kristapratico May 13, 2022
2d50ef2
Add skip variable for remove test resources to support debugging (#24…
azure-sdk May 13, 2022
dbc4c07
fix test (#24445)
msyyc May 16, 2022
3ee35ea
code and test (#24457)
azclibot May 16, 2022
18cef1e
code and test (#24459)
azclibot May 16, 2022
56f24f4
Update tox.ini (#24425)
tjprescott May 16, 2022
9d33381
Add other azure samples (#24360)
lzchen May 16, 2022
29b8aa6
azure-monitor-opentelemetry-exporter update readme (#24461)
jenshnielsen May 16, 2022
c29c3a1
add py.typed files to any packages missing them. update MANIFEST.in t…
scbedd May 13, 2022
46b446c
Enforce proper usage of `py.typed` file (#24409)
scbedd May 16, 2022
3837bb8
[Doc] Find SDK by Azure-cli command (#24123)
BigCat20196 May 17, 2022
40aac81
rename tests (#24478)
BigCat20196 May 17, 2022
94e61db
[AutoRelease] t2-appcontainers-2022-05-12-62222(Do not merge) (#24407)
azclibot May 17, 2022
fcf9cbe
Fix CI under `sdk/compute` (#24481)
msyyc May 17, 2022
9a4f583
code and test (#24479)
azclibot May 17, 2022
f222839
code and test (#24456)
azclibot May 17, 2022
b32bb39
[auto]create by sdk generation
May 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"livekvtestcertrec",
"livekvtestgetcertperfcert",
"livekvtestgetsecretperfsecret",
"livekvtestlistperfsecret",
"livekvtestlistperfsecret",
"livekvtestdecryptperfkey",
"livekvtestgetkeyperfkey",
"livekvtestsignperfkey",
Expand Down Expand Up @@ -242,6 +242,7 @@
"PSECRET",
"pygobject",
"parameterizing",
"pytyped",
"pytz",
"pywin",
"pyversion",
Expand Down
96 changes: 96 additions & 0 deletions doc/dev/find_sdk/find_sdk_in_cli_command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
How to Find the SDK in CLI
======

This article aims to provide a guide for customer to find the sdk in Azure CLI.

Find SDK function in cli command is divided into the following steps:
1. Determine the command module
2. Search its definition in `command.py`
3. Find the management client and corresponding SDK
4. Find the function in Python SDK or Doc

## Determine the command module

Before looking for the SDK, please determine the command module you want to find. You can find it through the keyword in the CLI and the corresponding way [here](https://github.com/Azure/azure-cli/tree/dev/src/azure-cli/azure/cli/command_modules).

Such as, if you want to find the module about `az resource group create`, you could find [`resource` folder](https://github.com/Azure/azure-cli/tree/dev/src/azure-cli/azure/cli/command_modules/resource) in above link.

## Search its definition in `command.py`

After entering the link, a command module folder generally contains the following files. You can find the command in `command.py`.
```
└─command module folder
└─ _help.py # Store help information
└─ command.py # Store command definition
└─ custom.py # Store Custom method
└─ _params.py # Store parameters information
└─....
```
Still the above sample `az resource group create`, You can find its definition on line 222 from [here](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/commands.py#L222).

## Find the management client and corresponding SDK
```python
with self.command_group('group', resource_group_sdk, resource_type=ResourceType.MGMT_RESOURCE_RESOURCES) as g:
g.command('delete', 'begin_delete', supports_no_wait=True, confirmation=True)
g.show_command('show', 'get')
g.command('exists', 'check_existence')
g.custom_command('list', 'list_resource_groups', table_transformer=transform_resource_group_list)
g.custom_command('create', 'create_resource_group')
g.custom_command('export', 'export_group_as_template')
g.generic_update_command('update', custom_func_name='update_resource_group', custom_func_type=resource_custom)
g.wait_command('wait')
```

Taking the above code as an example, follow the `resource_type` parameter in `command_group()` function find SDK name and client. like searching for the `MGMT_RESOURCE_RESOURCES` definition.
```python
# src/azure-cli-core/azure/cli/core/profiles/_shared.py
MGMT_RESOURCE_RESOURCES = ('azure.mgmt.resource.resources', 'ResourceManagementClient')
```
You could find that its package name is `azure-mgmt-resource` and its client name is `ResourceManagementClient`.

Then, you could it can be divided into three types in `command_group()` function: command()` function, `show_command()` function and `custom_command()` function.<br/>

For the first two function, the first parameter comes from the CLI command, and the second parameter comes from the function name of the SDK.
If you want to find the SDK function about `az resource group delete`, it is the `begin_delete`.<br/>
![img.png](find_the_sdk.PNG)
If it is a `custom_command()` function, you could find its definition in the `custom.py` In the peer path.
Such as `create_resource_group()`, you could find the definition from [here](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/custom.py#L1310). (If it is not found, you could search for `create_resource_group` in this file.)
```python
def create_resource_group(cmd, rg_name, location, tags=None, managed_by=None):
""" Create a new resource group.
:param str resource_group_name:the desired resource group name
:param str location:the resource group location
:param str tags:tags in 'a=b c' format
"""
rcf = _resource_client_factory(cmd.cli_ctx)

ResourceGroup = cmd.get_models('ResourceGroup')
parameters = ResourceGroup(
location=location,
tags=tags
)

if cmd.supported_api_version(min_api='2016-09-01'):
parameters.managed_by = managed_by

return rcf.resource_groups.create_or_update(rg_name, parameters)
```
Then, you could find the `create_or_update()` function in its return, it is the SDK function.

## Find the function in Python SDK or Doc

Similarly, find the `service` folder in the [SDK folder](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk) of [SDK repo](https://github.com/Azure/azure-sdk-for-python).
Such as [`resources` folder](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/resources).

Then, you could find [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources). This step may be a little difficult for beginners. It requires some experience.
Don't be frightened by a lot of folders here. You can choose the latest date to enter, like [this](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01).

Enter the [_operation.py](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py) in the [operation folder](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations), and you can see the meta code.

In this file, you could search the function name to find the function definition.(Be careful, the function need under the correct class.)
Above the `begin_delete` function, you could find it from [here](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py#L8784).
The same, the `create_or_update` function is [here](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2021_04_01/operations/_operations.py#L9761).

Finally, you also could find the usage of function by [Azure doc](https://docs.microsoft.com/en-us/azure/developer/python/sdk/examples/azure-sdk-example-resource-group#3-write-code-to-provision-a-resource-group) or [Azure samples](https://github.com/Azure-Samples/azure-samples-python-management).

Feel free to contact Azure SDK team at any time through any channels. We are passionate to build the world-class cloud product.
Binary file added doc/dev/find_sdk/find_the_sdk.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions doc/dev/how_to_request_a_feature_in_sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
How to Request a Feature in SDK
======

This article aims to provide a guide for customers to request a feature in Azure Python SDK.

Python SDK is automatically generated based on rest API, so we generally do not recommend modifying SDK code manually. If you need a new function, but the SDK does not provide it, you need to open an issue in the [rest API](https://github.com/Azure/azure-rest-api-specs/issues) to describe clearly the feature you want.

Then, if the feature is adopted by the service team and the relevant rest API is updated, we will regenerate the SDK and release it after approved.


The overall workflow is:
1. Swagger and service ready
2. Azure Python SDK release (PyPI)


```
--------- ------------
| | | |
| Service | -> | Python SDK |
| | | |
--------- ------------
```

This is the way that Azure Python SDK works with the Service team. Swagger PR should be merged before requesting azure Python SDK support.

Feel free to contact Azure CLI team at any time through any channels. We are passionate to build the world-class cloud product.
Loading