mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 20:38:06 +00:00
Make the dotnet endpoint and functions configurable in the cli (#2190)
This commit is contained in:
@ -1714,6 +1714,8 @@ class Onefuzz:
|
||||
client_secret: Optional[str] = None,
|
||||
authority: Optional[str] = None,
|
||||
tenant_domain: Optional[str] = None,
|
||||
_dotnet_endpoint: Optional[str] = None,
|
||||
_dotnet_functions: Optional[List[str]] = None,
|
||||
) -> None:
|
||||
|
||||
if endpoint:
|
||||
@ -1726,6 +1728,10 @@ class Onefuzz:
|
||||
self._backend.client_secret = client_secret
|
||||
if tenant_domain is not None:
|
||||
self._backend.config.tenant_domain = tenant_domain
|
||||
if _dotnet_endpoint is not None:
|
||||
self._backend.config.dotnet_endpoint = _dotnet_endpoint
|
||||
if _dotnet_functions is not None:
|
||||
self._backend.config.dotnet_functions = _dotnet_functions
|
||||
|
||||
if self._backend.is_feature_enabled(PreviewFeature.job_templates.name):
|
||||
self.job_templates._load_cache()
|
||||
@ -1769,6 +1775,8 @@ class Onefuzz:
|
||||
client_id: Optional[str] = None,
|
||||
enable_feature: Optional[PreviewFeature] = None,
|
||||
tenant_domain: Optional[str] = None,
|
||||
_dotnet_endpoint: Optional[str] = None,
|
||||
_dotnet_functions: Optional[List[str]] = None,
|
||||
reset: Optional[bool] = None,
|
||||
) -> BackendConfig:
|
||||
"""Configure onefuzz CLI"""
|
||||
@ -1799,6 +1807,10 @@ class Onefuzz:
|
||||
self._backend.enable_feature(enable_feature.name)
|
||||
if tenant_domain is not None:
|
||||
self._backend.config.tenant_domain = tenant_domain
|
||||
if _dotnet_endpoint is not None:
|
||||
self._backend.config.dotnet_endpoint = _dotnet_endpoint
|
||||
if _dotnet_functions is not None:
|
||||
self._backend.config.dotnet_functions = _dotnet_functions
|
||||
self._backend.app = None
|
||||
self._backend.save_config()
|
||||
|
||||
|
Reference in New Issue
Block a user