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:
target[property] = prop[property]
def is_connected(self):
return False
def connect(self):
return

View File

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