Classes¶
- class pManager.dataModels.Port(serviceName, portNum, portProto, openState, portDesc='No description')[source]¶
Bases:
objectClass for representing a port in .qpmgr file.
- getPortAsJson()[source]¶
Returns the port details as a JSON-like dictionary.
- Returns:
- A dictionary where the key is the port number, and the value is another dictionary containing:
”protocol” (str): The protocol of the port.
”description” (str): The description of the port.
”opened” (bool): The state of the port, whether it is open or closed.
- Return type:
dict
- class pManager.dataModels.Service(serviceName, portList=None, serviceDescription='No description')[source]¶
Bases:
objectClass for representing a service in .qpmgr file.
- addPortToService(portJson)[source]¶
Adds a port to the service.
- Parameters:
portJson (dict) – Json of the port to add
- generatePortConfig()[source]¶
Returns the port configuration of the service.
- Returns:
The port configuration of the service.
- Return type:
str
- getServiceAsJson()[source]¶
Returns the service details as a JSON-like dictionary.
- Returns:
- A dictionary where the key is the service name, and the value is another dictionary containing:
- ”ports” (dict): A dictionary where the key is the port number, and the value is another dictionary containing:
”protocol” (str): The protocol of the port.
”description” (str): The description of the port.
”opened” (bool): The state of the port, whether it is open or closed.
”description” (str): The description of the service.
- Return type:
dict