/** * Creates an encryption zone using the parameters passed through the 'create_zone' action. * * @param params Parameters passed to the 'create_zone' command action. * @throws Exception If zone creation failed. */ private void createEncryptionZone(String[] params) throws Exception { CommandLine args = parseCommandArgs(CREATE_ZONE_OPTIONS, params); String keyName = args.getOptionValue("keyName"); Path cryptoZone = new Path(args.getOptionValue("path")); if (cryptoZone == null) { throw new Exception("Cannot create encryption zone: Invalid path '" + args.getOptionValue("path") + "'"); } try { encryptionShim.createEncryptionZone(cryptoZone, keyName); } catch (IOException e) { throw new Exception("Cannot create encryption zone: " + e.getMessage()); } writeTestOutput("Encryption zone created: '" + cryptoZone + "' using key: '" + keyName + "'"); }
/** * Creates an encryption zone using the parameters passed through the 'create_zone' action. * * @param params Parameters passed to the 'create_zone' command action. * @throws Exception If zone creation failed. */ private void createEncryptionZone(String[] params) throws Exception { CommandLine args = parseCommandArgs(CREATE_ZONE_OPTIONS, params); String keyName = args.getOptionValue("keyName"); Path cryptoZone = new Path(args.getOptionValue("path")); if (cryptoZone == null) { throw new Exception("Cannot create encryption zone: Invalid path '" + args.getOptionValue("path") + "'"); } try { encryptionShim.createEncryptionZone(cryptoZone, keyName); } catch (IOException e) { throw new Exception("Cannot create encryption zone: " + e.getMessage()); } writeTestOutput("Encryption zone created: '" + cryptoZone + "' using key: '" + keyName + "'"); }
/** * Creates an encryption zone using the parameters passed through the 'create_zone' action. * * @param params Parameters passed to the 'create_zone' command action. * @throws Exception If zone creation failed. */ private void createEncryptionZone(String[] params) throws Exception { CommandLine args = parseCommandArgs(CREATE_ZONE_OPTIONS, params); String keyName = args.getOptionValue("keyName"); Path cryptoZone = new Path(args.getOptionValue("path")); if (cryptoZone == null) { throw new Exception("Cannot create encryption zone: Invalid path '" + args.getOptionValue("path") + "'"); } try { encryptionShim.createEncryptionZone(cryptoZone, keyName); } catch (IOException e) { throw new Exception("Cannot create encryption zone: " + e.getMessage()); } writeTestOutput("Encryption zone created: '" + cryptoZone + "' using key: '" + keyName + "'"); }