Converted the storage model for pm_configs to a child node of the
device rather then being embedded in the device. Finalized all API
calls and callbacks. The simulated adapter and ponsim will be addressed
in a subsequent commit.

Amendment: Created a more generic variable to pass additional data to
the callbacks registerd for data model updates as suggested by the code
review.

Change-Id: Idc5e2a175a17be791f5f7696bd2f0a02e2a0b965
diff --git a/voltha/core/adapter_agent.py b/voltha/core/adapter_agent.py
index 7ba382b..d6e32af 100644
--- a/voltha/core/adapter_agent.py
+++ b/voltha/core/adapter_agent.py
@@ -210,6 +210,17 @@
         device_agent = self.core.get_device_agent(device.id)
         device_agent.update_device(device)
 
+    def update_device_pm_config(self, device_pm_config, init=False):
+        assert isinstance(device_pm_config, PmConfigs)
+
+        # we run the update through the device_agent so that the change
+        # does not loop back to the adapter unnecessarily
+        device_agent = self.core.get_device_agent(device_pm_config.id)
+        device_agent.update_device_pm_config(device_pm_config,init)
+
+    def update_adapter_pm_config(self, device, device_pm_config):
+        self.adapter.update_pm_config(device, device_pm_config)
+
     def add_port(self, device_id, port):
         assert isinstance(port, Port)