Skip to content

Commit c5ff992

Browse files
committed
refactor
1 parent 15b354c commit c5ff992

11 files changed

Lines changed: 50 additions & 1 deletion
4 Bytes
Binary file not shown.
-94 Bytes
Binary file not shown.

app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
write_bugfix,
55
write_installation,
66
edit_directory_generator,execute_pythonfile)
7-
from .models import (IaCBasicInput,
7+
from app.models import (IaCBasicInput,
88
IaCBugfixInput,
99
Output,
1010
IaCInstallationInput,IaCTemplateGeneration,HelmTemplateGeneration)

app/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .helm_models import *
2+
from .terraform_models import *
3+
from .utils import *
238 Bytes
Binary file not shown.
944 Bytes
Binary file not shown.
1.77 KB
Binary file not shown.
901 Bytes
Binary file not shown.

app/models/helm_models.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from pydantic import BaseModel
2+
from typing import List, Optional
3+
4+
class Pod(BaseModel):
5+
name:str
6+
image:str
7+
target_port:int
8+
9+
class HelmTemplateGeneration(BaseModel):
10+
api_version:int = 1
11+
pods:List[Pod]
12+

app/models/terraform_models.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from pydantic import BaseModel
2+
from typing import List, Optional
3+
4+
from .utils import BasicInput
5+
6+
7+
class IaCBasicInput(BasicInput):
8+
input:str
9+
service:Optional[str] = 'terraform'
10+
11+
class IaCBugfixInput(BasicInput):
12+
bug_description:str
13+
version:str = 'latest'
14+
service:Optional[str] = 'terraform'
15+
16+
class IaCInstallationInput(BaseModel):
17+
os:str = "ubuntu"
18+
service:Optional[str] = 'terraform'
19+
20+
class IaCTemplateGeneration(BaseModel):
21+
CI_integration:bool = True
22+
base_config:str = 'ec2'
23+
service:str = 'terraform'

0 commit comments

Comments
 (0)