File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/smartos.cpython-310.pyc
o
�N�g+� � @ s� d Z ddlZddlZddlZddlZddlZddlZe�e �Z
dZdd� Zdd� Z
dd � Zd
d� Zdd
� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd.dd�Zdd� Zdd � Zd!d"� Zd#d$� Zd/d%d&�Zd0d(d)�Zd*d+� Zd,d-� ZdS )1am
Management of SmartOS Standalone Compute Nodes
:maintainer: Jorge Schrauwen <sjorge@blackdot.be>
:maturity: new
:depends: vmadm, imgadm
:platform: smartos
.. versionadded:: 2016.3.0
.. code-block:: yaml
vmtest.example.org:
smartos.vm_present:
- config:
reprovision: true
- vmconfig:
image_uuid: c02a2044-c1bd-11e4-bd8c-dfc1db8b0182
brand: joyent
alias: vmtest
quota: 5
max_physical_memory: 512
tags:
label: 'test vm'
owner: 'sjorge'
nics:
"82:1b:8e:49:e9:12":
nic_tag: trunk
mtu: 1500
ips:
- 172.16.1.123/16
- 192.168.2.123/24
vlan_id: 10
"82:1b:8e:49:e9:13":
nic_tag: trunk
mtu: 1500
ips:
- dhcp
vlan_id: 30
filesystems:
"/bigdata":
source: "/bulk/data"
type: lofs
options:
- ro
- nodevices
kvmtest.example.org:
smartos.vm_present:
- vmconfig:
brand: kvm
alias: kvmtest
cpu_type: host
ram: 512
vnc_port: 9
tags:
label: 'test kvm'
owner: 'sjorge'
disks:
disk0:
size: 2048
model: virtio
compression: lz4
boot: true
nics:
"82:1b:8e:49:e9:15":
nic_tag: trunk
mtu: 1500
ips:
- dhcp
vlan_id: 30
docker.example.org:
smartos.vm_present:
- config:
auto_import: true
reprovision: true
- vmconfig:
image_uuid: emby/embyserver:latest
brand: lx
alias: mydockervm
quota: 5
max_physical_memory: 1024
tags:
label: 'my emby docker'
owner: 'sjorge'
resolvers:
- 172.16.1.1
nics:
"82:1b:8e:49:e9:18":
nic_tag: trunk
mtu: 1500
ips:
- 172.16.1.118/24
vlan_id: 10
filesystems:
"/config:
source: "/vmdata/emby_config"
type: lofs
options:
- nodevices
cleanup_images:
smartos.image_vacuum
.. note::
Keep in mind that when removing properties from vmconfig they will not get
removed from the vm's current configuration, except for nics, disk, tags, ...
they get removed via add_*, set_*, update_*, and remove_*. Properties must
be manually reset to their default value.
The same behavior as when using 'vmadm update'.
.. warning::
For HVM (bhyve and KVM) brands the `image_uuid` field should go on the boot disks,
this disk should NOT have a size specified. (See man vmadm)
� NZsmartosc C s"