Skip to content

Commit

Permalink
Added PlatformInfo.DockerNetworkIsHostMode
Browse files Browse the repository at this point in the history
  • Loading branch information
p0t4t0sandwich committed Jul 22, 2024
1 parent ce7cd8f commit fdd4fb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ampapi/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ class PlatformInfo():
:type InstalledGlibcVersion: GlibcInfo
:param MaxSwapMB: The maximum swap in MB
:type MaxSwapMB: int
:param DockerNetworkIsHostMode: Whether the Docker network is in host mode
:type DockerNetworkIsHostMode: bool
"""
IsSharedSetup: bool
AdminRights: int
Expand All @@ -514,8 +516,9 @@ class PlatformInfo():
Virtualization: int
InstalledGlibcVersion: GlibcInfo
MaxSwapMB: int
DockerNetworkIsHostMode: bool

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:
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, DockerNetworkIsHostMode: bool = False) -> None:
"""
Initializes the PlatformInfo object
Author: p0t4t0sandwich
Expand All @@ -532,6 +535,7 @@ def __init__(self, CPUInfo: CPUInfoAlias, InstalledRAMMB: int, OS: int, Platform
if InstalledGlibcVersion != None:
self.InstalledGlibcVersion = GlibcInfoAlias(**InstalledGlibcVersion)
self.MaxSwapMB = MaxSwapMB
self.DockerNetworkIsHostMode = DockerNetworkIsHostMode

# 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.16
version = 1.3.17
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 fdd4fb6

Please sign in to comment.