File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 12
12
from enum import Enum
13
13
14
14
15
- _CHRIS_ROLE = {"label" : {"org.chrisproject.role=ChRIS ultron backEnd" : True }}
15
+ BACKEND_CONTAINER_LABEL = "org.chrisproject.role=ChRIS_ultron_backEnd"
16
+ _CHRIS_ROLE = {"label" : {BACKEND_CONTAINER_LABEL : True }}
16
17
17
18
18
19
async def find_cube (
Original file line number Diff line number Diff line change 3
3
4
4
import aiodocker
5
5
from chrisomatic .spec .common import User
6
- from chrisomatic .core .docker import find_cube
6
+ from chrisomatic .core .docker import find_cube , BACKEND_CONTAINER_LABEL
7
7
8
8
9
9
async def create_superuser (docker : Optional [aiodocker .Docker ], user : User ) -> None :
10
10
if docker is None :
11
11
raise SuperuserCreationError (
12
12
"Cannot create superuser without connection to Docker."
13
13
)
14
- cube = await find_cube (docker )
14
+ if (cube := await find_cube (docker )) is None :
15
+ raise SuperuserCreationError (
16
+ f"No container found on host { docker .docker_host } "
17
+ f"with label { BACKEND_CONTAINER_LABEL } "
18
+ )
15
19
script = cleandoc (
16
20
f"""
17
21
from django.contrib.auth.models import User
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " chrisomatic"
3
- version = " 0.5.0.a1 "
3
+ version = " 0.5.0.a2 "
4
4
description = " ChRIS backend provisioner with Powerpointlessness"
5
5
authors = [
" Jennings Zhang <[email protected] >" ]
6
6
license = " MIT"
You can’t perform that action at this time.
0 commit comments