We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to set up a query as follows: Find all Cluster names and show all Host in each Cluster CLUSTERNAME1-> HOSTNAME1 HOSTNAME2
CLUSTERNAME2- HOSTNAME3 HOSTNAME4
My initial query:
$vCenterConnection = new \Vmwarephp\Vhost(vcenter.example.com:443', '[email protected]', 'password_of_user_auth'); //$Clusters = $vCenterConnection->findAllManagedObjects('ClusterComputeResource', array('host','name')); $Clusters = $vCenterConnection->findAllManagedObjects('ClusterComputeResource', array('name','host'));
This result as follow:
array(3) { [0]=> object(stdClass)#12 (2) { ["host"]=> array(2) { [0]=> object(stdClass)#80 (0) { } [1]=> object(stdClass)#84 (0) { } } ["name"]=> string(16) "CLUSTERNAME1" } [1]=> object(stdClass)#81 (2) { ["host"]=> array(2) { [0]=> object(stdClass)#82 (0) { } [1]=> object(stdClass)#83 (0) { } } ["name"]=> string(19) "CLUSTERNAME2" } [2]=> object(stdClass)#99 (2) { ["host"]=> array(6) { [0]=> object(stdClass)#109 (0) { } [1]=> object(stdClass)#101 (0) { } [2]=> object(stdClass)#102 (0) { } [3]=> object(stdClass)#92 (0) { } [4]=> object(stdClass)#98 (0) { } [5]=> object(stdClass)#94 (0) { } } ["name"]=> string(12) "CLUSTERNAME3" } } ["host"] give to me object(stdClass)# where number, I believe it is the host identifier. My question is: How to use this identifier to determine the host name.
array(3) { [0]=> object(stdClass)#12 (2) { ["host"]=> array(2) { [0]=> object(stdClass)#80 (0) { } [1]=> object(stdClass)#84 (0) { } } ["name"]=> string(16) "CLUSTERNAME1" } [1]=> object(stdClass)#81 (2) { ["host"]=> array(2) { [0]=> object(stdClass)#82 (0) { } [1]=> object(stdClass)#83 (0) { } } ["name"]=> string(19) "CLUSTERNAME2" } [2]=> object(stdClass)#99 (2) { ["host"]=> array(6) { [0]=> object(stdClass)#109 (0) { } [1]=> object(stdClass)#101 (0) { } [2]=> object(stdClass)#102 (0) { } [3]=> object(stdClass)#92 (0) { } [4]=> object(stdClass)#98 (0) { } [5]=> object(stdClass)#94 (0) { } } ["name"]=> string(12) "CLUSTERNAME3" } }
object(stdClass)#
Can someone help me?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to set up a query as follows:
Find all Cluster names and show all Host in each Cluster
CLUSTERNAME1-> HOSTNAME1
HOSTNAME2
CLUSTERNAME2- HOSTNAME3
HOSTNAME4
My initial query:
$vCenterConnection = new \Vmwarephp\Vhost(vcenter.example.com:443', '[email protected]', 'password_of_user_auth'); //$Clusters = $vCenterConnection->findAllManagedObjects('ClusterComputeResource', array('host','name')); $Clusters = $vCenterConnection->findAllManagedObjects('ClusterComputeResource', array('name','host'));
This result as follow:
array(3) { [0]=> object(stdClass)#12 (2) { ["host"]=> array(2) { [0]=> object(stdClass)#80 (0) { } [1]=> object(stdClass)#84 (0) { } } ["name"]=> string(16) "CLUSTERNAME1" } [1]=> object(stdClass)#81 (2) { ["host"]=> array(2) { [0]=> object(stdClass)#82 (0) { } [1]=> object(stdClass)#83 (0) { } } ["name"]=> string(19) "CLUSTERNAME2" } [2]=> object(stdClass)#99 (2) { ["host"]=> array(6) { [0]=> object(stdClass)#109 (0) { } [1]=> object(stdClass)#101 (0) { } [2]=> object(stdClass)#102 (0) { } [3]=> object(stdClass)#92 (0) { } [4]=> object(stdClass)#98 (0) { } [5]=> object(stdClass)#94 (0) { } } ["name"]=> string(12) "CLUSTERNAME3" } }
["host"] give to me
object(stdClass)#
where number, I believe it is the host identifier.My question is: How to use this identifier to determine the host name.
Can someone help me?
The text was updated successfully, but these errors were encountered: