Quellcode durchsuchen

Allow to enable_vnc for provisioned VMs.

pull/75/head
Martin Horak vor 6 Jahren
Ursprung
Commit
0d183cb7b5
2 geänderte Dateien mit 15 neuen und 0 gelöschten Zeilen
  1. +3
    -0
      _modules/virtng.py
  2. +12
    -0
      salt/control/virt.sls

+ 3
- 0
_modules/virtng.py Datei anzeigen

else: else:
context['boot_dev'] = ['hd'] context['boot_dev'] = ['hd']


if 'enable_vnc' in kwargs:
context['enable_vnc'] = kwargs['enable_vnc']
log.info('VNC enabled: {0}.'.format(kwargs['enable_vnc']))
if 'serial_type' in kwargs: if 'serial_type' in kwargs:
context['serial_type'] = kwargs['serial_type'] context['serial_type'] = kwargs['serial_type']
if 'serial_type' in context and context['serial_type'] == 'tcp': if 'serial_type' in context and context['serial_type'] == 'tcp':

+ 12
- 0
salt/control/virt.sls Datei anzeigen

{%- set rng = cluster.rng %} {%- set rng = cluster.rng %}
{%- endif %} {%- endif %}


{%- if cluster.enable_vnc is defined and cluster.enable_vnc %}
{%- set enable_vnc = True %}
{%- else %}
{%- set enable_vnc = False %}
{%- endif %}


{%- for node_name, node in cluster.node.iteritems() %} {%- for node_name, node in cluster.node.iteritems() %}


{%- if node.name is defined %} {%- if node.name is defined %}
seed: True seed: True
serial_type: pty serial_type: pty
console: True console: True
{%- if node.enable_vnc is defined %}
enable_vnc: {{ node.enable_vnc }}
{%- else %}
enable_vnc: {{ enable_vnc }}
{%- endif %}
{%- if node.img_dest is defined %} {%- if node.img_dest is defined %}
img_dest: {{ node.img_dest }} img_dest: {{ node.img_dest }}
{%- endif %} {%- endif %}

Laden…
Abbrechen
Speichern