File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1969,7 +1969,8 @@ export default {
19691969 deployVmData .dynamicscalingenabled = values .dynamicscalingenabled
19701970 deployVmData .iothreadsenabled = values .iothreadsenabled
19711971 deployVmData .iodriverpolicy = values .iodriverpolicy
1972- if (values .userdata && values .userdata .length > 0 ) {
1972+ const isUserdataAllowed = ! this .userdataDefaultOverridePolicy || (this .userdataDefaultOverridePolicy === ' ALLOWOVERRIDE' && this .doUserdataOverride ) || (this .userdataDefaultOverridePolicy === ' APPEND' && this .doUserdataAppend )
1973+ if (isUserdataAllowed && values .userdata && values .userdata .length > 0 ) {
19731974 deployVmData .userdata = this .$toBase64AndURIEncoded (values .userdata )
19741975 }
19751976 // step 2: select template/iso
@@ -2092,7 +2093,9 @@ export default {
20922093 }
20932094 // step 7: select ssh key pair
20942095 deployVmData .keypairs = this .sshKeyPairs .join (' ,' )
2095- deployVmData .userdataid = values .userdataid
2096+ if (isUserdataAllowed) {
2097+ deployVmData .userdataid = values .userdataid
2098+ }
20962099
20972100 if (values .name ) {
20982101 deployVmData .name = values .name
@@ -2128,7 +2131,7 @@ export default {
21282131 idx++
21292132 }
21302133 }
2131- if (this .userDataValues ) {
2134+ if (isUserdataAllowed && this .userDataValues ) {
21322135 for (const [key , value ] of Object .entries (this .userDataValues )) {
21332136 deployVmData[' userdatadetails[' + idx + ' ].' + ` ${ key} ` ] = value
21342137 idx++
You can’t perform that action at this time.
0 commit comments