From c7353cfda5a1e7c83ce75ee2a460df63cfc86d3d Mon Sep 17 00:00:00 2001 From: Marin Atanasov Nikolov Date: Thu, 27 Mar 2014 12:24:57 +0200 Subject: [PATCH] Add 'connector.*' methods for retrieving content from the vSphere host --- src/vpoller/connector.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/vpoller/connector.py b/src/vpoller/connector.py index c362eb5..776483e 100644 --- a/src/vpoller/connector.py +++ b/src/vpoller/connector.py @@ -104,3 +104,37 @@ def reconnect(self): self.disconnect() self.connect() + def get_content(self): + """ + Returns the vSphere host contents + + """ + return self.si.RetrieveContent() + + def get_root_folder(self): + """ + Returns the vSphere host rootFolder + + """ + return self.si.content.rootFolder + + def get_service_content(self): + """ + Returns the vSphere host service content + + """ + return self.si.RetrieveServiceContent() + + def get_current_time(self): + """ + Returns the current time of the vSphere host + + """ + return si.CurrentTime() + + def get_capability(self): + """ + Returns the vSphere host capabilities + + """ + return self.capability