def soft_refresh(self, name): cloud_to_refresh = self.remove_driver(name) data = cloud_to_refresh.data engine = data.get('ENGINE', '') driver_class = get_driver(engine) # add here your custom driver driver = driver_class(data) connector = driver.connect() self.add_driver(name, connector, data)
def load_environment(pool): """ Read from configuration and load """ cloud_pool = CloudPool() ordered_cloud_access = prepare_pool_dict(pool.copy()) for cloud in ordered_cloud_access: name, data = cloud.items()[0] engine = data.get('ENGINE', '') driver_class = get_driver(engine) # add here your custom driver driver = driver_class(data) connector = driver.connect() cloud_pool.add_driver(name, connector, data) return cloud_pool