File: IpPoolManager.rst

package info (click to toggle)
python-pyvmomi 6.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,980 kB
  • sloc: python: 9,206; xml: 77; makefile: 9
file content (292 lines) | stat: -rw-r--r-- 6,776 bytes parent folder | download | duplicates (5)
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
.. _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

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

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

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

.. _vim.vApp.IpPool: ../vim/vApp/IpPool.rst

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

.. _ExtensionManager: ../vim/ExtensionManager.rst

.. _ReleaseIpAllocation: ../vim/IpPoolManager.rst#releaseIpAllocation

.. _vim.fault.InvalidState: ../vim/fault/InvalidState.rst

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

.. _vim.IpPoolManager.IpAllocation: ../vim/IpPoolManager/IpAllocation.rst


vim.IpPoolManager
=================
  Singleton Managed Object used to manage IP Pools.IP Pools are used to allocate IPv4 and IPv6 addresses to vApps.


:since: `vSphere API 4.0`_


Attributes
----------


Methods
-------


QueryIpPools(dc):
   Return the list of IP pools for a datacenter.


  Privilege:



  Args:
    dc (`vim.Datacenter`_):
       The datacenter for which to look up the IP pools.




  Returns:
    [`vim.vApp.IpPool`_]:
         The resulting list of pools.


CreateIpPool(dc, pool):
   Create a new IP pool.The name field must be defined, all other fields are optional. If unset, they will be given default values.The ID for the pool is generated by the server and should not be defined on the pool object passed to this method.


  Privilege:



  Args:
    dc (`vim.Datacenter`_):
       The datacenter on which to create the pool.


    pool (`vim.vApp.IpPool`_):
       The IP pool to create on the server




  Returns:
    `int`_:
         The generated ID for the pool

  Raises:

    `vmodl.fault.InvalidArgument`_: 
       if the name of the pool already exists on the datacenter.


UpdateIpPool(dc, pool):
   Update an IP pool on a datacenter.The pool to update is looked up from the value of the id field.All fields in the pool except the id are optional. Only defined values are stored on the server.


  Privilege:



  Args:
    dc (`vim.Datacenter`_):
       The datacenter on which to look up the pool.


    pool (`vim.vApp.IpPool`_):
       The IP pool to update on the server




  Returns:
    None
         

  Raises:

    `vmodl.fault.InvalidArgument`_: 
       if the name of the pool already exists on the datacenter.


DestroyIpPool(dc, id, force):
   Destroys an IP pool on the given datacenter.Looks up the pool on the datacenter by ID and deletes it. If the pool is in use, the method throws InvalidState unless the force flag is true.


  Privilege:



  Args:
    dc (`vim.Datacenter`_):
       The datacenter on which to find the pool


    id (`int`_):
       The unique ID of the pool


    force (`bool`_):
       If true, the pool will be destroyed even if it is in use




  Returns:
    None
         

  Raises:

    `vim.fault.InvalidState`_: 
       if the pool is in use and the force flag is false


AllocateIpv4Address(dc, poolId, allocationId):
   Allocates an IPv4 address from an IP pool.Allocated IP addresses are reserved in the IP pool until released by calling `ReleaseIpAllocation`_ , or until the IP pool is configured to have an IP range that does not contain the IP address, or until the IP pool is destroyed.The caller must be a vCenter extension. Refer to `ExtensionManager`_ for details on vCenter extensions.The caller specifies a per extension unique allocation ID. Calling this function twice with the same allocation ID for the same pool yields the same IP address. This makes it possible to do idempotent allocations.
  since: `vSphere API 5.1`_


  Privilege:
               dynamic



  Args:
    dc (`vim.Datacenter`_):
       The datacenter on which to find the pool


    poolId (`int`_):
       The unique ID of the pool


    allocationId (`str`_):
       The unique ID for this allocation




  Returns:
    `str`_:
         An IPv4 address if the pool has an available IPv4 address in its address ranges, otherwise the empty string.

  Raises:

    `vmodl.fault.InvalidArgument`_: 
       if the specified IP pool does not exist on the specified datacenter.


AllocateIpv6Address(dc, poolId, allocationId):
   Allocates an IPv6 address from an IP pool.Allocated IP addresses are reserved in the IP pool until released by calling `ReleaseIpAllocation`_ , or until the IP pool is configured to have an IP range that does not contain the IP address, or until the IP pool is destroyed.The caller must be a vCenter extension. Refer to `ExtensionManager`_ for details on vCenter extensions.The caller specifies a per extension unique allocation ID. Calling this function twice with the same allocation ID for the same pool yields the same IP address. This makes it possible to do idempotent allocations.
  since: `vSphere API 5.1`_


  Privilege:
               dynamic



  Args:
    dc (`vim.Datacenter`_):
       The datacenter on which to find the pool


    poolId (`int`_):
       The unique ID of the pool


    allocationId (`str`_):
       The unique ID for this allocation




  Returns:
    `str`_:
         An IPv6 address if the pool has an available IPv6 address in its address ranges, otherwise the empty string.

  Raises:

    `vmodl.fault.InvalidArgument`_: 
       if the specified IP pool does not exist on the specified datacenter.


ReleaseIpAllocation(dc, poolId, allocationId):
   Releases an IP allocation back to it's IP pool.Attempting to release an IP allocation that is not allocated from the specified IP pool with the specified allocation ID silently fails. This makes it possible to release IP allocations idempotently.All IP addresses allocated by an extension are automatically released if the extension is unregistered from vCenter.
  since: `vSphere API 5.1`_


  Privilege:



  Args:
    dc (`vim.Datacenter`_):
       The datacenter on which to find the pool


    poolId (`int`_):
       The unique ID of the pool


    allocationId (`str`_):
       The unique ID for this allocation




  Returns:
    None
         

  Raises:

    `vmodl.fault.InvalidArgument`_: 
       if the specified IP pool does not exist on the specified datacenter.


QueryIPAllocations(dc, poolId, extensionKey):
   Query IP allocations by IP pool and extension key.
  since: `vSphere API 5.1`_


  Privilege:



  Args:
    dc (`vim.Datacenter`_):
       The datacenter on which to find the pool


    poolId (`int`_):
       The unique ID of the pool


    extensionKey (`str`_):
       The key of the extension




  Returns:
    [`vim.IpPoolManager.IpAllocation`_]:
         The resulting list of

  Raises:

    `vmodl.fault.InvalidArgument`_: 
       if the specified IP pool does not exist on the specified datacenter.