what is the page for entering pyvmomi sample requests - pyvmomi

I would like to request a pyvmomi sample which would demonstrate how to to a VM snapshot. What is the Web page that I could use to enter such a request?

Open a new issue here: https://github.com/vmware/pyvmomi-community-samples/issues
Request the sample and wait for someone to make it.

Related

Why same API used in WebApp takes way more time than Normal Rest Client or browser (GET Request)?

I am so much confused after looking at response time of Same API Used in WebApp (Written in AngularJS) takes way more time (~15s) then normal rest client like postman (~4s).
Here's the api:
http://api.airpollution.online/all/public/devices
It's getting used in open airpollution project (under IndiaOpenData Association) webapp :
http://openenvironment.indiaopendata.com
WebApp is using AngularJS's $http to make http call to server.
Can anyone please help me with this?
Thanks in advance.

Which is the right method to handle oauth2.0 done in server using Ionic framework?

I am creating an Ionic app which has multiple 3rd party integration. I already have a java server which does the oauth2 authentication for the 3rd parties and redirect to the callback url in the server itself.
Now my task is to open back the app page after the server callback url is done.
I have tried the following method:
monitoring the url changes in app using ionic and redirect after the successful callback.
Which is the best way to handle this sitn.
Thanks.
Frankly, I haven't done anything like this. But to my mind, you can check ngcordova oauth implementation for ideas.
var browserRef = window.open(your_url);
browserRef.addEventListener("loadstart", function(event) {
//your code
});
browserRef.addEventListener('exit', function(event) {
deferred.reject("The sign in flow was canceled");
});
Check oauth.js source for more details.
Moreover, you can find the sample of using this implementation on this page.
http://mcgivery.com/using-custom-url-schemes-ionic-framework-app/
Above link may help you. If I am thinking correctly what you want?

Issue with AngularJS and 3G conneciton

I developed an AngularJS and I have a issue I can't fix, in a desktop the app works fine and in a mobile with Wi-Fi connection too.
But when I use it in a mobile with 3G connection it fails 'cause it doesn't do a GET request to the server, I've thought it was the cache but I disabled it in app config ($http.defaults.cache = false) and it doesn't work.
I have three nested request, one POST and two GET in order to refresh the shown data. The request in what I have the issue is the first GET, it doesn´t send the request to the server but treat the response as it had returned 200 OK.
Example code:
sendData()
.then(refreshFirstData) (problem here)
.then(refreshSecondData);
Does anyone know what can be happening?
Thanks.
EDIT
I could get a capture from the request when using 3G connection and it loads the data from cache... I think I disabled this option..
SOLUTION
I found the solution in nginx, I needed to add 'expires -1' to the config of my site.

Unauthorized dataimport-scheduler calls

I'm trying to setup an dataimport-scheduler for solr, everything's working and the deltaimport url is called every 30 minutes, the only problem is I'm using jetty and activated authentication in jetty.xml so the dataimport_scheduler gets:
<index update process> Response message Unauthorized
(saw in log file), How can I solve this?
The DataImportScheduler needs to have access to your solr/dataimport url via http. The error you see in the log file is because of the authentication you added. As far as I know the DataImportScheduler doesn't support authentication out of the box, but it should be easy to add it to the code.
Unfortunately it doesn't use http-client, which would have made things a bit easier and flexible I guess, but you can have a look at this answer to find out how to add http basic authentication to http calls made through the HttpURLConnection class.

Open Graph Action POST fails when called thru a google app engine based unpaid instance

urlopen fails with a 500 code and '{"error_code":1,"error_msg":"An unknown error occurred"}' error from Facebook when posting an Open Graph Action. I can get the code to work with other posts (e.g. posting a comment on a status using the graph API works fine). I can also get this action-post to work using curl. So this seems like a urllib2.urlopen issue when posting a form-data with a URL as one of the values.
Graph api post that works with curl :
curl -F 'access_token=nnnnnn' -F 'object=https://abc.com/123' \
'https://graph.facebook.com/me/namespace:action' -k
Same Graph api post thru urllib2 which gives the error :
from urllib2 import urlopen, Request, URLError
request = Request (url='http://graph.facebook.com/me/namespace:action';,
data = urllib.urlencode(
{'object':'https://abc.com/123',
'access_token':'nnnnnnnn'
},
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
)
response = urlopen (request)
What could I be doing wrong ? (I am new to urllib2.urlopen. Btw, I originally tried urlfetch.fetch thru the urlfetch python module. That did not work either). I am using this thru goole app engine.
After a fair amount of digging/trial-error, finally managed to solve this.
This is not an issue with urllib urlopen, but more of a Google App Engine nuance where when an action post on an open Graph URL is called - it causes Facebook to trigger a 'get' on the Object URL (synchronously).
So essentially the get is being called on app engine app while an active instance is already calling the FB graph URL. I am currently using an unpaid instance and this is causing an unexpected behavior such that FB to fails the OG post (I see the get on the logs going thru successfully, while the active post, so not sure what causes FB to fail - anybody with an insight, please share).
I got around this by 'taskqueue'ing urlopen/OG-action-post - and when this is called the second time (FB apparently caches the object the first time) it succeeds.
If anybody needs more details, get in touch and am more than happy to save you all the time and pain that I have already gone thru..

Resources