Debian Codegraph @

ansible_collections/community/libvirt/plugins/doc_fragments/virt.py

raw
1 # -*- coding: utf-8 -*-
2
3 from __future__ import absolute_import, division, print_function
4
5 __metaclass__ = type
6
7
8 class ModuleDocFragment(object):
9 OPTIONS_GUEST = r"""
10 options:
11 name:
12 description:
13 - name of the guest VM being managed. Note that VM must be previously
14 defined with xml.
15 - This option is required unless I(command) is C(list_vms) or C(info).
16 type: str
17 aliases:
18 - guest
19 """
20
21 OPTIONS_STATE = r"""
22 options:
23 state:
24 description:
25 - Note that there may be some lag for state requests like C(shutdown)
26 since these refer only to VM states. After starting a guest, it may not
27 be immediately accessible.
28 state and command are mutually exclusive except when command=list_vms. In
29 this case all VMs in specified state will be listed.
30 choices: [ destroyed, paused, running, shutdown ]
31 type: str
32 """
33
34 OPTIONS_COMMAND = r"""
35 options:
36 command:
37 description:
38 - In addition to state management, various non-idempotent commands are available.
39 choices: [ create, define, destroy, freemem, get_xml, get_interfaces, info, list_vms, nodeinfo, pause, shutdown, start, status,
40 stop, undefine, unpause, uuid, virttype ]
41 type: str
42 """
43
44 OPTIONS_AUTOSTART = r"""
45 options:
46 autostart:
47 description:
48 - Start VM at host startup.
49 type: bool
50 """
51
52 OPTIONS_URI = r"""
53 options:
54 uri:
55 description:
56 - Libvirt connection uri.
57 default: qemu:///system
58 type: str
59 """
60
61 OPTIONS_XML = r"""
62 options:
63 xml:
64 description:
65 - XML document used with the define command.
66 - Must be raw XML content using C(lookup). XML cannot be reference to a file.
67 type: str
68 """
69
70 OPTIONS_MUTATE_FLAGS = r"""
71 options:
72 mutate_flags:
73 description:
74 - For each mutate_flag, we will modify the given XML in some way
75 - ADD_UUID will add an existing domain's UUID to the xml if it's missing
76 - ADD_MAC_ADDRESSES will look up interfaces in the existing domain with a
77 matching alias and copy the MAC address over. The matching interface
78 doesn't need to be of the same type or source network.
79 - ADD_MAC_ADDRESSES_FUZZY will try to match incoming interfaces with
80 interfaces of the existing domain sharing the same type and source
81 network/device. It may not always result in the expected outcome,
82 particularly if a domain has multiple interface attached to the same
83 host device and only some of those devices have <mac>s.
84 Use caution, do some testing for your particular use-case!
85 choices: [ ADD_UUID, ADD_MAC_ADDRESSES, ADD_MAC_ADDRESSES_FUZZY ]
86 type: list
87 elements: str
88 default: ['ADD_UUID']
89 """