@@ -670,9 +670,6 @@ public void setKubernetesServiceHelpers(final List<KubernetesServiceHelper> kube
670
670
private static final ConfigKey <Boolean > AllowDeployVmIfGivenHostFails = new ConfigKey <Boolean >("Advanced" , Boolean .class , "allow.deploy.vm.if.deploy.on.given.host.fails" , "false" ,
671
671
"allow vm to deploy on different host if vm fails to deploy on the given host " , true );
672
672
673
- private static final ConfigKey <Boolean > EnableAdditionalVmConfig = new ConfigKey <>("Advanced" , Boolean .class ,
674
- "enable.additional.vm.configuration" , "false" , "allow additional arbitrary configuration to vm" , true , ConfigKey .Scope .Account );
675
-
676
673
private static final ConfigKey <String > KvmAdditionalConfigAllowList = new ConfigKey <>(String .class ,
677
674
"allow.additional.vm.configuration.list.kvm" , "Advanced" , "" , "Comma separated list of allowed additional configuration options." , true , ConfigKey .Scope .Account , null , null , EnableAdditionalVmConfig .key (), null , null , ConfigKey .Kind .CSV , null );
678
675
@@ -6280,7 +6277,7 @@ public UserVm createVirtualMachine(DeployVMCmd cmd) throws InsufficientCapacityE
6280
6277
protected void persistExtraConfigVmware (String decodedUrl , UserVm vm ) {
6281
6278
boolean isValidConfig = isValidKeyValuePair (decodedUrl );
6282
6279
if (isValidConfig ) {
6283
- String [] extraConfigs = decodedUrl .split ("\\ r?\\ n" );
6280
+ String [] extraConfigs = decodedUrl .split ("\\ r?\\ n+ " );
6284
6281
for (String cfg : extraConfigs ) {
6285
6282
// Validate cfg against unsupported operations set by admin here
6286
6283
String [] allowedKeyList = VmwareAdditionalConfigAllowList .value ().split ("," );
@@ -6308,7 +6305,7 @@ protected void persistExtraConfigVmware(String decodedUrl, UserVm vm) {
6308
6305
protected void persistExtraConfigXenServer (String decodedUrl , UserVm vm ) {
6309
6306
boolean isValidConfig = isValidKeyValuePair (decodedUrl );
6310
6307
if (isValidConfig ) {
6311
- String [] extraConfigs = decodedUrl .split ("\\ r?\\ n" );
6308
+ String [] extraConfigs = decodedUrl .split ("\\ r?\\ n+ " );
6312
6309
int i = 1 ;
6313
6310
String extraConfigKey = ApiConstants .EXTRA_CONFIG + "-" ;
6314
6311
for (String cfg : extraConfigs ) {
@@ -6388,8 +6385,8 @@ protected void persistExtraConfigKvm(String decodedUrl, UserVm vm) {
6388
6385
// validate config against denied cfg commands
6389
6386
validateKvmExtraConfig (decodedUrl , vm .getAccountId ());
6390
6387
String [] extraConfigs = decodedUrl .split ("\n \n " );
6388
+ int i = 1 ;
6391
6389
for (String cfg : extraConfigs ) {
6392
- int i = 1 ;
6393
6390
String [] cfgParts = cfg .split ("\n " );
6394
6391
String extraConfigKey = ApiConstants .EXTRA_CONFIG ;
6395
6392
String extraConfigValue ;
0 commit comments