From 5345de7e34789f2e6019d0e56b51fde79ed6c4ba Mon Sep 17 00:00:00 2001 From: Cody Jackson Date: Mon, 28 Oct 2019 08:48:08 -0700 Subject: [PATCH] Parse the 'key=value' format of custom attributes We weren't initializing custom attributes because we were not parsing the backend format appropriately. We needed to parse the 'key=value'. --- .../components/driver-vmwarevsphere/component.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/nodes/addon/components/driver-vmwarevsphere/component.js b/lib/nodes/addon/components/driver-vmwarevsphere/component.js index 7d97ae068..bcb7bb2f1 100644 --- a/lib/nodes/addon/components/driver-vmwarevsphere/component.js +++ b/lib/nodes/addon/components/driver-vmwarevsphere/component.js @@ -367,6 +367,17 @@ export default Component.extend(NodeDriver, { set(this, 'vappMode', getInitialVappMode(get(this, 'config'))); }, + initCustomAttributes() { + set(this, 'initialCustomAttributes', get(this, 'config.customAttribute').map((v) => { + const [key, value] = v.split('='); + + return { + key, + value, + }; + })); + }, + updateVappOptions(opts) { set(this, 'config.vappIpprotocol', opts.vappIpprotocol); set(this, 'config.vappIpallocationpolicy', opts.vappIpallocationpolicy);