Skip to content

Commit

Permalink
Fixed last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
p0t4t0sandwich committed Apr 8, 2024
1 parent cedbb05 commit 505a68b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions ampapi/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ class Instance():
:type DeploymentArgs: dict[str, str]
:param DisplayImageSource: The display image source
:type DisplayImageSource: str
:param ContainerSwapMB: The container swap in MB
:type ContainerSwapMB: int
"""
InstanceID: UUID
TargetID: UUID
Expand Down Expand Up @@ -396,8 +398,9 @@ class Instance():
ApplicationEndpoints: list[EndpointInfo]
DeploymentArgs: dict[str, str]
DisplayImageSource: str
ContainerSwapMB: int

def __init__(self, InstanceID: UUID, TargetID: UUID, InstanceName: str, FriendlyName: str, Module: str, AMPVersion: AMPVersionAlias, IsHTTPS: bool, IP: str, Port: int, Daemon: bool, DaemonAutostart: bool, ExcludeFromFirewall: bool, Running: bool, AppState: State, Tags: list[str], DiskUsageMB: int, ReleaseStream: str, ManagementMode: str, Suspended: bool, IsContainerInstance: bool, ContainerMemoryMB: int, ContainerMemoryPolicy: str, ContainerCPUs: int, ApplicationEndpoints: list[EndpointInfo], DeploymentArgs: dict[str, str], Metrics: dict[str, Metric] = {}, DisplayImageSource: str = "", Description: str = "", ModuleDisplayName: str = "", SpecificDockerImage: str = "") -> None:
def __init__(self, InstanceID: UUID, TargetID: UUID, InstanceName: str, FriendlyName: str, Module: str, AMPVersion: AMPVersionAlias, IsHTTPS: bool, IP: str, Port: int, Daemon: bool, DaemonAutostart: bool, ExcludeFromFirewall: bool, Running: bool, AppState: State, Tags: list[str], DiskUsageMB: int, ReleaseStream: str, ManagementMode: str, Suspended: bool, IsContainerInstance: bool, ContainerMemoryMB: int, ContainerMemoryPolicy: str, ContainerCPUs: int, ApplicationEndpoints: list[EndpointInfo], DeploymentArgs: dict[str, str], Metrics: dict[str, Metric] = {}, DisplayImageSource: str = "", Description: str = "", ModuleDisplayName: str = "", SpecificDockerImage: str = "", ContainerSwapMB: int = 0) -> None:
"""
Initializes the Instance object
Author: p0t4t0sandwich
Expand Down Expand Up @@ -431,6 +434,8 @@ def __init__(self, InstanceID: UUID, TargetID: UUID, InstanceName: str, Friendly
self.ApplicationEndpoints = [EndpointInfo(**ApplicationEndpoints[i]) for i in range(len(ApplicationEndpoints))]
self.DeploymentArgs = DeploymentArgs
self.DisplayImageSource = DisplayImageSource
self.SpecificDockerImage = SpecificDockerImage
self.ContainerSwapMB = ContainerSwapMB

class GlibcInfo():
"""
Expand Down Expand Up @@ -486,8 +491,6 @@ class PlatformInfo():
:type InstalledGlibcVersion: GlibcInfo
:param MaxSwapMB: The maximum swap in MB
:type MaxSwapMB: int
:param ContainerSwapMB: The container swap in MB
:type ContainerSwapMB: int
"""
IsSharedSetup: bool
AdminRights: int
Expand All @@ -500,9 +503,8 @@ class PlatformInfo():
Virtualization: int
InstalledGlibcVersion: GlibcInfo
MaxSwapMB: int
ContainerSwapMB: int

def __init__(self, CPUInfo: CPUInfoAlias, InstalledRAMMB: int, OS: int, PlatformName: str, SystemType: int, Virtualization: int, InstalledGlibcVersion: GlibcInfoAlias = None, IsSharedSetup: bool = False, AdminRights: int = -1, HardwarePlatformName: str = "", MaxSwapMB: int = 0, ContainerSwapMB: int = 0) -> None:
def __init__(self, CPUInfo: CPUInfoAlias, InstalledRAMMB: int, OS: int, PlatformName: str, SystemType: int, Virtualization: int, InstalledGlibcVersion: GlibcInfoAlias = None, IsSharedSetup: bool = False, AdminRights: int = -1, HardwarePlatformName: str = "", MaxSwapMB: int = 0) -> None:
"""
Initializes the PlatformInfo object
Author: p0t4t0sandwich
Expand All @@ -519,7 +521,6 @@ def __init__(self, CPUInfo: CPUInfoAlias, InstalledRAMMB: int, OS: int, Platform
if InstalledGlibcVersion != None:
self.InstalledGlibcVersion = GlibcInfoAlias(**InstalledGlibcVersion)
self.MaxSwapMB = MaxSwapMB
self.ContainerSwapMB = ContainerSwapMB

# Type alias for PlatformInfo
# Author: p0t4t0sandwich
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ampapi
version = 1.3.13
version = 1.3.14
author = Dylan Sperrer - p0t4t0sandwich - thepotatoking3452
author_email = [email protected]
description = An API that allows you to communicate with AMP installations from within Python.
Expand Down

0 comments on commit 505a68b

Please sign in to comment.