Skip to content

Commit

Permalink
rerun all tests and add authPreviewDecorater
Browse files Browse the repository at this point in the history
  • Loading branch information
Greedygre committed Aug 7, 2023
1 parent 764d84f commit 5737281
Show file tree
Hide file tree
Showing 87 changed files with 156,873 additions and 122,840 deletions.
1 change: 1 addition & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Upcoming
* 'az containerapp service': add support for creation and deletion of MariaDB
* 'az containerapp create/list': support --environment-type parameter
* 'az containerapp logs show': fix raising error for response status code is not OK
* 'az containerapp auth show/update': support api-version 2023-05-02-preview
* 'az containerapp create': --yaml support property additionalPortMappings for api-version 2023-05-02-preview

0.3.36
Expand Down
4 changes: 4 additions & 0 deletions src/containerapp/azext_containerapp/_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,10 @@ class ManagedEnvironmentPreviewClient(ManagedEnvironmentClient):
api_version = PREVIEW_API_VERSION


class AuthPreviewClient(AuthClient):
api_version = PREVIEW_API_VERSION


class ConnectedEnvironmentClient():
api_version = ARC_PREVIEW_API_VERSION

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,10 @@ def get_argument_proxy_custom_proto_header(self):

def get_argument_excluded_paths(self):
return self.get_param("excluded_paths")


# decorator for preview auth show/update
class ContainerAppPreviewAuthDecorator(ContainerAppAuthDecorator):

def construct_payload(self):
super().construct_payload()
16 changes: 8 additions & 8 deletions src/containerapp/azext_containerapp/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@

from .containerapp_job_decorator import ContainerAppJobDecorator, ContainerAppJobCreateDecorator
from .containerapp_env_decorator import ContainerAppEnvDecorator, ContainerAppEnvCreateDecorator, ContainerAppEnvUpdateDecorator
from .containerapp_auth_decorator import ContainerAppAuthDecorator
from .containerapp_decorator import ContainerAppCreateDecorator, BaseContainerAppDecorator, \
ContainerAppPreviewCreateDecorator, ContainerAppPreviewListDecorator
from .containerapp_auth_decorator import ContainerAppPreviewAuthDecorator
from .containerapp_decorator import BaseContainerAppDecorator, ContainerAppPreviewCreateDecorator, ContainerAppPreviewListDecorator
from ._client_factory import handle_raw_exception, handle_non_404_exception
from ._clients import (
ManagedEnvironmentClient,
Expand All @@ -49,7 +48,8 @@
AuthClient,
WorkloadProfileClient,
ContainerAppsJobClient,
ContainerAppPreviewClient
ContainerAppPreviewClient,
AuthPreviewClient
)
from ._dev_service_utils import DevServiceUtils
from ._github_oauth import get_github_access_token
Expand Down Expand Up @@ -5038,9 +5038,9 @@ def update_auth_config(cmd, resource_group_name, name, set_string=None, enabled=
proxy_convention=None, proxy_custom_host_header=None,
proxy_custom_proto_header=None, excluded_paths=None):
raw_parameters = locals()
containerapp_auth_decorator = ContainerAppAuthDecorator(
containerapp_auth_decorator = ContainerAppPreviewAuthDecorator(
cmd=cmd,
client=AuthClient,
client=AuthPreviewClient,
raw_parameters=raw_parameters,
models=CONTAINER_APPS_SDK_MODELS
)
Expand All @@ -5051,9 +5051,9 @@ def update_auth_config(cmd, resource_group_name, name, set_string=None, enabled=

def show_auth_config(cmd, resource_group_name, name):
raw_parameters = locals()
containerapp_auth_decorator = ContainerAppAuthDecorator(
containerapp_auth_decorator = ContainerAppPreviewAuthDecorator(
cmd=cmd,
client=AuthClient,
client=AuthPreviewClient,
raw_parameters=raw_parameters,
models=CONTAINER_APPS_SDK_MODELS
)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 5737281

Please sign in to comment.