-
Notifications
You must be signed in to change notification settings - Fork 2
Adds aad commands and tests #2
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
Conversation
|
Part in test causing the issue: |
| def cli_redis_access_policy_create(client, resource_group_name, cache_name, access_policy_name, permissions): | ||
| from azure.mgmt.redis.models import RedisCacheAccessPolicy | ||
| param = RedisCacheAccessPolicy(permissions=permissions) | ||
| return client.begin_create_update(resource_group_name, cache_name, access_policy_name, param) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return client.begin_create_update(resource_group_name, cache_name, access_policy_name, param) | |
| return client.begin_create_update(resource_group_name, cache_name, access_policy_name, param).result() |
Try this for long running operation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evelyn-ys I had already tried that, but the issue lies with this section of the test
self.cmd('az redis update -n {name} -g {rg} --set redisConfiguration.aadEnabled=false')
result = self.cmd('az redis show -n {name} -g {rg}').get_output_in_json()

Related command
az redis create (new redis-configuration aad-enabled property)
redis access-policy
redis access-policy-assingment
Description
Adds new commands for aad feature
Testing Guide
(check help.py)
text: az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Premium --vm-size p1 --redis-configuration @"config_enable-aad.json"
crafted: true
helps['redis access-policy'] = """
type: group
short-summary: Manage access policies for Redis Cache
"""
helps['redis access-policy create'] = """
type: group
short-summary: Adds an access policy to the Redis Cache
long-summary: Usage example - az redis access-policy create -g testResourceGroup -n testCacheName --access-policy-name testAccessPolicy --permissions "+get +hget"
"""
helps['redis access-policy update'] = """
type: group
short-summary: Updates an access policy of the Redis Cache
long-summary: Usage example - az redis access-policy update -g testResourceGroup -n testCacheName --access-policy-name testAccessPolicy --permissions "+get +hget"
"""
helps['redis access-policy delete'] = """
type: group
short-summary: Deletes an access policy from the Redis Cache
long-summary: Usage example - az redis access-policy delete -g testResourceGroup -n testCacheName --access-policy-name testAccessPolicy
"""
helps['redis access-policy show'] = """
type: group
short-summary: Gets the detailed information about an access policy of the Redis Cache
long-summary: Usage example - az redis access-policy show -g testResourceGroup -n testCacheName --access-policy-name testAccessPolicy
"""
helps['redis access-policy list'] = """
type: group
short-summary: Gets the list of access policies associated with the Redis Cache
long-summary: Usage example - az redis access-policy list -g testResourceGroup -n testCacheName
"""
helps['redis access-policy-assignment'] = """
type: group
short-summary: Manage access policy assignments for Redis Cache
"""
helps['redis access-policy-assignment create'] = """
type: group
short-summary: Adds an access policy assignment to the Redis Cache
long-summary: Usage example - az redis access-policy-assignment create -g testResourceGroup -n testCacheName --object-id 932b5c60-66e4-4fbf-b8b0-xxxxxxxxxxxx --object-id-alias testAlias --access-policy-name testAccessPolicy --access-policy-assignment testAccessPolicyAssignment
"""
helps['redis access-policy-assignment update'] = """
type: group
short-summary: Updates an access policy assignment of the Redis Cache
long-summary: Usage example - az redis access-policy-assignment update -g testResourceGroup -n testCacheName --object-id 932b5c60-66e4-4fbf-b8b0-xxxxxxxxxxxx --object-id-alias testAlias --access-policy-name testAccessPolicy --access-policy-assignment testAccessPolicyAssignment
"""
helps['redis access-policy-assignment delete'] = """
type: group
short-summary: Deletes an access policy assignment from the Redis Cache
long-summary: Usage example - az redis access-policy-assignment delete -g testResourceGroup -n testCacheName --access-policy-assignment testAccessPolicyAssignment
"""
helps['redis access-policy-assignment show'] = """
type: group
short-summary: Gets the detailed information about an access policy assignment of the Redis Cache
long-summary: Usage example - az redis access-policy-assignment show -g testResourceGroup -n testCacheName --access-policy-assignment testAccessPolicyAssignment
"""
helps['redis access-policy-assignment list'] = """
type: group
short-summary: Gets the list of access policy assignments associated with the Redis Cache
long-summary: Usage example - az redis access-policy-assignment list -g testResourceGroup -n testCacheName
"""
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.