add datacenter location awareness with pseudo-driver (cmd and file) #4

Merged
Solvik merged 10 commits from feature/datacenter into master 2019-08-04 20:09:29 +02:00
Showing only changes of commit f2195cf9e6 - Show all commits

View file

@ -40,5 +40,7 @@ class Datacenter():
def get(self): def get(self):
if not hasattr(self.driver, 'get'): if not hasattr(self.driver, 'get'):
raise Exception("Your driver {} doesn't have a get() function, please fix it".format(self.driver)) raise Exception(
"Your driver {} doesn't have a get() function, please fix it".format(self.driver)
)
return getattr(self.driver, 'get')(self.driver_value, DATACENTER_LOCATION_REGEX) return getattr(self.driver, 'get')(self.driver_value, DATACENTER_LOCATION_REGEX)
blotus commented 2019-08-04 19:00:16 +02:00 (Migrated from github.com)
Review

We should properly check if the module has a get method to output a proper error message if a custom driver is not compliant instead of an ugly stacktrace.

We should properly check if the module has a `get` method to output a proper error message if a custom driver is not compliant instead of an ugly stacktrace.
Solvik commented 2019-08-04 19:19:14 +02:00 (Migrated from github.com)
Review

Fixed in last commit

Fixed in last commit