File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,14 @@ class KubernetesEnvironment(BaseModel):
8282 host : HttpUrl
8383
8484
85+ class DummyEnvironment (BaseModel ):
86+ """Dummy environment for testing purposes"""
87+ kind : Literal ['DummyEnvironment' ] = 'DummyEnvironment'
88+
89+
8590AllocationValue = Annotated [
8691 Union [
92+ DummyEnvironment ,
8793 OpenStackEnvironment ,
8894 EGIComputeEnvironment ,
8995 KubernetesEnvironment ,
Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ def get_im_auth_header(
9090 cloud_auth_data ["type" ] = "Kubernetes"
9191 cloud_auth_data ["host" ] = str (allocation .host )
9292 cloud_auth_data ["token" ] = token
93+ elif allocation .kind == "DummyEnvironment" :
94+ cloud_auth_data ["type" ] = "Dummy"
9395 else :
9496 raise ValueError ("Allocation kind not supported" )
9597 auth_data .append (cloud_auth_data )
You can’t perform that action at this time.
0 commit comments