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'.
This commit is contained in:
Cody Jackson 2019-10-28 08:48:08 -07:00
parent b3f5bfe615
commit 5345de7e34
1 changed files with 11 additions and 0 deletions

View File

@ -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);