forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from sanchitmehta/master
Add `az webapp up` support
- Loading branch information
Showing
8 changed files
with
764 additions
and
5 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/appservice-kube/azext_appservice_kube/_appservice_utils.py
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from ._client_factory import web_client_factory | ||
|
||
|
||
def _generic_site_operation(cli_ctx, resource_group_name, name, operation_name, slot=None, | ||
extra_parameter=None, client=None): | ||
client = client or web_client_factory(cli_ctx) | ||
operation = getattr(client.web_apps, | ||
operation_name if slot is None else operation_name + '_slot') | ||
if slot is None: | ||
return (operation(resource_group_name, name) | ||
if extra_parameter is None else operation(resource_group_name, | ||
name, extra_parameter)) | ||
|
||
return (operation(resource_group_name, name, slot) | ||
if extra_parameter is None else operation(resource_group_name, | ||
name, extra_parameter, slot)) | ||
|
This file contains 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 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.