コード例 #1
0
ファイル: RemoteCLI.py プロジェクト: animeshinvinci/pycopia
 def _rescan(self):
     locator = Pyro.naming.NameServerLocator()
     ns = locator.getNS()
     for name, isobject in ns.list(":Client"):
         if isobject:
             self._clients[name] = remoteclient.get_remote(name)
     self.add_completion_scope("host", self._clients.keys())
コード例 #2
0
 def _rescan(self):
     locator = Pyro.naming.NameServerLocator()
     ns = locator.getNS()
     for name, isobject in ns.list(":Client"):
         if isobject:
             self._clients[name] = remoteclient.get_remote(name)
     self.add_completion_scope("host", self._clients.keys())
コード例 #3
0
ファイル: labmodel.py プロジェクト: animeshinvinci/pycopia
 def rmove(self, src, dst):
     from pycopia.remote import Client
     agent = Client.get_remote(self.name.split(".")[0])
     Client.remote_copy(agent, src, dst)
     agent.unlink(src)
コード例 #4
0
ファイル: labmodel.py プロジェクト: animeshinvinci/pycopia
 def get_remote(self):
     """Returns a remote control object to interact with this device."""
     from pycopia.remote import Client
     return Client.get_remote(self.name.split(".")[0])
コード例 #5
0
ファイル: RemoteCLI.py プロジェクト: animeshinvinci/pycopia
 def rcopy(self, argv):
     """rcopy <remotefile> <localfile>
 Copies a file from the remote agent to the local file system."""
     src = argv[1]
     dest = argv[2]
     remoteclient.remote_copy(self._client, src, dest)
コード例 #6
0
 def rcopy(self, argv):
     """rcopy <remotefile> <localfile>
 Copies a file from the remote agent to the local file system."""
     src = argv[1]
     dest = argv[2]
     Client.remote_copy(self._obj, src, dest)
コード例 #7
0
ファイル: labmodel.py プロジェクト: animeshinvinci/pycopia
 def get_remote(self):
     """Returns a remote control object to interact with this device."""
     from pycopia.remote import Client
     return Client.get_remote(self.name.split(".")[0])
コード例 #8
0
ファイル: labmodel.py プロジェクト: animeshinvinci/pycopia
 def rmove(self, src, dst):
     from pycopia.remote import Client
     agent = Client.get_remote(self.name.split(".")[0])
     Client.remote_copy(agent, src, dst)
     agent.unlink(src)