You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use gcloud-node on a VM to fetch its Metadata. I expected this to be simple, since the CLI way of grabbing the Metadata is a simple CURL to a magic URL. My expectation would be that gcloud-node wraps that nicely for me already. Unfortunately, this is not the case.
Whoa, whoa, whoa, I'm already on the VM in question, do I really need to know Project ID, Zone, and VM Name just to get back to square one?
How about some kind of factory method for grabbing the current VM, such as:
var vm = gcloud.getCurrentVM();
...that does whatever magic is needed to figure out where it is running? (Or even better maybe just getLocalMetadata()?)
Just a friendly suggestion! I spent a day trying to figure out "the right way" to do this and I am ultimately falling back to the HTTP method, wanted to put this here in case it is helpful for someone else or adds some usability to the project.
Thank you!
The text was updated successfully, but these errors were encountered:
This is a great explanation of what you went through. We actually have this discussed in #917, please feel free to add any thoughts over on that issue, as we talked through some problems/solutions.
Supporting this is not exactly at the top of the priority list (reaching 1.0, using promises natively, introducing more services are currently ranked higher), but it's definitely planned.
Hello!
I would like to use gcloud-node on a VM to fetch its Metadata. I expected this to be simple, since the CLI way of grabbing the Metadata is a simple CURL to a magic URL. My expectation would be that gcloud-node wraps that nicely for me already. Unfortunately, this is not the case.
Instead, the docs say:
Whoa, whoa, whoa, I'm already on the VM in question, do I really need to know Project ID, Zone, and VM Name just to get back to square one?
How about some kind of factory method for grabbing the current VM, such as:
...that does whatever magic is needed to figure out where it is running? (Or even better maybe just
getLocalMetadata()
?)Just a friendly suggestion! I spent a day trying to figure out "the right way" to do this and I am ultimately falling back to the HTTP method, wanted to put this here in case it is helpful for someone else or adds some usability to the project.
Thank you!
The text was updated successfully, but these errors were encountered: