File: Datacenter.rst

package info (click to toggle)
python-pyvmomi 6.7.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,984 kB
  • sloc: python: 9,206; xml: 77; makefile: 9
file content (251 lines) | stat: -rw-r--r-- 8,914 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
.. _int: https://docs.python.org/2/library/stdtypes.html

.. _str: https://docs.python.org/2/library/stdtypes.html

.. _bool: https://docs.python.org/2/library/stdtypes.html

.. _host: ../vim/vm/ConfigOptionDescriptor.rst#host

.. _Network: ../vim/Network.rst

.. _template: ../vim/vm/ConfigInfo.rst#template

.. _vim.Task: ../vim/Task.rst

.. _VirtualApp: ../vim/VirtualApp.rst

.. _vim.Folder: ../vim/Folder.rst

.. _VI API 2.5: ../vim/version.rst#vimversionversion2

.. _vim.Network: ../vim/Network.rst

.. _ResourcePool: ../vim/ResourcePool.rst

.. _vim.Datastore: ../vim/Datastore.rst

.. _VirtualMachine: ../vim/VirtualMachine.rst

.. _vSphere API 5.1: ../vim/version.rst#vimversionversion8

.. _vSphere API 4.0: ../vim/version.rst#vimversionversion5

.. _vim.fault.NoHost: ../vim/fault/NoHost.rst

.. _vim.ManagedEntity: ../vim/ManagedEntity.rst

.. _vim.VirtualMachine: ../vim/VirtualMachine.rst

.. _vim.host.ConnectInfo: ../vim/host/ConnectInfo.rst

.. _vim.option.OptionValue: ../vim/option/OptionValue.rst

.. _vim.fault.InvalidLogin: ../vim/fault/InvalidLogin.rst

.. _vmodl.fault.NotSupported: ../vmodl/fault/NotSupported.rst

.. _vim.fault.SSLVerifyFault: ../vim/fault/SSLVerifyFault.rst

.. _DistributedVirtualSwitch: ../vim/DistributedVirtualSwitch.rst

.. _vim.Datacenter.ConfigSpec: ../vim/Datacenter/ConfigSpec.rst

.. _defaultHardwareVersionKey: ../vim/Datacenter/ConfigSpec.rst#defaultHardwareVersionKey

.. _vim.Datacenter.ConfigInfo: ../vim/Datacenter/ConfigInfo.rst

.. _vim.fault.SSLDisabledFault: ../vim/fault/SSLDisabledFault.rst

.. _vim.fault.AlreadyConnected: ../vim/fault/AlreadyConnected.rst

.. _vim.fault.NotSupportedHost: ../vim/fault/NotSupportedHost.rst

.. _vim.fault.HostConnectFault: ../vim/fault/HostConnectFault.rst

.. _DistributedVirtualPortgroup: ../vim/dvs/DistributedVirtualPortgroup.rst

.. _vmodl.fault.InvalidArgument: ../vmodl/fault/InvalidArgument.rst

.. _vim.cluster.PowerOnVmResult: ../vim/cluster/PowerOnVmResult.rst

.. _vim.vm.ConfigOptionDescriptor: ../vim/vm/ConfigOptionDescriptor.rst


vim.Datacenter
==============
  The `Datacenter`_ managed object provides the interface to the common container object for hosts, virtual machines, networks, and datastores. These entities must be under a distinct datacenter in the inventory, and datacenters may not be nested under other datacenters. Every `Datacenter`_ has the following set of dedicated folders. These folders are empty until you create entities for the Datacenter.
   * A folder for `VirtualMachine`_, template, and `VirtualApp`_ objects.
   * A folder for a `ComputeResource`_ hierarchy.
   * A folder for `Network`_ , `DistributedVirtualSwitch`_ , and `DistributedVirtualPortgroup`_ objects.
   * A folder for `Datastore`_ objects.
  For a visual representation of the organization of objects in a vCenter hierarchy, see the description of the `ServiceInstance`_ object.


:extends: vim.ManagedEntity_


