Skip to content

Commit

Permalink
Use existing image when editing node deployments on openstack (#1076)
Browse files Browse the repository at this point in the history
* use existing image

* simplify code

* simplify
  • Loading branch information
kgroschoff authored and Marcin Maciaszczyk committed Feb 26, 2019
1 parent bde1b5a commit 7be4cd7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export class OpenstackOptionsComponent implements OnInit, OnDestroy {
}));

this.subscriptions.push(this.addNodeService.nodeOperatingSystemDataChanges$.subscribe((data) => {
this.setImage(data);
if ((!!this.nodeData.spec.operatingSystem.ubuntu && !data.ubuntu) ||
(!!this.nodeData.spec.operatingSystem.centos && !data.centos) ||
(!!this.nodeData.spec.operatingSystem.containerLinux && !data.containerLinux)) {
this.setImage(data);
}
this.addNodeService.changeNodeProviderData(this.getOsOptionsData());
}));

Expand Down

0 comments on commit 7be4cd7

Please sign in to comment.