mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 20:38:06 +00:00
instance wide configuration (#1010)
TODO: * [x] add setting initial set of admins during deployment
This commit is contained in:
@ -1557,6 +1557,22 @@ class ScalesetProxy(Endpoint):
|
||||
return self._req_model("GET", responses.ProxyList, data=requests.ProxyGet())
|
||||
|
||||
|
||||
class InstanceConfigCmd(Endpoint):
|
||||
"""Interact with Instance Configuration"""
|
||||
|
||||
endpoint = "instance_config"
|
||||
|
||||
def get(self) -> models.InstanceConfig:
|
||||
return self._req_model("GET", models.InstanceConfig)
|
||||
|
||||
def update(self, config: models.InstanceConfig) -> models.InstanceConfig:
|
||||
return self._req_model(
|
||||
"POST",
|
||||
models.InstanceConfig,
|
||||
data=requests.InstanceConfigUpdate(config=config),
|
||||
)
|
||||
|
||||
|
||||
class Command:
|
||||
def __init__(self, onefuzz: "Onefuzz", logger: logging.Logger):
|
||||
self.onefuzz = onefuzz
|
||||
@ -1634,6 +1650,7 @@ class Onefuzz:
|
||||
self.scalesets = Scaleset(self)
|
||||
self.nodes = Node(self)
|
||||
self.webhooks = Webhooks(self)
|
||||
self.instance_config = InstanceConfigCmd(self)
|
||||
|
||||
if self._backend.is_feature_enabled(PreviewFeature.job_templates.name):
|
||||
self.job_templates = JobTemplates(self)
|
||||
|
Reference in New Issue
Block a user