diff --git a/pyproject.toml b/pyproject.toml index 0df5566..77ee186 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,8 +62,8 @@ Sphinx = ">=4.5.0,<5.0.0" sphinx-rtd-theme = ">=1.0.0,<2.0.0" [tool.poetry.scripts] -vdrv = "volttron.plugins.vctl.driver.parser:main" volttron-platform-driver = "platform_driver.agent:main" +vdrv = "volttron.plugins.vctl.driver.parser:main" [tool.yapf] based_on_style = "pep8" diff --git a/src/platform_driver/agent.py b/src/platform_driver/agent.py index 457c71c..1914757 100644 --- a/src/platform_driver/agent.py +++ b/src/platform_driver/agent.py @@ -713,7 +713,14 @@ def add_interface(self, interface_name: str, force: bool = False, pre_release: b package_name = install_path = self._interface_package_from_short_name(interface_name) try: distribution('volttron-core') - arguments = Namespace(install_path=install_path, force=force, pre_release=pre_release) + from functools import partial + # TODO: This method should probably be moved at least mostly into vctl, + # and it should call the control service directly. + # Otherwise, this may try to package a directory which is on the client here on the server. + class Conn: + call = partial(self.vip.rpc.call, 'platform.control') + arguments = Namespace(connection=Conn(), install_path=install_path, + force=force, pre_release=pre_release) try: with redirect_stdout(st_out := StringIO()): install_lib_vctl(arguments)