Skip to content

Commit

Permalink
vapp wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis-toboggan-md committed Oct 16, 2024
1 parent 27250a8 commit 89e9306
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions shell/machine-config/vmwarevsphere.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,28 @@ const networksToVappProperties = (networks) => {
}
return networks.reduce(networkToVappProperties, [
`guestinfo.dns.servers=\${dns:${ networks[0] }}`,
`guestinfo.dns.domains=\${searchPath:${ networks[0] }}`
`guestinfo.dns.servers=\${dns:${ nameOnly(networks[0]) }}`,
`guestinfo.dns.domains=\${searchPath:${ nameOnly(networks[0]) }}`
]);
};
const networkToVappProperties = (props, network, i) => {
const n = i.toString();
const networkName = nameOnly(network);
props.push(
`guestinfo.interface.${ n }.ip.0.address=ip:${ network }`,
`guestinfo.interface.${ n }.ip.0.netmask=\${netmask:${ network }}`,
`guestinfo.interface.${ n }.route.0.gateway=\${gateway:${ network }}`
`guestinfo.interface.${ n }.ip.0.address=ip:${ networkName }`,
`guestinfo.interface.${ n }.ip.0.netmask=\${netmask:${ networkName }}`,
`guestinfo.interface.${ n }.route.0.gateway=\${gateway:${ networkName }}`
);
return props;
};
const nameOnly = (network) => {
return network.split('/').pop();
};
/**
* passing 'datacenter' yields
*
Expand Down

0 comments on commit 89e9306

Please sign in to comment.