Comments (5)
User error. :) dataStorePath is invalid -- needed to be datastorePath
from vsphere-connect.
I am not able to specify the enumerated /dynamic types. For instance:
https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.host.DatastoreBrowser.Query.html
the FileFolderQuery is simply a marker (has no attributes or members), but I method.js does not seen to be able to map 'FileFolderQuery', ['FileFolderQuery'], or { FileFolderQuery: null } into that dynamic type definition.
Is there any way to specify this using a typing function?
from vsphere-connect.
This also does not work:
const spec = {
query: vconnect.util.sType('FolderFileQuery'),
details: {
fileOwner: false,
fileSize: true,
fileType: false,
modification: true
}
};
I noticed the type is defined in the vsphere-schema instance, but still don't see any docs on how to resolve it.
"FolderFileQuery": {
"type": "FolderFileQuery",
"inherits": "FileQuery"
},
from vsphere-connect.
It looks like you are using the v1 code which is no longer in development. In the v2 code which is currently in development you can accomplish this similar to https://github.com/bhoriuchi/vsphere-connect/blob/master/src/spec/VirtualMachine.js#L163 . The v2 api is documented http://bhoriuchi.github.io/vsphere-connect/#/api
If you absolutely need to use the v1 code which uses the node-soap library you can specify an attributes
property with the xsi type like here https://github.com/bhoriuchi/vsphere-connect/blob/v1/lib/specUtil.js#L18-L20
from vsphere-connect.
This seems to work:
const spec = {
details: {
fileOwner: false,
fileSize: true,
fileType: false,
modification: true
},
query: {
attributes: {
'xsi:type': 'FolderFileQuery'
}
}
};
Thanks! I will upgrade to v2 shortly, but the v1 fix is super helpful!
Regards,
Kevin
from vsphere-connect.
Related Issues (12)
- Support for vCenter 6.5 schema HOT 4
- Wait method (Task) to finish? HOT 1
- ReconfigVM_Task disk edit HOT 4
- nsp alerts for version 1.1.2 HOT 3
- Support for 6.7.1 HOT 4
- Could not find parent type for VApp in v1
- Add TypeScript support for this lib HOT 1
- Would you like to support multiple online accounts and make request through session? HOT 3
- is this project still active? HOT 3
- When a newer vSphere version is encountered, an error is thrown HOT 11
- Failed to import ova HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vsphere-connect.