|
@@ -195,18 +195,18 @@ export default class OptionsSchemaParser {
|
|
|
const payload: any = {}
|
|
const payload: any = {}
|
|
|
if (networkMappings && networkMappings.length) {
|
|
if (networkMappings && networkMappings.length) {
|
|
|
const hasSecurityGroups = Boolean(networkMappings
|
|
const hasSecurityGroups = Boolean(networkMappings
|
|
|
- .find(nm => nm.targetNetwork.security_groups))
|
|
|
|
|
|
|
+ .find(nm => nm.targetNetwork!.security_groups))
|
|
|
networkMappings.forEach(mapping => {
|
|
networkMappings.forEach(mapping => {
|
|
|
let target
|
|
let target
|
|
|
if (hasSecurityGroups) {
|
|
if (hasSecurityGroups) {
|
|
|
target = {
|
|
target = {
|
|
|
- id: mapping.targetNetwork.id,
|
|
|
|
|
|
|
+ id: mapping.targetNetwork!.id,
|
|
|
security_groups: mapping.targetSecurityGroups
|
|
security_groups: mapping.targetSecurityGroups
|
|
|
? mapping.targetSecurityGroups.map(s => (typeof s === 'string' ? s : s.id))
|
|
? mapping.targetSecurityGroups.map(s => (typeof s === 'string' ? s : s.id))
|
|
|
: [],
|
|
: [],
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- target = mapping.targetNetwork.id
|
|
|
|
|
|
|
+ target = mapping.targetNetwork!.id
|
|
|
}
|
|
}
|
|
|
payload[mapping.sourceNic.network_name] = target
|
|
payload[mapping.sourceNic.network_name] = target
|
|
|
})
|
|
})
|