Граф коммитов

125 Коммитов

Автор SHA1 Сообщение Дата
Ross Bryan 9b492f94c3 refactor openshiftversion implementation code 2022-09-20 09:28:09 -04:00
Ross Bryan 0ef1dde3b9 update examples, address feedback, make client
Co-authored-by: Spencer Amann <samann@redhat.com>

refactor
2022-09-14 10:26:47 -04:00
David Newman e0c9352eb3
API 2022-09-04: install-version parameter activation and version listing fixes (#2356)
* Move InstallVersion into cluster properties and give it a type.

* Regenerated 2022-09-04 API

* Add 2022-09-04 API to the cluster creation, in preparation for the switchover.

* Pass a validated install-version parameter for create creation

* Fix the InstallVersion's parameters and example output

* Fix python visual indentation test requirement
2022-08-29 14:38:42 -04:00
Carlo Wisse f1e9d611a2 Removed test - unit tests to be added in another PR due to the imminent CosmoDB change regarding versions 2022-08-25 10:55:23 +10:00
Carlo Wisse 1efe7bf690 Fixed Pylint rule errors for Python Unit tests 2022-08-23 15:21:41 +10:00
Carlo Wisse 92fa2303ae added unit test for az aro get-versions 2022-08-17 17:20:14 +10:00
Carlo Wisse abad46d701 change command to get-versions 2022-08-16 13:53:26 +10:00
Carlo Wisse f7fe82efb1 Added help text for list-install-versions 2022-08-12 14:50:45 +10:00
Carlo Wisse 226e60c8cc Added AZ command to list install version by location with optional table formatter 2022-08-11 11:27:26 +10:00
Shivkumar Anil Ople cecb6a0357
Adding validations for subnet provisioning state (#2154)
* Adding validations for subnet provisioning state

* Adding validations for Subnet Provisioning State

Co-authored-by: Shivkumar Ople <shivkumarople@gmail.com>
2022-07-06 10:57:30 -04:00
Aldo Fuster Turpin cc111ee230
improve Python unit testing and refactor _validators.py (#2120)
* refactor: apply Guard clauses in _validators.py to simplify code
* fix _validators.py trailing whitespace
* improve python test tructure, include execution of unit tests in make test-python
* crate make directive to run python unit tests, add unit tests for azext_aro._validators.validate_cidr
* add tests for test_validate_client_id and include test cases description
* add unit tests for validate_client_secret from azext_aro._validators
* add explicit fields to named tuple in test cases in test_validators.py
* add two test scenarios for validate_cluster_resource_group
* simplify mocks
* add test case for test_validate_cluster_resource_group
* improve test descriptions
* add test_validate_disk_encryption_set test to test validate_disk_encryption_set
* add test cases to test_validate_disk_encryption_set()
* refactor test_validator.py to use classes instead of namedtuples. Use mocks instead of specific defined classes
* refactor (simplify code): remove explicit assignemnt to None when it is the default value
* create test_validate_domain() with 1st test case
* add test case, domain with '_'
* explicit import of unittest.TestCase
* fix test message in test_validate_domain
* finish test_validate_domain()
* finish test_validate_sdn() and test_validate_pull_secret()
* create test_validate_subnet() with first test case
* finish test_validate_subnet() and minor refactor in _validators.py
* create test_validate_subnets() and add first test case
* finish validate_vnet_resource_group_name()
* finish test_validate_worker_count() of test_validators.py and simple refactor in _validators.py
* finish test_validate_worker_vm_disk_size_gb()
* refactor _validators.py
* add test_validate_refresh_cluster_credentials() and minor refactor of test_validators()
* refactor _test_validators.py to use pytest, create script and invoke it from Makefile
* simplify test_validate_cidr() using pytest.mark.parametrize
* simplify some tests using pytest.mark.parametrize
* finish applying pytest.mark.parametrize
* clean up Makefile test-python
* add blank line to hack/unit-test-python.sh
* fix typo in test case
* fix mega-linter error, blank space
* fix test case to fail due to invalid range
* fix typo in beeing to be being
* remove redundant test case
* reformat code for better readability
* add missing license to __init__.py files
2022-06-09 09:24:31 +02:00
Nont 8c3da66825 Migrate from AD to MS Graph
Also changed the AADManager so that it only returns values
instead of the data structure.  This hides the implementation
details so that in the future if MSAL changes the internal
representation, any required changes will be contained within
the class (vs. right now custom.py has to be changed accordingly).
2022-06-02 12:01:57 +02:00
Jeremy Facchetti 8d6d4c3a95
added yaml lint (#2132)
* added yaml lint

* updated the doc
2022-05-27 13:10:11 -04:00
Brendan Bergen e070358150
Fixing exception handling for missing subnet (#2117)
* Fixing exception handling for missing subnet

* use isinstance

* Another err.message fix
2022-05-06 12:15:50 +01:00
Brendan Bergen e76d7fddd9 Better err handling to customer 2022-05-04 11:46:02 -06:00
Brendan Bergen 0ed2f48979
Update az cli extension to use api v2022_04_01 (#2042)
* Bumping az aro extenion api version to v2022_04_01

* Adding new command flags and data structures to az aro create

* linting
2022-05-04 11:21:34 -04:00
Leszek Jakubowski 222b479188 Fixing encoding to a value supported by Python3.6 AND fulfilling pylint requirements. 2021-11-30 14:49:30 +00:00
Leszek Jakubowski 6abf1a88d0
AZ CLI - get-admin-kubeconfig command fixes (#1800)
* Removed enums, replaced with strings - enums no longer available in feature api

* Adding decoding and saving to a kubeconfig file.

* fixing HISTORY
2021-11-23 12:59:27 +00:00
Leszek Jakubowski 74010972d0 changed %-strings to f-strings as requested by linter 2021-11-05 16:33:19 +01:00
bennerv 361459b120 Missed a version in a different file 2021-10-29 13:57:46 -04:00
bennerv 9ecab804d0 Bump the az-aro extension version for removal of identifier_uris 2021-10-29 12:07:17 -04:00
bennerv 0a2b0408c5 Remove identifier uris for aro SP as it's not used 2021-10-27 16:30:05 -04:00
Leszek Jakubowski 36fa1303be fixing a bug if DES isn't used 2021-10-26 09:43:11 +01:00
Leszek Jakubowski 9c9d48ea11
Adding support for list-admin-credentials (getting kubeconfig) (#1789) 2021-10-15 14:56:17 +01:00
Leszek Jakubowski aa13757a76
AzExt - Adding support for the v2021-09-01-preview API (#1739)
* Adding support for the v2021-09-01-preview API - disk encryption sets, sdn selection, encryption at host options

* Adding doc about how to use the disk-encryption-set
2021-10-05 12:20:56 +01:00
Peter Kostyukov 54c9ea424e Update Track 2 specifics 2021-08-17 16:15:32 -05:00
Peter Kostyukov 10a73b2523 Python Track 2 SDK 2021-08-13 11:47:17 -05:00
Jory Horeman f96faf1443 Cloud aware logic for AAD Manager
mend
2021-07-08 16:05:42 -07:00
bennerv 6aeb4002f5 Fix non-existing resource on aro_delete 2021-06-16 09:56:10 -04:00
Troy Connor 6b4dc8bf01
python: add pod/service cidr minimum in help 2021-06-11 13:46:54 -04:00
Mangirdas Judeikis b5374d5650
s/descriptions/identifier 2021-05-26 10:05:32 +01:00
Leszek Jakubowski ffbedfb8b2
fix pylint (#1462) 2021-04-26 13:56:08 -05:00
Mangirdas Judeikis bb2b2f229b
CLI Credential rotation (#1261)
# Which issue this PR addresses:

Fixes: https://msazure.visualstudio.com/AzureRedHatOpenShift/_workitems/edit/9148852

First part of the story.

# What this PR does / why we need it:
It will enable us to pass credentials changes into API server.
API server will have to be changed to accept those.
This is out of scope for this PR
Rotation on CLI is https://msazure.visualstudio.com/AzureRedHatOpenShift/_workitems/edit/7609645

# Test plan for the issue:
Review review review...

# Is there any documentation that needs to be updated for this PR?
Yes, docs how to use it.
2021-04-23 10:59:53 -04:00
Jim Minter fe73544939
remove if w that slipped in 2021-01-04 09:13:01 -06:00
bennerv 27900e2778 Check worker_profiles is not None before iterating through it 2020-12-14 13:27:24 -05:00
bennerv 6e12822f75 Update aro py ext to look like downstream 2020-12-11 09:45:24 -05:00
bennerv 7eb3b93f06 Reconcile downstream azure-cli az aro module with upstream 2020-12-09 17:56:16 -05:00
Jim Minter ac4dec09c0
Merge pull request #1219 from jim-minter/minor-fixes
Minor fixes
2020-12-08 19:43:29 -06:00
Jim Minter 0816471348
az aro: don't honour AZURE_FP_CLIENT_ID when RP_MODE is unset 2020-12-08 16:18:02 -06:00
bennerv 1c8c7e28c7 Update error handling per new az-cli upstream guidelines 2020-12-07 16:46:26 -05:00
bennerv 95bbd1047a Add rbac validation to aro update 2020-12-04 14:46:23 -05:00
Mangirdas Judeikis c19f4111cd
2020-10-31-preview -> 2021-01-31-preview 2020-12-02 12:08:47 -06:00
Jim Minter a179c6479f
Merge pull request #1126 from ehashman/vsts8367811
Revert "Revert "Fix permissions on cluster deletion in az cli""
2020-11-19 15:06:57 -06:00
Elana Hashman 023fa72f5c
Fix import order 2020-11-18 13:29:39 -08:00
Elana Hashman b862479f4e
Log error if an expected one is thrown 2020-11-18 12:59:02 -08:00
Elana Hashman 42042c1765
Address concerns around issues blocking cluster deletion 2020-11-18 12:56:39 -08:00
Jim Minter a64585189d
use Network Contributor instead of Contributor for network resources in az and hack/cluster 2020-11-10 18:40:21 -06:00
Elana Hashman 024205465c Revert "Revert "Fix permissions on cluster deletion in az cli""
This reverts commit 45baf2f5b9.
2020-11-06 15:02:44 -08:00
Jim Minter 45baf2f5b9
Revert "Fix permissions on cluster deletion in az cli" 2020-11-04 12:03:43 -06:00
Elana Hashman 91f417bd2a
Check AAD perms before attempting deletion 2020-11-02 08:46:44 -08:00