add check function

This commit is contained in:
itsikkes 2016-05-29 11:44:19 +03:00
parent ac46b8c91d
commit 932dcbc475
2 changed files with 10 additions and 4 deletions

View File

@ -12,6 +12,9 @@ class NetControllerConnector(object):
else: else:
target[property] = prop[property] target[property] = prop[property]
def is_connected(self):
return False
def connect(self): def connect(self):
return return

View File

@ -23,10 +23,13 @@ class VCenterConnector(NetControllerConnector):
} }
def connect(self): def connect(self):
self._service_instance = SmartConnect(host=self._address, self._service_instance = SmartConnect(host=self._properties["address"],
port=self._port, port=self._properties["port"],
user=self._username, user=self._properties["username"],
pwd=self._password) pwd=self._properties["password"])
def is_connected(self):
return not self._service_instance == None
def get_vlans_list(self): def get_vlans_list(self):
return [] return []