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
|
# File 'manifests/init.pp', line 1
class nutanix {
#file { '/etc/training.conf':
# content => 'Hello World',
#}
notify { "TESTING API":
#message => "password for user $title on $::certname has been set to: $password",
message => "Creating VM for Nutanix",
}
ntx_create_vm { "test vm":
base_url => "https://10.49.37.151:9440/api/nutanix/v3/vms",
identity => "",
secret => "",
vm_config => {
api_version => "3.0",
metadata_kind => "vm",
metadata_proj => "Test",
vm_name => "VM PUPPET",
cpus => "4",
cores => "1",
memory => "1024",
cluster_kind => "cluster",
cluster_ref => "000550d2-1bca-6006-2416-d8cb8a31916d",
disk_list => {
disk1 => {
device_type => "DISK",
adapter_type => "SCSI",
device_index => "0",
disk_size => "51200",
},
disk2 => {
device_type => "CDROM",
adapter_type => "IDE",
device_index => "0",
disk_size => "4071",
},
disk3 => {
device_type => "CDROM",
adapter_type => "IDE",
device_index => "1",
disk_size => "149",
}
},
nic_list => {
nic1 => {
nic_tpye => "NORMAL_NIC",
kind => "subnet",
uuid => "f9e58703-f036-4cfb-8ad1-f3ab4de4054d",
}
}
}
}
}
|