diff --git a/monkey_business/cc/connectors/__init__.py b/monkey_business/cc/connectors/__init__.py index 16c91c013..ad185812a 100644 --- a/monkey_business/cc/connectors/__init__.py +++ b/monkey_business/cc/connectors/__init__.py @@ -12,6 +12,9 @@ class NetControllerConnector(object): else: target[property] = prop[property] + def is_connected(self): + return False + def connect(self): return diff --git a/monkey_business/cc/connectors/vcenter.py b/monkey_business/cc/connectors/vcenter.py index 7aab6a6df..49f743f63 100644 --- a/monkey_business/cc/connectors/vcenter.py +++ b/monkey_business/cc/connectors/vcenter.py @@ -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 []