Compare commits

..

No commits in common. "f1c340fb3df4e34b1cd49ad28cf5a31b79240f80" and "c63ecf77818cb47d5374cfacb8aa236357c2ab93" have entirely different histories.

3 changed files with 1 additions and 42 deletions

View File

@ -50,18 +50,6 @@ class OMMClient2:
return None return None
return r.account[0] return r.account[0]
def get_pp_dev(self, ppn):
"""
Get PP device
:param id: Device id
"""
r = self.session.request(messages.GetPPDev(ppn))
r.raise_on_error()
if r.pp is None:
return None
return r.pp[0]
def ping(self): def ping(self):
""" """
Is OMM still there? Is OMM still there?

View File

@ -44,7 +44,7 @@ class DictRequest(Request):
def __init__(self, name, attrs={}, childs={}): def __init__(self, name, attrs={}, childs={}):
self.name = name self.name = name
self.attrs = attrs self.attrs = attrs
self.childs = childs self.childs = attrs
class Response: class Response:
@ -98,7 +98,6 @@ class Response:
return self.attrs.get("maxLen") return self.attrs.get("maxLen")
from .getaccount import GetAccount, GetAccountResp from .getaccount import GetAccount, GetAccountResp
from .getppdev import GetPPDev, GetPPDevResp
from .open import Open, OpenResp from .open import Open, OpenResp
from .ping import Ping, PingResp from .ping import Ping, PingResp
@ -125,7 +124,6 @@ def construct(request):
def _response_type_by_name(name): def _response_type_by_name(name):
response_types = [ response_types = [
GetAccountResp, GetAccountResp,
GetPPDevResp,
PingResp, PingResp,
] ]

View File

@ -1,27 +0,0 @@
#!/usr/bin/env python3
from . import Request, Response
class GetPPDev(Request):
def __init__(self, ppn, maxRecords=None, **kwargs):
super().__init__("GetPPDev", **kwargs)
self.attrs["ppn"] = ppn
if maxRecords is not None:
self.attrs["maxRecords"] = maxRecords
@property
def ppn(self):
return self.attrs.get("ppn")
@property
def maxRecords(self):
return self.attrs.get("maxRecords")
class GetPPDevResp(Response):
@property
def pp(self):
return self.childs.get("pp")