def _get_client(self): """Creates NetApp api client.""" client = NaServer( host=self.configuration.netapp_server_hostname, server_type=NaServer.SERVER_TYPE_FILER, transport_type=self.configuration.netapp_transport_type, style=NaServer.STYLE_LOGIN_PASSWORD, username=self.configuration.netapp_login, password=self.configuration.netapp_password) return client
def _create_client(self, **kwargs): """Instantiate a client for NetApp server. This method creates NetApp server client for api communication. """ host_filer = kwargs['hostname'] LOG.debug(_('Using NetApp filer: %s') % host_filer) self.client = NaServer(host=host_filer, server_type=NaServer.SERVER_TYPE_FILER, transport_type=kwargs['transport_type'], style=NaServer.STYLE_LOGIN_PASSWORD, username=kwargs['login'], password=kwargs['password'])