def update_configuration(self, name, value=None): option_element = ElementTree.fromstring("<Option Name=\"%s\">%s</Option>" % (name, value if value is not None else "")) doDatabaseAction(self.__domain.entry_peer.connect_str, self.__domain.user, self.__domain.password, self.__name, DatabaseAction.UpdateConfiguration, child=option_element)
def updateConfiguration(self, name, value=None): optionElement = ElementTree.fromstring( '<Option Name="%s">%s</Option>' % (name, value if value is not None else "") ) doDatabaseAction( self.__domain.getEntryPeer().getConnectStr(), self.__domain.getUser(), self.__domain.getPassword(), self.__name, DatabaseAction.UpdateConfiguration, child=optionElement, )
def unquiesce(self, waitSeconds=0): doDatabaseAction( self.__domain.getEntryPeer().getConnectStr(), self.__domain.getUser(), self.__domain.getPassword(), self.__name, DatabaseAction.Unquiesce, ) if waitSeconds == 0: return if not self.__waitForStatus("RUNNING", waitSeconds): raise SessionException("Timed out waiting to unquiesce database")
def unquiesce(self, wait_seconds=0): """Unquiesce the database. wait_seconds -- (default 0) defines how long to wait for the database to unquiesce. If wait_seconds is 0 unquiesce will not wait for a response. If wait_seconds is not 0 unquiesce will block until the database is running or wait_seconds seconds pass. If the database does not respond with a status of RUNNING within the timeout, a SessionException will be raised. """ doDatabaseAction(self.__domain.entry_peer.connect_str, self.__domain.user, self.__domain.password, self.__name, DatabaseAction.Unquiesce) if wait_seconds == 0: return if not self.__wait_for_status("RUNNING", wait_seconds): raise SessionException("Timed out waiting to unquiesce database")