Attributes
----------
    vmFolder (`vim.Folder`_):
      privilege: System.View
       A reference to the folder hierarchy that contains `VirtualMachine`_ virtual machine templates (identified by the `template`_ property, and `VirtualApp`_ objects for this datacenter.Note that a VirtualApp that is a child of a `ResourcePool`_ may also be visible in this folder. VirtualApp objects can be nested, but only the parent VirtualApp can be visible in the folder.This folder is guaranteed to exist.
    hostFolder (`vim.Folder`_):
      privilege: System.View
       A reference to the folder hierarchy that contains the compute resources, including hosts and clusters, for this datacenter.This folder is guaranteed to exist.
    datastoreFolder (`vim.Folder`_):
      privilege: System.View
       A reference to the folder hierarchy that contains the datastores for this datacenter.This folder is guaranteed to exist.
    networkFolder (`vim.Folder`_):
      privilege: System.View
       A reference to the folder hierarchy that contains the network entities for this datacenter. The folder can include `Network`_ , `DistributedVirtualSwitch`_ , and `DistributedVirtualPortgroup`_ objects.This folder is guaranteed to exist.
    datastore ([`vim.Datastore`_]):
       A collection of references to the datastore objects available in this datacenter.
    network ([`vim.Network`_]):
       A collection of references to the network objects available in this datacenter.
    configuration (`vim.Datacenter.ConfigInfo`_):
      privilege: System.View
       Configuration of the datacenter.


Methods
-------


QueryConnectionInfo(hostname, port, username, password, sslThumbprint):
   This method provides a way of getting basic information about a host without adding it to a datacenter. Connection wizards typically use this method to show information about a host so a user can confirm a set of changes before applying them.


  Privilege:
               System.View



  Args:
    hostname (`str`_):
       The target of the query.


    port (`int`_):
       The port number of the target host. For ESX 2.x this is the authd port (902 by default). For ESX 3.x and above and for VMware Server hosts this is the https port (443 by default). You can specify -1 to have the vCenter Server try the default ports.


    username (`str`_):
       The name of the user.


    password (`str`_):
       The password of the user.


    sslThumbprint (`str`_, optional, since `VI API 2.5`_ ):
       The expected SSL thumbprint of the host's certificate




  Returns:
    `vim.host.ConnectInfo`_:


  Raises:

    `vim.fault.InvalidLogin`_:
       if unable to authenticate with the host.

    `vim.fault.HostConnectFault`_:
       if an error occurred when querying about a host. Typically, a more specific subclass, such as AlreadyBeingManaged, is thrown.

    `vmodl.fault.NotSupported`_:
       if called directly on a host.

    `vim.fault.NoHost`_:
       if unable to contact the host.

    `vim.fault.NotSupportedHost`_:
       if the software version on the host is not supported.

    `vim.fault.AlreadyConnected`_:
       if the host is already being managed by this server.

    `vim.fault.SSLDisabledFault`_:
       if the host has ssl access disabled

    `vim.fault.SSLVerifyFault`_:
       if the host certificate could not be authenticated


PowerOnMultiVM(vm, option):
   Powers on multiple virtual machines in a data center. If the virtual machines are suspended, this method resumes execution from the suspend point. The virtual machines can belong to different clusters in the data center.If any virtual machine in the list is manually managed by DRS, or DRS has to migrate any manually managed virtual machine or power on any manually managed host in order to power on these virtual machines, a DRS recommendation will be generated, and the users need to manually apply the recommendation for actually powering on these virtual machines. Otherwise, all the virtual machine will be automatically powered on. The virtual machines on stand alone hosts or DRS disabled will be powered-on on the current host. The DRS automatically managed virtual machines will be powered-on on the recommended hosts.When powering on a virtual machine in a cluster, the system might do an implicit relocation of the virtual machine to another host.
  since: `VI API 2.5`_


  Privilege:
               System.View



  Args:
    vm (`vim.VirtualMachine`_):
       The virtual machines to power on.


    option (`vim.option.OptionValue`_, optional, since `vSphere API 4.1`_ ):
       An array of `OptionValue`_ options for this power-on session. The names and values of the options are defined in `ClusterPowerOnVmOption`_ .




  Returns:
     `vim.Task`_:
         An array of Recommendation.

  Raises:

    `vmodl.fault.InvalidArgument`_:
       for unknown option keys or bad values.


queryDatacenterConfigOptionDescriptor():
   The list of possible choices for `defaultHardwareVersionKey`_ . Descriptors returned by the vCenter implementation do not have `host`_ field populated.
  since: `vSphere API 5.1`_


  Privilege:
               System.View



  Args:


  Returns:
    [`vim.vm.ConfigOptionDescriptor`_]:



ReconfigureDatacenter(spec, modify):
   Change the datacenter configuration.
  since: `vSphere API 5.1`_


  Privilege:
               Datacenter.Reconfigure



  Args:
    spec (`vim.Datacenter.ConfigSpec`_):
       A set of configuration changes to apply to the datacenter. The specification can be a complete set of changes or a partial set of changes, applied incrementally.


    modify (`bool`_):
       Flag to specify whether the specification ("spec") should be applied incrementally. If "modify" is false and the operation succeeds, then the configuration of the datacenter matches the specification exactly; in this case any unset portions of the specification will result in unset or default portions of the configuration.




  Returns:
     `vim.Task`_: