fix add_port_mapping
This commit is contained in:
parent
c83f0af7c8
commit
499bbcc61d
2 changed files with 5 additions and 8 deletions
|
@ -4,13 +4,10 @@ none_or_str = Union[None, str]
|
|||
|
||||
|
||||
class SOAPCommands:
|
||||
def debug_commands(self) -> dict:
|
||||
raise NotImplementedError()
|
||||
|
||||
@staticmethod
|
||||
async def AddPortMapping(NewRemoteHost: str, NewExternalPort: int, NewProtocol: str, NewInternalPort: int,
|
||||
NewInternalClient: str, NewEnabled: bool, NewPortMappingDescription: str,
|
||||
NewLeaseDuration: str = '') -> None:
|
||||
NewInternalClient: str, NewEnabled: int, NewPortMappingDescription: str,
|
||||
NewLeaseDuration: str = '0') -> None:
|
||||
"""Returns None"""
|
||||
raise NotImplementedError()
|
||||
|
||||
|
|
|
@ -85,11 +85,11 @@ class UPnP:
|
|||
|
||||
@cli
|
||||
async def add_port_mapping(self, external_port: int, protocol: str, internal_port: int, lan_address: str,
|
||||
description: str, lease_duration: int) -> None:
|
||||
description: str) -> None:
|
||||
return await self.gateway.commands.AddPortMapping(
|
||||
NewRemoteHost="", NewExternalPort=external_port, NewProtocol=protocol,
|
||||
NewRemoteHost='', NewExternalPort=external_port, NewProtocol=protocol,
|
||||
NewInternalPort=internal_port, NewInternalClient=lan_address,
|
||||
NewEnabled=True, NewPortMappingDescription=description, NewLeaseDuration=str(lease_duration)
|
||||
NewEnabled=1, NewPortMappingDescription=description
|
||||
)
|
||||
|
||||
@cli
|
||||
|
|
Loading…
Reference in a new issue