forked from cloudify-cosmo/cloudify-vsphere-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.yaml
More file actions
555 lines (524 loc) · 23.9 KB
/
plugin.yaml
File metadata and controls
555 lines (524 loc) · 23.9 KB
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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
##################################################################################
# Cloudify vSphere built in types and plugins definitions.
##################################################################################
plugins:
vsphere:
executor: central_deployment_agent
package_name: cloudify-vsphere-plugin
package_version: '2.6.0'
source: https://github.com/cloudify-cosmo/cloudify-vsphere-plugin/archive/2.6.0.zip
data_types:
cloudify.datatypes.vsphere.Config:
properties:
username:
description: >
vSphere username.
type: string
required: false
host:
description: >
vCenter hostname or IP address.
type: string
required: false
password:
description: >
vCenter password.
type: string
required: false
datacenter_name:
description: >
datacenter name.
type: string
required: false
auto_placement:
description: >
Must be true if you are using clusters.
This is deprecated.
In future releases the plugin will always determine where to place the VM.
type: string
required: false
resource_pool_name:
description: >
Name of a resource pool.
Defaults to Resources, which is a hidden resource pool on vSphere.
type: string
required: false
port:
description: >
vCenter port for SDK.
type: integer
required: false
allow_insecure:
description: >
Whether to allow insecure connections. Defaults to false, but this is not
yet enforced on Python versions older than 2.7.9.
Python versions pre-2.7.9 can only make insecure connections, which will
fail in the next major version of this plugin unless this is set to false.
type: boolean
required: false
certificate_path:
description: >
The path to the PEM encoded certificate for the vCenter. This will be used
on Python 2.7.9 and above to verify the SSL connection.
On older versions of python the connection will be insecure.
It is not supported to set this while allow_insecure is set to 'true'.
type: string
required: false
cloudify.datatypes.vsphere.ServerProperties:
properties:
memory:
description: >
Amount of RAM, in MB.
type: integer
required: false
cpus:
description: >
Number of CPUs.
type: integer
required: false
template:
description: >
Virtual machine template from which server will be spawned.
See full documentation at docs.getcloudify.org for requirements.
type: string
required: false
name:
description: >
Server name.
Will use node name if this is not set.
Must consist of only ASCII letters, numbers, and hyphens.
Will automatically convert underscores to hyphens.
type: string
required: false
cloudify.datatypes.vsphere.NetworkingProperties:
properties:
domain:
description: >
the domain for this server.
Combined with the hostname this will produce the fully-qualified domain name
(e.g. if ``domain`` is ``example.local`` and the host name is ``test-abc123``
then the fully-qualified domain name will be ``test-abc123.example.local``)
type: string
required: false
dns_servers:
description: >
List of DNS servers.
required: false
connect_networks:
description: |
List of network interfaces to connect.
These should be in the form of dicts with:
name: The name of the network on vsphere, or of the related node if from_relationship is true.
from_relationship: true/false- determines whether to use a relationship from a connected node (default false)
management: true/false- determines if this is a management network interface (default false)
external: true/false- determines if this is a external network interface (default false)
switch_distributed: determines if this is connected to a distributed port group (default false)
use_dhcp: whether to use DHCP for IP addressing (default true)
network: network CIDR to use if use_dhcp is false
gateway: default gateway to use if use_dhcp is false. You should only set this on one interface.
ip: IP address to use if use_dhcp is false
required: false
node_types:
cloudify.vsphere.nodes.Server:
derived_from: cloudify.nodes.Compute
properties:
use_existing_resource:
description: >
Whether to use a vm that already exists on vSphere.
default: False
allowed_hosts:
description: >
Which ESX host(s) this server is allowed to be deployed on.
required: false
allowed_clusters:
description: >
Which ESX cluster(s) this server is allowed to be deployed on.
required: false
allowed_datastores:
description: >
Which ESX datastore(s) this server is allowed to be deployed on.
required: false
server:
type: cloudify.datatypes.vsphere.ServerProperties
networking:
type: cloudify.datatypes.vsphere.NetworkingProperties
custom_attributes:
description: |
Dictionary of custom attribute keys & values.
Keys which don't yet exist on the platform will
be created automatically. ::
custom_attributes:
key: value
lock: locked
keyring: empty
required: false
connection_config:
type: cloudify.datatypes.vsphere.Config
interfaces:
cloudify.interfaces.lifecycle:
start:
implementation: vsphere.vsphere_server_plugin.server.start
inputs: {}
stop:
implementation: vsphere.vsphere_server_plugin.server.stop
inputs: {}
shutdown_guest:
implementation: vsphere.vsphere_server_plugin.server.shutdown_guest
inputs: {}
delete:
implementation: vsphere.vsphere_server_plugin.server.delete
inputs: {}
cloudify.interfaces.host:
get_state:
implementation: vsphere.vsphere_server_plugin.server.get_state
inputs: {}
cloudify.interfaces.modify:
resize:
implementation: vsphere.vsphere_server_plugin.server.resize_server
cloudify.interfaces.power:
'on':
implementation: vsphere.vsphere_server_plugin.power.power_on
'off':
implementation: vsphere.vsphere_server_plugin.power.power_off
reset:
implementation: vsphere.vsphere_server_plugin.power.reset
reboot:
implementation: vsphere.vsphere_server_plugin.power.reboot
inputs:
max_wait_time:
type: integer
default: 300
description: >
How long to wait for the operation to complete.
shut_down:
implementation: vsphere.vsphere_server_plugin.power.shut_down
inputs:
max_wait_time:
type: integer
default: 300
description: >
How long to wait for the operation to complete.
cloudify.vsphere.nodes.WindowsServer:
derived_from: cloudify.vsphere.nodes.Server
properties:
windows_password:
description: >
Administrator password to set when deploying Windows instances.
If this is not supplied, agent_config.password will be used (if that has been supplied).
Supplying neither of these properties will result in an error.
type: string
required: false
windows_timezone:
description: >
Timezone to set Windows instances to.
See https://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx
Defaults to GMT without daylight savings.
type: integer
default: 90
windows_organization:
description: >
The organization name to set on the Windows system.
type: string
default: Organization
custom_sysprep:
description: >
A custom System Preparation Answers file
to use for full customization of Windows.
This can be generated by the Windows System Image Manager.
Note that this file should be verified to work correctly before being applied,
as any errors will appear only on Windows and will not be visible to the plugin.
Also note that any scripts, etc.,
that attempt to work on the VM after the custom sysprep must tolerate multiple retries
because the plugin cannot detect when the custom sysprep has finished,
so provides the server as soon as the IPs are assigned
(which occurs before customization is complete).
type: string
required: false
os_family:
default: windows
description: Overridden default from ``Server`` node_type.
agent_config:
type: cloudify.datatypes.AgentConfig
default:
port: 5985
cloudify.vsphere.nodes.Network:
derived_from: cloudify.nodes.Network
properties:
use_existing_resource:
description: >
Whether to use a network that already exists on vSphere.
default: False
network:
description: |
key-value network configuration. ::
name: network name
vlan_id: vLAN identifier which will be assigned to the network
vswitch_name: name of the vSwitch the network will be connected to.
connection_config:
default: {}
type: cloudify.datatypes.vsphere.Config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: vsphere.vsphere_network_plugin.network.create
inputs: {}
delete:
implementation: vsphere.vsphere_network_plugin.network.delete
inputs: {}
cloudify.vsphere.nodes.Storage:
derived_from: cloudify.nodes.Volume
properties:
storage:
description: |
key-value storage disk configuration. ::
parent_key: Device key from controller, negative mean
that can be used any
storage_size: disk size in GB.
thin_provision: Flag to indicate to the underlying
filesystem, whether the virtual disk backing file should
be allocated lazily (using thin provisioning). This flag
is only used for file systems that support configuring
the provisioning policy on a per file basis, such as VMFS3.
Default: false
mode: The disk persistence mode. Valid modes are:
* persistent
* independent_persistent
* independent_nonpersistent
* nonpersistent
* undoable
* append
connection_config:
default: {}
type: cloudify.datatypes.vsphere.Config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: vsphere.vsphere_storage_plugin.storage.create
inputs: {}
delete:
implementation: vsphere.vsphere_storage_plugin.storage.delete
inputs: {}
cloudify.vsphere.nodes.Datacenter:
derived_from: cloudify.nodes.Root
properties:
name:
description: >
The name of the datacenter.
use_existing_resource:
description: >
Whether to use a datacenter that already exists on vSphere.
Currently, datacenters cannot be created or deleted,
and this node type exists only for compatibility with the NSX plugin.
default: True
connection_config:
default: {}
type: cloudify.datatypes.vsphere.Config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: vsphere.cloudify_vsphere.datacenter.create
inputs: {}
delete:
implementation: vsphere.cloudify_vsphere.datacenter.delete
inputs: {}
cloudify.vsphere.nodes.Datastore:
derived_from: cloudify.nodes.Root
properties:
name:
description: >
The name of the datastore.
use_existing_resource:
description: >
Whether to use a datastore that already exists on vSphere.
Currently, datastores cannot be created or deleted,
and this node type exists only for compatibility with the NSX plugin.
default: True
connection_config:
default: {}
type: cloudify.datatypes.vsphere.Config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: vsphere.cloudify_vsphere.datastore.create
inputs: {}
delete:
implementation: vsphere.cloudify_vsphere.datastore.delete
inputs: {}
cloudify.vsphere.nodes.Cluster:
derived_from: cloudify.nodes.Root
properties:
name:
description: >
The name of the cluster.
use_existing_resource:
description: >
Whether to use a cluster that already exists on vSphere.
Currently, clusters cannot be created or deleted,
and this node type exists only for compatibility with the NSX plugin.
default: True
connection_config:
default: {}
type: cloudify.datatypes.vsphere.Config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: vsphere.cloudify_vsphere.cluster.create
inputs: {}
delete:
implementation: vsphere.cloudify_vsphere.cluster.delete
inputs: {}
cloudify.vsphere.nodes.NIC:
derived_from: cloudify.nodes.Root
properties:
name:
description: >
Network name for connect
switch_distributed:
description: >
determines if this is connected to a distributed port group
default: false
adapter_type:
description: >
Possible: Vmxnet3, Vmxnet2, Sriov, E1000, E1000e
default: Vmxnet3
start_connected:
description: >
Specifies whether or not to connect the device when the virtual
machine starts.
default: true
allow_guest_control:
description: >
Enables guest control over whether the connectable device is
connected.
default: true
network_connected:
description: >
Indicates whether the device is currently connected.
Valid only while the virtual machine is running.
default: true
wake_on_lan_enabled:
description: >
Indicates whether wake-on-LAN is enabled on this virtual network
adapter. Clients can set this property to selectively enable or
disable wake-on-LAN.
default: true
address_type:
description: >
MAC address type. Valid values for address type are:
ManualStatically assigned MAC address.
GeneratedAutomatically generated MAC address.
AssignedMAC address assigned by VirtualCenter.
default: assigned
mac_address:
description: >
MAC address assigned to the virtual network adapter. Clients can
set this property to any of the allowed address types. The server
might override the specified value for "Generated" or "Assigned"
if it does not fall in the right ranges or is determined to be
a duplicate.
default: ""
connection_config:
type: cloudify.datatypes.vsphere.Config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: vsphere.cloudify_vsphere.devices.create_contoller
inputs:
name:
default: { get_attribute: [ SELF, name ] }
switch_distributed:
default: { get_attribute: [ SELF, switch_distributed ] }
adapter_type:
default: { get_attribute: [ SELF, adapter_type ] }
start_connected:
default: { get_attribute: [ SELF, start_connected ] }
allow_guest_control:
default: { get_attribute: [ SELF, allow_guest_control ] }
network_connected:
default: { get_attribute: [ SELF, network_connected ] }
wake_on_lan_enabled:
default: { get_attribute: [ SELF, wake_on_lan_enabled ] }
address_type:
default: { get_attribute: [ SELF, address_type ] }
mac_address:
default: { get_attribute: [ SELF, mac_address ] }
delete:
implementation: vsphere.cloudify_vsphere.devices.delete_contoller
cloudify.vsphere.nodes.SCSIController:
derived_from: cloudify.nodes.Root
properties:
busNumber:
description: >
Bus number associated with this controller.
default: 0
label:
description: >
Label for SCSI contoller
default: SCSIContoller
adapterType:
description: >
Possible: paravirtual, lsilogic_sas, lsilogic
default: paravirtual
hotAddRemove:
description: >
All SCSI controllers support hot adding and removing of devices.
This support can't be toggled in the current implementation.
Therefore, this option is ignored when reconfiguring a SCSI
controller and is always set to "true" when reading an existing
configuration.
default: true
sharedBus:
description: >
Mode for sharing the SCSI bus. The modes are physicalSharing,
virtualSharing, and noSharing.
default: noSharing
scsiCtlrUnitNumber:
description: >
The unit number of the SCSI controller. The SCSI controller
sits on its own bus, so this field defines which slot the
controller is using.
default: -1
connection_config:
type: cloudify.datatypes.vsphere.Config
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: vsphere.cloudify_vsphere.devices.create_contoller
inputs:
busNumber:
default: { get_attribute: [ SELF, busNumber ] }
hotAddRemove:
default: { get_attribute: [ SELF, hotAddRemove ] }
sharedBus:
default: { get_attribute: [ SELF, sharedBus ] }
scsiCtlrUnitNumber:
default: { get_attribute: [ SELF, scsiCtlrUnitNumber ] }
adapterType:
default: { get_attribute: [ SELF, adapterType ] }
label:
default: { get_attribute: [ SELF, label ] }
delete:
implementation: vsphere.cloudify_vsphere.devices.delete_contoller
relationships:
cloudify.vsphere.port_connected_to_network:
derived_from: cloudify.relationships.connected_to
cloudify.vsphere.port_connected_to_server:
derived_from: cloudify.relationships.connected_to
cloudify.vsphere.storage_connected_to_server:
derived_from: cloudify.relationships.connected_to
cloudify.vsphere.nic_connected_to_server:
derived_from: cloudify.relationships.contained_in
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: vsphere.cloudify_vsphere.devices.attach_ethernet_card
unlink:
implementation: vsphere.cloudify_vsphere.devices.detach_contoller
cloudify.vsphere.controller_connected_to_vm:
derived_from: cloudify.relationships.contained_in
source_interfaces:
cloudify.interfaces.relationship_lifecycle:
preconfigure:
implementation: vsphere.cloudify_vsphere.devices.attach_scsi_contoller
unlink:
implementation: vsphere.cloudify_vsphere.devices.detach_contoller