-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[WIP] - Add OpenShift support #7385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c87021b
Add OSA create show delete scale
julienstroheker a403821
Merge branch 'dev' into osa
julienstroheker cd8e4e6
Bump the version
julienstroheker dda8819
pep8
julienstroheker a47fd2a
Update Unit Tests
julienstroheker eeee1a6
lint
julienstroheker e1f47af
pep8
julienstroheker 2df28e2
Bump Version
julienstroheker 6546358
Merge branch 'dev' of github.com:Azure/azure-cli into osa
julienstroheker 91961c1
Add tests
julienstroheker 04e4788
add Vnet integration
julienstroheker 5f6b0dd
Apply review
julienstroheker 9d9240b
review
julienstroheker d9b2d41
pep8
julienstroheker f889de4
Add the delegation on the OSA AAD object
julienstroheker ac36154
Add Preview Info
julienstroheker efaa154
fix aad default tenant
julienstroheker 73ae6ec
update api version for OSA operations
julienstroheker 3b600a8
Match Default VMSize for Master and Infra nodes
julienstroheker 0fa3d39
rename compute vm size
julienstroheker b7156ee
Bump OpenShift version to 3.11
julienstroheker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -174,6 +174,40 @@ def remove_resource(self, name, **kwargs): | |
| execute(self.cli_ctx, 'az ad sp delete --id {}'.format(self.result['appId'])) | ||
|
|
||
|
|
||
| # Managed Application preparer | ||
|
|
||
| # pylint: disable=too-many-instance-attributes | ||
| class ManagedApplicationPreparer(AbstractPreparer, SingleValueReplacer): | ||
| def __init__(self, name_prefix='clitest', parameter_name='aad_client_app_id', | ||
| parameter_secret='aad_client_app_secret', app_name='app_name', | ||
| dev_setting_app_name='AZURE_CLI_TEST_DEV_APP_NAME', | ||
| dev_setting_app_secret='AZURE_CLI_TEST_DEV_APP_SECRET', key='app'): | ||
| super(ManagedApplicationPreparer, self).__init__(name_prefix, 24) | ||
| self.cli_ctx = get_dummy_cli() | ||
| self.parameter_name = parameter_name | ||
| self.parameter_secret = parameter_secret | ||
| self.result = {} | ||
| self.app_name = app_name | ||
| self.dev_setting_app_name = os.environ.get(dev_setting_app_name, None) | ||
| self.dev_setting_app_secret = os.environ.get(dev_setting_app_secret, None) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't the default value for |
||
| self.key = key | ||
|
|
||
| def create_resource(self, name, **kwargs): | ||
| if not self.dev_setting_app_name: | ||
| template = 'az ad app create --display-name {} --key-type Password --password {} --identifier-uris ' \ | ||
| 'http://{}' | ||
| self.result = execute(self.cli_ctx, template.format(name, name, name)).get_output_in_json() | ||
| self.test_class_instance.kwargs[self.key] = name | ||
| # The slice is the easiest way for know to return the Teanant from the same command | ||
| return {self.parameter_name: self.result['appId'], self.parameter_secret: name} | ||
| self.test_class_instance.kwargs[self.key] = name | ||
| return {self.parameter_name: self.dev_setting_sp_name, | ||
| self.parameter_secret: self.dev_setting_app_secret} | ||
|
|
||
| def remove_resource(self, name, **kwargs): | ||
| if not self.dev_setting_app_name: | ||
| execute(self.cli_ctx, 'az ad app delete --id {}'.format(self.result['appId'])) | ||
|
|
||
| # Utility | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.