Add get detail of a resource to API; remove the dependency of the domain in the view...
[pti/o2.git] / o2ims / service / watcher / pserver_port_watcher.py
index 9ab6c7d..f8d29c9 100644 (file)
@@ -23,16 +23,16 @@ from o2common.helper import o2logging
 logger = o2logging.get_logger(__name__)\r
 \r
 \r
-class PServerPortWatcher(ResourceWatcher):\r
+class PServerIfPortWatcher(ResourceWatcher):\r
     def __init__(self, client: BaseClient,\r
                  bus: MessageBus) -> None:\r
         super().__init__(client, bus)\r
 \r
     def _targetname(self):\r
-        return "pserver_port"\r
+        return "pserver_if_port"\r
 \r
     def _probe(self, parent: StxGenericModel):\r
-        hostid = parent.id\r
-        newmodels = self._client.list(hostid=hostid)\r
-        return [commands.UpdatePserverPort(data=m, parentid=hostid)\r
+        interfaceid = parent.id\r
+        newmodels = self._client.list(interfaceid=interfaceid)\r
+        return [commands.UpdatePserverIfPort(data=m, parentid=interfaceid)\r
                 for m in newmodels]\r