Skip to content

Commit

Permalink
Fix providerLocation() and select vdc
Browse files Browse the repository at this point in the history
  • Loading branch information
Negashev committed Apr 4, 2024
1 parent 01ec8cf commit 8917a89
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rancher-vcloud-director-node-driver-ui-plugin",
"version": "0.2.9",
"version": "0.2.10",
"private": false,
"engines": {
"node": ">=12"
Expand Down
8 changes: 3 additions & 5 deletions pkg/vcd-node-driver/cloud-credential/vcd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export default {
});
},
hostname() {
const u = parseUrl(this.value.decodedData.href);
Expand Down Expand Up @@ -94,7 +93,7 @@ export default {
this.value.annotations['vcd.cattle.io/org'] = this.value.decodedData.org;
this.value.annotations['vcd.cattle.io/href'] = this.value.decodedData.href;
if (this.vdc) {
if (this.vdc !== '') {
this.value.annotations['vcd.cattle.io/vdc'] = this.vdc;
}
Expand Down Expand Up @@ -191,9 +190,7 @@ export default {
}
} else {
const vdcs = await vcd.getVdcs();
// console.log(vdcs);
// this.$set(this, 'vdcs', vdcs);
// okay = true;
if (!vdcs.error) {
this.$set(this, 'vdcs', vdcs);
okay = true;
Expand Down Expand Up @@ -314,6 +311,7 @@ export default {
label-key="driver.vcd.auth.fields.vdc"
:options="vdcOptions"
:searchable="false"
@input="value.setData('vdc', $event);"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import MachineTemplate from '@shell/models/rke-machine.cattle.io.machinetemplate';

export default class VcdMachineTemplate extends MachineTemplate {

get provider() {
return 'vcd';
}

get providerLocation() {
return this.spec.template.spec.vdc;
return this.spec.template.spec.catalogitem + ' - ' + this.spec.template.spec.storprofile;
}

get providerSize() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/vcd-node-driver/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vcd-node-driver",
"description": "vCloud Director node-driver plugin for rancher",
"version": "0.2.9",
"version": "0.2.10",
"private": false,
"rancher": {
"annotations": {
Expand Down

0 comments on commit 8917a89

Please sign in to comment.