Package: aaz-dev
Microsoft Atomic Azure CLI Dev ToolsTheaaz-devtool is designed to generate atomic Azure CLI commands from OpenAPI specifications. For more information, please refer todocumentandvideo.InstallationCurrently, we can install it with a.whl file. Later on, we'll publish it to PyPI to supportpip installway of installation.Setting up your development environment1 Code reposPleaseForkthe following repos in your github account andClonethem in your local disk:Azure CLIAzure CLI ExtensionAAZ: Used to upload the command model generated.azure-rest-api-specsorazure-rest-api-specs-prAfter clone you can addupstreamfor every repos in your local clone by usinggit remote add upstream.2 Setup python2.1 Install pythonPlease install python with version >= 3.8 in your local machine.For windows: You can download and run full installer fromPython Download.For linux: You can install python from Package Manager or build a stable relase from source codeCheck the version of python, make use it's not less than 3.8.For windows:
You can run:C:\Users\{xxxx}\AppData\Local\Programs\Python\Python3{xxxx}\python--versionC:\Users\{xxxx}\AppData\Local\Programs\Python\Python3{xxxx}is the python installation path.For linux:python--versionYou can also specify the version number when you have multiple versions installed. For example if you want to run version 3.8python3.8--version2.2 Setup a python virtual environmentYou can use venv to create virtual environments, optionally isolated from system site directories. Each virtual environment has its own Python binary (which matches the version of the binary that was used to create this environment) and can have its own independent set of installed Python packages in its site directories.You can run the following command to create a new virtual environment:For windows:C:\Users\{xxxx}\AppData\Local\Programs\Python\Python3{xxxx}\python-mvenv{somepath}\{venvname}For linux:python3.8-mvenv{somepath}/{venvname}3 Active existing virtual environmentYou shouldalwaysactive the virtual environment for azure-cli development.For Windows:Powershell{somepath}\{venvname}\Scripts\Activate.ps1Command Prompt{some path}\{venv name}\Scripts\activate.batFor Linux:source{somepath}/{venvname}/bin/activateAfter active the virtual environment, thepythoncommand will always be the one creates this virtual environment and you can always usepythonpython --version4 Install tools for azure-cli development4.1 Installazure-cli-dev-toolsBoth for windows and linuxpip install azdev4.2 Install aaz-dev-toolsFor WindowsPowershellpip install aaz-devCommand Promptpip install aaz-devFor linuxpipinstallaaz-dev4.3 Set up build envFor linux users, set up python3 build tools would avoid other unseen installation issuesUbuntu: apt-get install python3-dev build-essential
Centos: yum install python3-devel4.4 Possible problemsFor windows users, dependency python-levenshtein installation might run into trouble. developers might need to download.whlfile and install it manually (reference tolink)5. Code repos setup5.1 azure-cliBefore start to the development task, you should always sync the code in thedevbranch ofupstream(Azure/Azure-cli).
If your commands will generated to azure-cli repo, you should checkout a new branch withfeature-prefix.5.2 azure-cli-extensionsIf your commands will generated to azure-cli-extension repo, you should sync the code in themainbranch ofupstream(Azure/Azure-cli-extensions), and checkout a new branch withfeature-prefix.5.3 aazBefore start to the development task, you should always sync the change in themainbranch ofupstream, and checkout a new branch withfeature-prefix.5.4 runazdev setupYou should always run the following command everytime you syncazure-clicode ofupstream.azdev setup --cli {path to azure-cli} --repo {path to azure-cli-extensions}6 Run aaz-dev-toolsaaz-devrun-c{pathtoazure-cli}-e{pathtoazure-cli-extensions}-s{pathswaggerorswagger-pr}-a{pathtoaaz}Before using generated commandsMake sure you have logined byaz login.Make sure you have switched to the subscription for test byaz account set -s {subscription ID for test}If your commands are in extensions, make sure you have loaded this extension byazdev extension add {your extension name}Other documentationsextensioncommand guidelinesauthoring testsshorthand syntax: Azure cli shorthand syntax can help cli users to pass complicated argument values. Only the arguments of AAZ(Atomic Azure CLI) commands generated by aaz-dev tool support shorthand syntax.Submit code and command modelsAfter finish the development, you should push the change in your forked repos first, and the create a Pull Request to upstream repos.azure-cli: create a Pull Request todevbranch ofAzure/azure-cliazure-cli-extensions: create a Pull Request tomainbranch ofAzure/azure-cli-extensionsaaz: create a Pull Request tomainbranch ofAzure/azzReporting issues and feedbackIf you encounter any bugs with the tool please file an issue in theIssuessection of our GitHub repository.LicenseMIT License

Copyright (c) Microsoft Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.