Skip to content

Commit

Permalink
Update Delete request path to include VCH datacenter (#276) (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
jak-atx authored Jan 2, 2018
1 parent 993f5a6 commit b506b97
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,18 @@ export class DeleteVchModalComponent implements OnInit {
this.loading = true;
Observable.combineLatest(
this.createWzService.getVicApplianceIp(),
this.createWzService.acquireCloneTicket()
).subscribe(([serviceHost, cloneTicket]) => {
this.createWzService.acquireCloneTicket(),
this.createWzService.getDatacenterForResource(this.vch.id)
).subscribe(([serviceHost, cloneTicket, datacenter]) => {
const vchId = this.vch.id.split(':')[3];
const servicePort = VIC_APPLIANCE_PORT;
const targetHost = this.extSessionService.getVcenterServersInfo()[0];
const targetHostname = targetHost.name;
const targetThumbprint = targetHost.thumbprint;
const targetDatacenter = datacenter.id.split(':')[3];
const url =
`https://${serviceHost}:${servicePort}/container/target/${targetHostname}/vch/${vchId}?thumbprint=${targetThumbprint}`;
`https://${serviceHost}:${servicePort}/container/target/${targetHostname}/datacenter/${targetDatacenter}` +
`/vch/${vchId}?thumbprint=${targetThumbprint}`;

const headers = new Headers({
'Content-Type': 'application/json',
Expand Down

0 comments on commit b506b97

Please sign in to comment.