Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SQL core commands (server, db, and elastic pool) (Azure#2253)
* sql server create: param aliases * sql db: server_name param alias * sql db create: param aliases and ignores * sql db data-warehouse: comment out these commands * sql db transparent-data-encryption: comment out these commands * sql db service-tier-advisor: comment out these commands * sql db/server show-usage: comment out these commands * sql elastic-pools: rename to elastic-pool * sql elastic-pool recommended: comment out these commands * sql db restore-point: comment out these commands * sql db replication-link: -d param alias * sql server firewall: add -s param alias * sql server firewall allow-all-azure-ips: implement custom command * Added CommandGroup.custom_command helper for constructing custom commands * sql server service-objective: added -s alias * sql elastic-pool db: Removed group. Added --elastic-pool parameter to sql db list. * sql db update: Add convenience params Fixes Azure#1764 * sql db create/update: extract common param aliases * sql db create/update: refactor common ignored params * sql db create: Wrapper function that determines location * sql db create, sql elastic-pool db: fixed tests * sql elastic-pool create: add wrapper that determines server location * sql server update: add convenience params * sql server firewall allow-all-azure-ips: added test * Organized file contents into alphabetically ordered sections * sql server firewall: updated help text * sql elastic-pool update: add convenience arguments * sql db create-copy: added this new custom command * sql db create-copy: added unit test * sql db create-replica: implement new custom command * sql db copy/create-replica: switched point of view It looks like source and dest sub id must always be the same, so removing source_subscription_id param and switching point of view from source->this to this->dest. * sql db restore: added basic implementation It's currently broken because restorePointInTime is not yet in Swagger spec, but otherwise should theoretically work. * Tweaking param names for db copy/create-secondary/restore * sql server firewall: rename group to firewall-rule * Rename --server-name to --server * Rename --elastic-pool-name to --elastic-pool * Rename --database-name to --database * Rename --service-objective-name to --service-objective * Rename --admin-login to --admin-user * Comment out db restore and firewll allow-all-azure-ips. db restore is currently broken, and allow-all-azure-ips is hopefully not needed if the firewall create/update help text is clear enough (which I have updated in Swagger). * Added missing help text and commented out unneeded help test * Rename rg-name * Add missing param help, and fixed dest/secondary param aliases * sql db update: Added test and fixed bugs. Other update commands will also need to be tested and updated because I misunderstood how generic update command works. * az sql firewall-rule update: Found issues, commented out for now * sql server firewall-rule update: implement as custom command * Impl/test for elastic-pool update and db update --elastic-pool * Fixed pylint errors * Fixed flake8 errors * Attempt to fix url quote import * Ignore pylint no-name-in-module for url quote import * Ignore pylint import-error for url quote import * db copy: use dest server location, not source * Standardized on replica terminology. create-secondary is now create-replica. replication-link is now replica-link. * sql db show: remove --expand param * Doc improvements. Removed redundant 'Azure SQL' terminology. Added doc for sql db list --elastic-pool param. * Minor doc tweaks * sql db create: disallow creating datawarehouse * Update azure-mgmt-sql dependency to 0.3.0 * Added sql db restore command. Also updated params for other db creation commands: - Ignore service_objective_id param for all. - Updated create-mode specific params * Remove and git ignore debug.log files * service-objective list: don't verify response length. The number of service-objectives returned is variable depending on feature light-up and subscription capabilities. It's best not to assume how many service objectives exist currently or in the future. * sql elastic-pool list-dbs: new command * Use 'six' compat library to import url quote * Added unit converter and use it for storage params * Corrected capitalization of byte unit (B)
- Loading branch information