Skip to content
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
542974e
update sdk for rulesEngine
Dec 9, 2019
28e1e86
update change log
Dec 9, 2019
00971ad
Merge branch 'dev' into rulesEngine
hytao Dec 9, 2019
bf5b4c5
update
Dec 9, 2019
609a172
Merge branch 'rulesEngine' of https://github.com/hytao/azure-cli into…
Dec 9, 2019
a04cf0c
[Compute] vm/vmss update: Add --priority; vm/vmss update: Add --max-p…
qwordy Dec 10, 2019
6306ff3
Add --port to application-gateway probe (#11483)
Dec 10, 2019
3aee4f8
[AppService] Add support for deleting by ip-address and subnet to sup…
madsd Dec 10, 2019
c176259
Support ReplicasPerMaster property for Redis Cache creation (#11504)
MECHANDR Dec 10, 2019
3db01bd
Resource: Support policy set definition grouping (#11503)
pilor Dec 10, 2019
495a6f6
feat: Add new commands to manage blob service properties for storage …
jsntcy Dec 10, 2019
2361d13
update
Dec 10, 2019
683b970
[Network]Fix 10854 associate rule set to request routing rules (#11421)
mmyyrroonn Dec 11, 2019
0d2eccc
[Network] Support .@ parsing in DNS record name (#11514)
Dec 11, 2019
56dc066
[BotService] Updates, enhancements and cleanup in az bot (#11318)
stevengum Dec 11, 2019
fc0b5a2
Fix #8921: Command `az keyvault key/secret/certificate list/list-dele…
bim-msft Dec 11, 2019
4c19a96
[Compute] Add disk-encryption-set command group (#11411)
qwordy Dec 11, 2019
4ee717b
Plugging in HaTs survey (#11526)
fengzhou-msft Dec 11, 2019
fc006c5
Backup support for SQL/SAP HANA (#11066)
Dec 11, 2019
9fc6f78
Update adls gen1 module to 0.0.48 (#10934)
akharit Dec 11, 2019
4f499eb
App Service cmd for importing certs from Key Vault (#11429)
madsd Dec 11, 2019
01ac5b0
refactor command
Dec 11, 2019
77a99dc
update help
Dec 11, 2019
d21fccf
update help
Dec 11, 2019
f05de5b
update help
Dec 11, 2019
589a7c1
update help
Dec 11, 2019
67fae53
update
Dec 11, 2019
616a30a
Read scale (#10928)
bradrich-msft Dec 12, 2019
3dc2c44
Fix #8095: Misleading command descriptions (#11547)
bim-msft Dec 12, 2019
2fa5391
Fix property name for Kubernetes version to show in az aks nodepool l…
seanmck Dec 12, 2019
4a2f4b2
[ARM] Cross Tenant Support for group deployment (#11523)
Juliehzl Dec 12, 2019
f7bb85d
[Storage] Fix#11043: Support remove whole container/share in az stora…
Juliehzl Dec 12, 2019
a6c1ca1
Add Os-Family 6 to enum (#11537)
bgklein Dec 12, 2019
f5321e2
[Storage] Add coming breaking change information in help (#11546)
Juliehzl Dec 12, 2019
fddf22a
fix: add app insights + log analytics cloud endpoints (#11385)
alexeldeib Dec 12, 2019
6c64d1a
Update show commands to return 3 if resource not found (#11240)
Dec 12, 2019
f936020
[ARM] policy set-definition support --metadata (#11530)
zhoxing-ms Dec 12, 2019
465c0e9
revert survey link in login (#11557)
fengzhou-msft Dec 12, 2019
58cd6d2
Fix #10512 (#11463)
bim-msft Dec 12, 2019
addbaf4
Change flag workspace-resource-id to workspace-resource (#11241)
troy0820 Dec 12, 2019
ea5fbcc
Service Fabric Fix add node type logic (#11171)
a-santamaria Dec 12, 2019
78e201f
[AppConfig]Fix pagination and globalization bugs. (#11522)
shenmuxiaosen Dec 12, 2019
8b33dc9
Upgrade azure-cli-core to 2.0.78
Dec 12, 2019
168b862
Upgrade azure-cli to 2.0.78
Dec 12, 2019
adaacda
Fix History.rst break by Backup and Redis
Dec 12, 2019
09be0ef
Fix typo of **Redis**
Dec 12, 2019
e5824c7
update sdk for rulesEngine
Dec 9, 2019
76a9e7a
update change log
Dec 9, 2019
babc60a
update
Dec 9, 2019
9b09250
update
Dec 10, 2019
ecfdb2f
refactor command
Dec 11, 2019
469f0dc
update help
Dec 11, 2019
9a9ed91
update help
Dec 11, 2019
097e332
update help
Dec 11, 2019
14001b6
update help
Dec 11, 2019
7de3939
update
Dec 11, 2019
c3599f3
update
Dec 30, 2019
7fea2a5
update history
Dec 30, 2019
4d0ab2f
update parameter
Dec 30, 2019
5fb36d0
update help
Dec 30, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Release History

* vmss create/update: Add --scale-in-policy, which decides which virtual machines are chosen for removal when a VMSS is scaled-in

**Cdn**

* Add support for rulesEngine feature

**Core**

* Remove support for Python 3.4
Expand Down
287 changes: 287 additions & 0 deletions src/azure-cli/azure/cli/command_modules/cdn/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,293 @@
--enable-compression
"""

helps['cdn endpoint rule'] = """
type: group
short-summary: Manage delivery rules for an endpoint.
"""

helps['cdn endpoint rule add'] = """
type: command
short-summary: Add a delivery rule to a CDN endpoint.
parameters:
- name: --rule-name
type: string
short-summary: Name of the rule.
- name: --order
type: string
short-summary: Order of the rule.
- name: --match-variable
type: string
short-summary: Name of the match condition.
- name: --operator
type: string
short-summary: Operator of the match condition.
- name: --selector
type: string
short-summary: Selector of the match condition.
- name: --match-values
type: string
short-summary: Match values of the match condition (comma separated).
- name: --negate-condition
type: string
short-summary: Describes if this is negate condition or not.
- name: --transform
type: string
short-summary: Describes what transforms are applied before matching.
- name: --action-name
type: string
short-summary: Name of the action.
- name: --cache-behavior
type: string
short-summary: Caching behavior for the requests. Possible values are BypassCache, Override, SetIfMissing.
- name: --cache-duration
type: string
short-summary: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.
- name: --header-action
type: string
short-summary: Action to perform on headers. Possible values are Append, Overwrite, Delete.
- name: --header-name
type: string
short-summary: Name of header.
- name: --header-value
type: string
short-summary: Value of header.
- name: --header-action
type: string
short-summary: Action to perform on headers. Possible values are Append, Overwrite, Delete.
- name: --redirect-type
type: string
short-summary: The redirect type the rule will use when redirecting traffic.
- name: --redirect-protocol
type: string
short-summary: Protocol to use for the redirect. Possible values are MatchRequest, Http, Https.
- name: --custom-hostname
type: string
short-summary: Host to redirect. Leave empty to use the incoming host as the destination host.
- name: --custom-path
type: string
short-summary: The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.
- name: --custom-querystring
type: string
short-summary: The set of query strings to be placed in the redirect URL. leave empty to preserve the incoming query string.
- name: --custom-fragment
type: string
short-summary: Fragment to add to the redirect URL.
- name: --query-string-behavior
type: string
short-summary: Caching behavior for the requests. Possible values are Include, IncludeAll, Exclude and ExcludeAll.
- name: --query-parameters
type: string
short-summary: query parameters to include or exclude (comma separated).
- name: --source-pattern
type: string
short-summary: define a request URI pattern that identifies the type of requests that may be rewritten.
- name: --destination
type: string
short-summary: Define the destination path for be used in the rewrite. This will overwrite the source pattern.
- name: --preserve-unmatched-path
type: boolean
short-summary: If True, the remaining path after the source pattern will be appended to the new destination path.
examples:
- name: Create a global rule to disable caching.
text: >
az cdn endpoint rule add -g group -n endpoint --profile-name profile --order 0\\
--rule-name global --action-name CacheExpiration --cache-behavior BypassCache
- name: Create a rule for http to https redirect
text: >
az cdn endpoint rule add -g group -n endpoint --profile-name profile --order 1\\
--rule-name "redirect" --match-variable RequestScheme --operator Equal --match-values HTTPS\\
--action-name "UrlRedirect" --redirect-protocol Https --redirect-type Moved
"""

helps['cdn endpoint rule remove'] = """
type: command
short-summary: Remove a delivery rule from an endpoint.
parameters:
- name: --rule-name
type: string
short-summary: Name of the rule.
examples:
- name: Remove the global rule.
text: >
az cdn endpoint rule remove -g group -n endpoint --profile-name profile --rule-name Global\\
"""

helps['cdn endpoint rule show'] = """
type: command
short-summary: show delivery rules asscociate with the endpoint.
examples:
- name: show delivery rules asscociate with the endpoint.
text: >
az cdn endpoint rule show -g group --profile-name profile-name
"""

helps['cdn endpoint rule condition'] = """
type: group
short-summary: Manage delivery rule conditions for an endpoint.
"""

helps['cdn endpoint rule condition add'] = """
type: command
short-summary: Add a condition to a delivery rule.
parameters:
- name: --rule-name
type: string
short-summary: Name of the rule.
- name: --match-variable
type: string
short-summary: Name of the match condition.
- name: --operator
type: string
short-summary: Operator of the match condition.
- name: --selector
type: string
short-summary: Selector of the match condition.
- name: --match-values
type: string
short-summary: Match values of the match condition (comma separated).
- name: --negate-condition
type: string
short-summary: Describes if this is negate condition or not.
- name: --transform
type: string
short-summary: Describes what transforms are applied before matching.
examples:
- name: Add a remote address condition.
text: >
az cdn endpoint rule condition add -g group -n endpoint --profile-name profile --rule-name name\\
--match-variable RemoteAddress --operator GeoMatch --match-values "TH"
"""

helps['cdn endpoint rule condition remove'] = """
type: command
short-summary: Remove a condition from a delivery rule.
parameters:
- name: --rule-name
type: string
short-summary: Name of the rule.
- name: --index
type: string
short-summary: index of the condition.
examples:
- name: Remove the first condition.
text: >
az cdn endpoint rule condition remove -g group -n endpoint --profile-name profile --rule-name name\\
--index 0
"""

helps['cdn endpoint rule condition show'] = """
type: command
short-summary: show delivery rules asscociate with the endpoint.
examples:
- name: show delivery rules asscociate with the endpoint.
text: >
az cdn endpoint rule condition show -g group --profile-name profile-name
"""

helps['cdn endpoint rule action'] = """
type: group
short-summary: Manage delivery rule actions for an endpoint.
"""

helps['cdn endpoint rule action add'] = """
type: command
short-summary: Add an action to a delivery rule.
parameters:
- name: --rule-name
type: string
short-summary: Name of the rule.
- name: --action-name
type: string
short-summary: Name of the action.
- name: --cache-behavior
type: string
short-summary: Caching behavior for the requests. Possible values are BypassCache, Override, SetIfMissing.
- name: --cache-duration
type: string
short-summary: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.
- name: --header-action
type: string
short-summary: Action to perform on headers. Possible values are Append, Overwrite, Delete.
- name: --header-name
type: string
short-summary: Name of header.
- name: --header-value
type: string
short-summary: Value of header.
- name: --header-action
type: string
short-summary: Action to perform on headers. Possible values are Append, Overwrite, Delete.
- name: --redirect-type
type: string
short-summary: The redirect type the rule will use when redirecting traffic.
- name: --redirect-protocol
type: string
short-summary: Protocol to use for the redirect. Possible values are MatchRequest, Http, Https.
- name: --custom-hostname
type: string
short-summary: Host to redirect. Leave empty to use the incoming host as the destination host.
- name: --custom-path
type: string
short-summary: The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.
- name: --custom-querystring
type: string
short-summary: The set of query strings to be placed in the redirect URL. leave empty to preserve the incoming query string.
- name: --custom-fragment
type: string
short-summary: Fragment to add to the redirect URL.
- name: --query-string-behavior
type: string
short-summary: Caching behavior for the requests. Possible values are Include, IncludeAll, Exclude and ExcludeAll.
- name: --query-parameters
type: string
short-summary: query parameters to include or exclude (comma separated).
- name: --source-pattern
type: string
short-summary: define a request URI pattern that identifies the type of requests that may be rewritten.
- name: --destination
type: string
short-summary: Define the destination path for be used in the rewrite. This will overwrite the source pattern.
- name: --preserve-unmatched-path
type: boolean
short-summary: If True, the remaining path after the source pattern will be appended to the new destination path.
examples:
- name: Add a redirect action.
text: >
az cdn endpoint rule action add -g group -n endpoint --profile-name profile --rule-name name\\
--action-name "UrlRedirect" --redirect-protocol HTTPS --redirect-type Moved
- name: Add a cache expiration action
text: >
az cdn endpoint rule action add -g group -n endpoint --profile-name profile --rule-name name\\
--action-name "CacheExpiration" --cache-behavior BypassCache
"""

helps['cdn endpoint rule action remove'] = """
type: command
short-summary: Remove an action from a delivery rule.
parameters:
- name: --rule-name
type: string
short-summary: Name of the rule.
- name: --index
type: string
short-summary: index of the action.
examples:
- name: Remove the first action.
text: >
az cdn endpoint rule action remove -g group -n endpoint --profile-name profile --rule-name name\\
--index 0
"""

helps['cdn endpoint rule action show'] = """
type: command
short-summary: show delivery rules asscociate with the endpoint.
examples:
- name: show delivery rules asscociate with the endpoint.
text: >
az cdn endpoint rule action show -g group --profile-name profile-name
"""

helps['cdn origin'] = """
type: group
short-summary: List or show existing origins related to CDN endpoints.
Expand Down
5 changes: 5 additions & 0 deletions src/azure-cli/azure/cli/command_modules/cdn/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def load_arguments(self, _):
'user requests for a compressed version. Content won\'t be compressed '
'on CDN when requested content is smaller than 1 byte or larger than 1 '
'MB.')
c.argument('preserve_unmatched_path', arg_type=get_three_state_flag(), options_list='--preserve-unmatched-path',
help='If True, the remaining path after the source pattern '
'will be appended to the new destination path.')
c.argument('negate_condition', arg_type=get_three_state_flag(), options_list='--negate-condition',
help='Describes if this is negate condition or not.')

caching_behavior = [item.value for item in list(QueryStringCachingBehavior)]
c.argument('query_string_caching_behavior', options_list='--query-string-caching',
Expand Down
34 changes: 34 additions & 0 deletions src/azure-cli/azure/cli/command_modules/cdn/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
cf_edge_nodes)


# pylint: disable=too-many-statements
def load_command_table(self, _):

def _not_found(message):
Expand Down Expand Up @@ -91,6 +92,39 @@ def _inner_not_found(ex):
doc_string_source='azure.mgmt.cdn.models#EndpointUpdateParameters',
supports_no_wait=True)

with self.command_group('cdn endpoint rule', cdn_endpoints_sdk) as g:
g.show_command('show', 'get')
g.generic_update_command('add', setter_name='update', setter_arg_name='endpoint_update_properties',
custom_func_name='add_rule',
doc_string_source='azure.mgmt.cdn.models#EndpointUpdateParameters',
supports_no_wait=True)
g.generic_update_command('remove', setter_name='update', setter_arg_name='endpoint_update_properties',
custom_func_name='remove_rule',
doc_string_source='azure.mgmt.cdn.models#EndpointUpdateParameters',
supports_no_wait=True)

with self.command_group('cdn endpoint rule condition', cdn_endpoints_sdk) as g:
g.show_command('show', 'get')
g.generic_update_command('add', setter_name='update', setter_arg_name='endpoint_update_properties',
custom_func_name='add_condition',
doc_string_source='azure.mgmt.cdn.models#EndpointUpdateParameters',
supports_no_wait=True)
g.generic_update_command('remove', setter_name='update', setter_arg_name='endpoint_update_properties',
custom_func_name='remove_condition',
doc_string_source='azure.mgmt.cdn.models#EndpointUpdateParameters',
supports_no_wait=True)

with self.command_group('cdn endpoint rule action', cdn_endpoints_sdk) as g:
g.show_command('show', 'get')
g.generic_update_command('add', setter_name='update', setter_arg_name='endpoint_update_properties',
custom_func_name='add_action',
doc_string_source='azure.mgmt.cdn.models#EndpointUpdateParameters',
supports_no_wait=True)
g.generic_update_command('remove', setter_name='update', setter_arg_name='endpoint_update_properties',
custom_func_name='remove_action',
doc_string_source='azure.mgmt.cdn.models#EndpointUpdateParameters',
supports_no_wait=True)

with self.command_group('cdn profile', cdn_profiles_sdk) as g:
g.show_command('show', 'get')
g.command('usage', 'list_resource_usage')
Expand Down
Loading