[WIP] - Add OpenShift support#7385
[WIP] - Add OpenShift support#7385julienstroheker wants to merge 21 commits intoAzure:devfrom julienstroheker:osa
Conversation
troydai
left a comment
There was a problem hiding this comment.
Still reviewing it. One comment for now.
|
|
||
| __all__ = ['ScenarioTest', 'LiveScenarioTest', 'ResourceGroupPreparer', 'StorageAccountPreparer', | ||
| 'RoleBasedServicePrincipalPreparer', 'CliTestError', 'JMESPathCheck', 'JMESPathCheckExists', 'NoneCheck', | ||
| 'RoleBasedServicePrincipalPreparer', 'ManagedApplicationPreparer', 'CliTestError', 'JMESPathCheck', 'JMESPathCheckExists', 'NoneCheck', |
| 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.parameter_tenant: self.result['odata.metadata'][26:62]} |
There was a problem hiding this comment.
This not very stable. Isn't there any alternative?
There was a problem hiding this comment.
Indeed, it is not very clean, the response from the command is not returning this field tenantID this is why I did this, to test.
I can add another cli command such as az account list to get this info though ?
There was a problem hiding this comment.
Sounds like a more stable solution than this. Please do that and also add comments regarding why it invokes that command to fetch the tenant id.
Add _ensure_osa_aad
# Conflicts: # src/command_modules/azure-cli-acs/HISTORY.rst # src/command_modules/azure-cli-acs/setup.py
| aad_tenant_id=None, | ||
| identifier=None, | ||
| name=None): | ||
| # TODO: This really needs to be unit tested. |
There was a problem hiding this comment.
Sorry I forgot to remove that comment, Can you tell me if my tests in test_osa_commands.py are ok ?
| ' The available locations are "{}"'.format(','.join(aci_locations))) | ||
|
|
||
|
|
||
| def openshift_create(cmd, client, resource_group_name, name, # pylint: disable=too-many-locals |
There was a problem hiding this comment.
Break this method into smaller methods to avoid too-many-locals warning.
There was a problem hiding this comment.
I am not sure to understand how I can do this. Those parameters are from the user. I am doing the same logic as the aks_create fct around line 1415. Can you give me some hints here ?
There was a problem hiding this comment.
"too many locals" means that you defined too many local variables in this method, which indicates that the body of the function is too large.
|
|
||
| # We don't creating the AADIdentity for the user right now but maybe later so keeping this | ||
| # Keeping this Due to SPN replication latency, we do a few retries here | ||
| max_retry = 30 |
There was a problem hiding this comment.
This will make the retry last up to 90 seconds. I recommend you print warning to the stderr through logging so as to avoid the impression of command hanging.
There was a problem hiding this comment.
I removed that part since I added the auto creation of the AADIdentity : _ensure_osa_aad
| ResourceGroupPreparer, ManagedApplicationPreparer, ScenarioTest, live_only) | ||
| from azure_devtools.scenario_tests import AllowLargeResponse | ||
| from azure.cli.testsdk.checkers import ( | ||
| StringContainCheck, StringContainCheckIgnoreCase) |
Add _remove_nulls_osa Update NetworkProfile
Rename Models Rename node-count to compute-count fqdn mandatory
|
Please remove me from the reviewers list. |
| 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.
Isn't the default value for os.environ.get already None?
Rename node-vm-size to compute-vm-size
|
Closing due to inactivity. Feel free to reopen when the PR is ready. |
|
Hi @tjprescott waiting after : Azure/azure-sdk-for-python#3378 to be merged |
|
Hi @julienstroheker no worries. Feel free to reopen when the Python SDK is merged. |
Please do not merge WIP
Related to :
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).
I adhere to the Command Guidelines.