Giter Site home page Giter Site logo

node-vsphere-soap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-vsphere-soap's Issues

Error on expired session

Moved this from node-vsphere to node-vsphere-soap, since it appears to be an issue in the lib.

I've added this library to a hubot script that controls our Vsphere, so it will be running 24x7. I instantiate the client on start of the bot, but after time with no commands, I get this error

 error contents : <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>The session is not authenticated.</faultstring><detail><NotAuthenticatedFault xmlns="urn:vim25" xsi:type="NotAuthenticated"><object type="Folder">group-d1</object><privilegeId>System.View</privilegeId></NotAuthenticatedFault></detail></soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
authorization token expired! reconnecting...
error contents : <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring>
Required property obj is missing from data object of type ObjectSpec

while parsing serialized DataObject of type vmodl.query.PropertyCollector.ObjectSpec
at line 1, column 584

while parsing property &quot;objectSet&quot; of static type ArrayOfObjectSpec

while parsing serialized DataObject of type vmodl.query.PropertyCollector.FilterSpec
at line 1, column 382

while parsing call information for method RetrievePropertiesEx
at line 1, column 243

while parsing SOAP body
at line 1, column 232

while parsing SOAP envelope
at line 1, column 0

while parsing HTTP request for method retrievePropertiesEx
on object of type vmodl.query.PropertyCollector
at line 1, column 0</faultstring><detail><InvalidRequestFault xmlns="urn:vim25" xsi:type="InvalidRequest"></InvalidRequestFault></detail></soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Update version number

First of all, I want to thank you for your work. It's already really useful to me.

I'm currently using yarn to manage my dependencies. The thing is it is stricter about semver than npm.
So the fact that you named your current version 0.0.2-5 means that it's a pre-version of 0.0.2 (much like 0.0.2-beta.1 or so).
If you're interested in it, you can learn about the rules here : http://semver.org
Anyhow, it causes yarn to pick the version 0.0.2 of your package when using node-vsphere instead of your last version 0.0.2-5. This is also due to your way of declaring your dependency in node-vsphere where "node-vsphere-soap": "^0.0.2-5" means that it shall pick any version superior or equal to 0.0.2-5. And 0.0.2 does.
There is a workaround for me which is to add directly the dependency to node-vsphere-soap among the direct dependencies of my project. But I would really like to avoid that.
It is possible for you to either rename your version (not the best way to deal with the problem), or rather release a new version (such as a 0.0.3-1 ?)

Feature Request - Live Updates

It would be nice to implement a service that continually retrieves the status of a VM (refreshes every 60 seconds...)

I am building a VMWare reporting dashboard that uses this feature, If you would like to collaborate and implement this feature I would be willing to share source code.

Best,
Jesse

Error cannot read propery 'match'

TypeError: Cannot read property 'match' of undefined
at _soapErrorHandler (/vsphere/node_modules/node-vsphere-soap/lib/client.js:216:14)
at /vsphere/node_modules/node-vsphere-soap/lib/client.js:92:9
at /vsphere/node_modules/soap/lib/client.js:130:7
at /vsphere/node_modules/soap/lib/client.js:222:7
at Request._callback (/vsphere/node_modules/soap/lib/http.js:49:7)
at self.callback (/vsphere/node_modules/request/request.js:198:22)
at Request.emit (events.js:107:17)
at Request.onRequestError (/vsphere/node_modules/request/request.js:861:8)
at ClientRequest.emit (events.js:107:17)
at TLSSocket.socketOnEnd (_http_client.js:300:9)
at TLSSocket.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)

An invalid FQDN or IP results in an uncaught DNS erro

An invalid FQDN or IP results in an uncaught DNS error.. I am unable to catch the error too:

error: uncaughtException: getaddrinfo ENOTFOUND test_vcenter2 test_vcenter2:443 date=Tue Jun 28 2016 12:10:19 GMT-0400 (Eastern Daylight Time), pid=33088, uid=n
ull, gid=null,version=v4.4.4, argv=[C:\Program Files\nodejs\n
ode.exe, ], rss=119599104, heapTotal=92604496, heapUsed=90546456, loadavg=[0, 0, 0], uptime=313621.62446
96, trace=[column=10, file=dns.js, function=errnoException, line=27, method=null, native=false, column=26, file=dns.js, function=GetAddrInfoReqWrap.onlookup [as
 oncomplete], line=78, method=onlookup [as oncomplete], native=false], stack=[Error: getaddrinfo ENOTFOUND test_vcenter2 test_vcenter2:443,     at errnoExceptio
n (dns.js:27:10),     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:26)]

My code

try{
    vc = new Vsphere.Client(vCenterIP,username,password, false);
    vc.once('ready', function() {
      successCallback("success");
    });
    vc.once('error', function(err) {
      // handle error here
      console.log("Error Connecting to vSphere Client - "+ err);
      errorCallback("Error Connecting to vSphere Client " + err);
    });
  }catch (err){
    console.log("Error Connecting to vSphere Client - "+ err);
    errorCallback("Error Connecting to vSphere Client " + err);
  }

Security updates

Hi,

I am a developper from vates, and use your library to migrate VM from VmWare to XCP. It's been a great help for our work, thank you . To ensure security compliance, we forked it, but we would like to port the change upstream.

The two main changes are

  • removing the lodash dependency which is too old and with security problems

  • changes the way we handle self signed ssl certificate , especially not using process.env.NODE_TLS_REJECT_UNAUTHORIZED

    Are you still on this repo, and do you want the PR ( I will make a specific PR, without the code changes of our linter, it should be a few lines ) ?

regards,

Florent

SOAP ISSUE

./vsphere-front-end/node_modules/node-vsphere-soap/node_modules/soap/lib/wsdl.js:864
elem.targetNSAlias = type.namespace;
^
TypeError: Cannot assign to read only property 'targetNSAlias' of xsd:string

can be fixed by commenting out line 864 and 865 of that file, though you should see if you can move up to a newer version of soap.

self.client.VimService.VimPort is not a function

Hi everyone,

Got an issue with VimService.VimPort which is not found as method.
It seems to be OK to connect to ESX Host but when I try to put command line to list all vms....it fails !

Do you have an idea (I am under windows server 2008 r2)?

image

Update package.json to point to modern version of soap library

When I installed node-vsphere-soap today, it installed soap version 0.6.1 even though the latest version is 0.9.3. I have no idea why npm did not pick up a later version but it did not. soap 0.6.1 is not usable in modern node (v0.12+) due to a fixed bug.

Is it possible to point your package.json to a higher version so this issue is prevented?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.