Add connect endpoint for computes

Param to connect to compute after creation
Report compute unauthorized HTTP errors to client
This commit is contained in:
grossmj committed 2021-12-24 13:05:39 +10:30
1 parent 36cf43475d
commit 10fdd8fcf4
10 files changed
+55 -36

No files matched your search

+6 -2
View File
@@ -41,9 +41,13 @@ class ComputeBase(BaseModel):
protocol: Protocol
host: str
port: int = Field(..., gt=0, le=65535)
user: Optional[str] = None
user: str = None
password: Optional[SecretStr] = None
name: Optional[str] = None
class Config:
use_enum_values = True
class ComputeCreate(ComputeBase):
"""
@@ -51,7 +55,6 @@ class ComputeCreate(ComputeBase):
"""
compute_id: Union[str, uuid.UUID] = None
password: Optional[SecretStr] = None
class Config:
schema_extra = {
@@ -102,6 +105,7 @@ class ComputeUpdate(ComputeBase):
protocol: Optional[Protocol] = None
host: Optional[str] = None
port: Optional[int] = Field(None, gt=0, le=65535)
user: Optional[str] = None
password: Optional[SecretStr] = None
class Config: