@Override public Object execute(CommandSession session) throws Exception { try { this.session = session; return doExecute(); } catch (AuthorizationException ex) { System.err.println(String.format("Authorization error: %s",ex.getMessage())); return null; } }
@Test(enabled = true, dependsOnMethods = "testReboot") public void testSuspendResume() throws Exception { try { // may fail because of lack of AdminActions extension or non-admin user, so log and continue super.testSuspendResume(); } catch (AuthorizationException e) { getAnonymousLogger().info("testSuspendResume() threw, probably due to lack of privileges: " + e.getMessage()); } catch (UnsupportedOperationException e) { getAnonymousLogger().info("testSuspendResume() threw, probably due to unavailable AdminActions extension: " + e.getMessage()); } }
@Test(enabled = true, dependsOnMethods = "testReboot") public void testSuspendResume() throws Exception { try { // may fail because of lack of AdminActions extension or non-admin user, so log and continue super.testSuspendResume(); } catch (AuthorizationException e) { getAnonymousLogger().info("testSuspendResume() threw, probably due to lack of privileges: " + e.getMessage()); } catch (UnsupportedOperationException e) { getAnonymousLogger().info("testSuspendResume() threw, probably due to unavailable AdminActions extension: " + e.getMessage()); } }
@Test(enabled = true, dependsOnMethods = "testReboot") public void testSuspendResume() throws Exception { try { // may fail because of lack of AdminActions extension or non-admin user, so log and continue super.testSuspendResume(); } catch (AuthorizationException e) { getAnonymousLogger().info("testSuspendResume() threw, probably due to lack of privileges: " + e.getMessage()); } catch (UnsupportedOperationException e) { getAnonymousLogger().info("testSuspendResume() threw, probably due to unavailable AdminActions extension: " + e.getMessage()); } }
@Override public NodeMetadata destroyNode(String id) { URI vappId = URI.create(checkNotNull(id, "node.id")); VApp vApp = client.getVApp(vappId); if (vApp == null) return null; vApp = powerOffVAppIfDeployed(vApp); vApp = undeployVAppIfDeployed(vApp); deleteVApp(vappId); try { return getNode.getNode(id); } catch (AuthorizationException e) { logger.trace("authorization error getting %s after deletion: %s", id, e.getMessage()); return null; } }
System.exit(Errno.UNKNOWN.getErrno()); } catch (AuthorizationException ae) { System.err.println("Authorization error: " + ae.getMessage()); System.exit(Errno.EACCES.getErrno()); } catch (ContainerNotFoundException cnfe) {