Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When creating a vSphere Storage Profile I send a datastoreId, when reading a vSphere Storage Profile I do NOT get the datastoreId back. #258

Closed
SimonSparksUK opened this issue Apr 5, 2024 · 3 comments

Comments

@SimonSparksUK
Copy link

Description

When creating a vSphere Storage Profile I send a datastoreId, when reading a vSphere Storage Profile I do NOT get the datastoreId back.

export type StorageProfileVsphereSpecification = {
/**
* Id of the vSphere Datastore for placing disk and VM.
*/
datastoreId?: string;
};

export type VsphereStorageProfile = {

!! MISSING !! datastoreId field !!

}

Steps to Reproduce

Just look at the models in VsphereStorageProfile.d.ts and StorageProfileVsphereSpecification.d.ts

Client

  • Build Tools for VMware Aria Version: v2.38.1
  • Visual Studio Code Version:
  • OS Version:

Server

  • vRealize Automation Version: v8.16
  • vRealize Orchestrator Version: v8.16

Additional Context

We would like to automate the creation of storage profiles by looping through vCenter datastore clusters and then creating a vSphere Storage Profile in Aria Automation, however in order to do this we need to be able to compare the ID of the vCenter datastore cluster against the ID of the vCenter datastore cluster contained within the existing vSphere Storage Profiles in Aria Automation, this is to ensure we do NOT create duplicate vSphere Storage Profiles in Aria Automation.

Copy link

github-actions bot commented May 6, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 6, 2024
@SimonSparksUK
Copy link
Author

Nudge

@github-actions github-actions bot removed the Stale label May 10, 2024
@VenelinBakalov
Copy link
Contributor

Hi Simon,

Thanks for raising your concern. Unfortunately, the issue you are describing is not related to Build Tools for Aria directly. This seems to be coming from interfaces/types defined in custom code (vRO package). While the package itself might be using Build Tools for Aria in order to transpile it (build the custom code into a vRO pakcage), the missing interfaces are coming from the code base of that package and not from Build Tools for VMware Aria. On first glance, I would assume that the package you are referring to has been created against an earlier version of vRA and the missing properties you are describing are most likely coming from a later version of vRA.

However, I can propose to you an easy alternative solution which you can implement in your own code base. You can use native TS inheritance to create your own interface that re-uses everything from that package's interfaces and add the missing property on top.

Here is an example of how this can work by defining your own type: "CustomVsphereStorageProfile":

export type CustomVsphereStorageProfile = VsphereStorageProfile & {
    datastoreId: string
}

After that you can use your own defined CustomVsphereStorageProfile which preserves all of the original fields and adds the missing one on top and if needed at later point - you can continue to extend it.

I hope this helps to solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants