File Coverage

OpenQA/Qemu/MutParams.pm
Criterion Covered Total %
statement 13 29 44.8
total 13 29 44.8


line stmt code
1   # Copyright 2018 SUSE LLC
2   # SPDX-License-Identifier: GPL-2.0-or-later
3    
4   =head2 OpenQA::Qemu::MutParams
5    
6   This is the base class for an object model of some mutable QEMU state. The
7   Proc class keeps a list of MutParams and generates the QEMU command line from
8   that list.
9    
10   Mutable parameters are parameters which can change during the test. Initially
11   this is limited to block devices which change due to snapshots although
12   MutParams are also used to represent static devices which benefit from the
13   added structure.
14    
15   =cut
16    
17   use Mojo::Base -base, -signatures;
18 16  
  16  
  16  
19   use Scalar::Util 'blessed';
20 16  
  16  
  16  
21    
22 158 =head3 gen_cmdline
  158  
  158  
  158  
  158  
  158  
  158  
23    
24   Create the necessary QEMU command line parameters for whatever this object
25   model represents.
26    
27   =cut
28    
29   =head3 to_map
30 0  
  0  
  0  
  0  
31   Convert to a plain hash map with limited nesting, which can easily be serialized.
32    
33   =cut
34    
35   =head3 from_map
36    
37 0 The inverse of to_map.
  0  
  0  
  0  
38    
39   =cut
40    
41   =head3 has_state
42    
43   Return true if this object has been populated. Put another way, it returns
44 0 false if the object's properties are all defaults.
  0  
  0  
  0  
45    
46   This is used to decide if the object can have state loaded into it without
47   clobbering some existing information.
48    
49   =cut
50    
51   1;