Skip to content

Commit

Permalink
1 add logging around list microservices for metalnx bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Sep 12, 2018
1 parent 81edf9f commit 41d0530
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.irods.jargon.core.connection.IRODSServerProperties;
import org.irods.jargon.core.exception.DataNotFoundException;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.exception.OperationNotSupportedByThisServerException;
import org.irods.jargon.core.pub.domain.ClientHints;
import org.irods.jargon.core.pub.domain.RemoteCommandInformation;

Expand Down Expand Up @@ -56,10 +57,13 @@ public interface EnvironmentalInfoAO extends IRODSAccessObject {
* This method will operate on iRODS servers version 3.0 and up.
*
* @return {@code List<String>} with the names of the available microservices.
* @throws OperationNotSupportedByThisServerException
* {@link OperationNotSupportedByThisServerException} if cannot list
* the msis (for servers < 3.0)
* @throws JargonException
* {@link JargonException}
*/
List<String> listAvailableMicroservices() throws JargonException;
List<String> listAvailableMicroservices() throws OperationNotSupportedByThisServerException, JargonException;

/**
* Check (by version) whether this server can run specific (SQL) query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.irods.jargon.core.connection.IRODSSession;
import org.irods.jargon.core.exception.DataNotFoundException;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.exception.OperationNotSupportedByThisServerException;
import org.irods.jargon.core.exception.RemoteScriptExecutionException;
import org.irods.jargon.core.packinstr.MiscApiConstants;
import org.irods.jargon.core.packinstr.Tag;
Expand Down Expand Up @@ -219,19 +220,14 @@ public List<RemoteCommandInformation> listAvailableRemoteCommands() throws DataN

}

/*
* (non-Javadoc)
*
* @see org.irods.jargon.core.pub.EnvironmentalInfoAO#listAvailableMicroservices
* ()
*/
@Override
public List<String> listAvailableMicroservices() throws JargonException {
public List<String> listAvailableMicroservices()
throws OperationNotSupportedByThisServerException, JargonException {
log.info("listAvailableMicroservices()");
List<String> availableMicroservices = new ArrayList<String>();

if (!getIRODSServerProperties().isTheIrodsServerAtLeastAtTheGivenReleaseVersion("rods3.0")) {
throw new JargonException("service not available on servers prior to rods3.0");
throw new OperationNotSupportedByThisServerException("service not available on servers prior to rods3.0");
}

RuleProcessingAO ruleProcessingAO = getIRODSAccessObjectFactory().getRuleProcessingAO(getIRODSAccount());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
myTestRule {
listEnabledMsis {
#Output
# Buffer holding list of microservices in form Key=Value
#Output from running the example is:
Expand Down

0 comments on commit 41d0530

Please sign in to comment.