summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* build: Add checks for permutable format stringsJiri Denemark2023-04-011-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since all messages marked for translation contain permutable format strings, we can add checks for enforcing them. The syntax check does not catch all cases as it only checks format strings between _(" and the first ". In other words messages where \" appears before the first format string or multi-line messages where the first format strings is not in the first line will not be checked. On the other hand, it's run automatically by "meson test". check-pot.py python script will detect all incorrect format strings, but it's not as easy to use as it requires libvirt.pot to be regenerated and this does not happen during a standard build. The following steps are needed to check messages with check-pot.py: meson compile libvirt-pot-dep meson compile libvirt-pot meson compile libvirt-pot-check Don't forget to revert changes to libvirt.pot if you run these commands locally as we don't want each patch series to update libvirt.pot. Shell scripts (tools/libvirt-guests.sh.in is the only one currently) need to be exempt from this check as shell's printf function does not understand the permutable format strings. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts/apibuild: Extract and format API ACLsPeter Krempa2023-03-061-2/+132
| | | | | | | | | | | | | As an additional step before processing the API parse the protocol file and extract all ACL definitions. This way we can distribute them for any user of the libvirt API XML files. We will be also able to avoid another call to gendispatch, which generates all this data into a standalone XML. The remote procedure to API name is inspired by what rpcgen does. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* apibuild: Add infrastructure for generating ACL flag info into function docsPeter Krempa2023-03-061-1/+28
| | | | | | | | | If the user of the 'docBuilder' class provides a dict (key is API name, value is a tuple of arrays (acls, aclfilters), use the dict to generate ACL definitions into the function definition. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* docs: ACL: Mention the ACL object name along with the corresponding libvirt ↵Peter Krempa2023-02-201-1/+1
| | | | | | | | | | object name It's not trivial to figure out the ACL object name from our documentation. Add it above the table outlining existing permissions. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* docs: Fix generated names for ACL objectsPeter Krempa2023-02-201-3/+3
| | | | | | | | | | | | | | Both the object name and permission name in ACL use '-' instead of '_' separator when referring to them in the docs or even when used inside of polkit. Unfortunately the generators used for generating our docs don't honour this in certain cases which would result in broken names in the API docs (once they will be generated). Rename both object and permission name to use dash and reflect that in the anchor names in the documentation. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* docs: ACL: Show which permissions are allowed for unauthenticated connectionsPeter Krempa2023-02-201-0/+7
| | | | | | | | Certain APIs are allowed also without authentication but the ACL page didn't outline which. Generate a new column with the information. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts: check-html-refernces: Add checking for image file usagePeter Krempa2023-02-151-14/+87
| | | | | | | | | | | | | Check both that a file is referenced from our pages and also that pages reference existing images. The mode for dumping external references now also dumps images. '--ignore-image' can be used repeatedly to suppress errors for specific images. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts: check-html-references: Detect pages that are not linked toPeter Krempa2023-02-151-0/+57
| | | | | | | Prevent sub-pages without a way to reach them. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts: check-html-references: Improve error messages and don't mess with ↵Peter Krempa2023-02-151-27/+19
| | | | | | | | | | | | | | | | | | | | | | relative paths Now that we have the source file name as a custom attribute we can use it to report which file actually needs to be edited to fix the error: ERROR: 'docs/uri.rst': broken link to: 'drvqemu.html#exaple' rather than: broken link targets: docs/uri.html broken link: drvqemu.html#exaple which pointed to file which does not exist in the source directory. This also allows us to delete all the relative path handling needed to report at least somewhat user-legible errors before. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts: check-html-references: Rename --prefix to --webroot and make it ↵Peter Krempa2023-02-151-3/+3
| | | | | | | | | | | mandatory Force users to pass the path to the root of the webpage the script should check. The script lives in a different subdirectory so the default of the current directory doesn't make much sense. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* apibuild: Don't include the Copyright in the <description> of a modulePeter Krempa2022-11-031-0/+8
| | | | | | | | | | | | | | When building the top level description from a header file the 'parseTopComment' method of the 'CParser' would include all trailing lines into the <description> field. This was designed to concatenate multi-line descriptions, but unfortunately in all cases also included the Copyright statement which followed. Explicitly end the scanning of the header on a line which starts with 'Copyright (C)' and truncate the spaces from the end of the last item. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* scripts: Add $DESTDIR support to meson-install-web.pyAndrea Bolognani2022-08-111-2/+6
| | | | | | | | | meson already supports $DESTDIR natively, but in this case we're using a custom script and so we have to do some extra work ourselves. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
* lib: Use G_NO_INLINE instead of G_GNUC_NO_INLINEMichal Privoznik2022-07-182-3/+3
| | | | | | | | | | | The G_GNUC_NO_INLINE macro will eventually be marked as deprecated [1] and we are recommended to use G_NO_INLINE instead. Do the switch now, rather than waiting for compile time warning to occur. 1: https://gitlab.gnome.org/GNOME/glib/-/commit/15cd0f04612c90292792c4d123ebe84bf4bf93a6 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
* scripts: apibuild: Improve error when API is missing from symbol filePeter Krempa2022-07-071-0/+2
| | | | | | | | | | | | | Improve: KeyError: 'virAdmConnectSetDaemonTimeout' to Exception: Missing symbol file entry for 'virAdmConnectSetDaemonTimeout' Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
* docs: Add HTML reference checkerPeter Krempa2022-06-012-0/+154
| | | | | | | | | | | | | | | In many cases we move around or rename internal anchors which may break links leading to the content. docutils handle the case of links inside a document, but we are lacking the same form of checking between documents. Introduce a script which cross-checks all the anchors and links in HTML output files and prints problems and use it as a test case for the 'docs' directory. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* scripts: hvsupport: Remove link into the 'html' directoryPeter Krempa2022-06-011-1/+1
| | | | | | | Linking to a list of files is not helpful. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* apibuild: Fix self.waring method callluzhipeng2022-05-091-1/+1
| | | | | | | | The parameters of self.warning is inconsistent with its definition, So fix it. Signed-off-by: luzhipeng <luzhipeng@cestc.cn> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
* apibuild: remove 'v' from pattern matchingVictor Toso2022-05-041-2/+2
| | | | | | | This makes it mandatory to *not* add 'v' to version numbers. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
* scripts: apibuild: add parsing variable's commentsVictor Toso2022-04-261-7/+24
| | | | | | | | | | | | scripts/apibuild.py did not consider exporting external variable's comments into the XML API. This commits fixes that. Noe that the way that CParser is designed, it is currently possible to lose a parsed comment when parsing other fields as self.comment in several places. I've added a comment to highlight this. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
* scripts: apibuild: factor out comment cleaningVictor Toso2022-04-261-6/+9
| | | | | | | So we can use for comments that are being hold in helper variables. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
* scripts: apibuild: parse 'Since' for functionsVictor Toso2022-04-261-12/+57
| | | | | | | | | | | | | | | | This patch adds 'version' parameter to generated XML API for functions and functypes. The 'version' metadata has been added with e0e0bf6628 by parsing .syms files. This commit does not override that but it will warn if there is not 'Since' metadata with new additions. There is not clear benefit for keeping both. For now, I've added a warning in case there is a mismatch between the version provided by .syms and docstring. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
* scripts: apibuild: parse 'Since' for macrosVictor Toso2022-04-261-3/+7
| | | | | | | | | | | | | | | This patch adds 'version' parameter to the generated XML API for macros It'll require, for new additions, to add a comment with the version that the macro was added. An example bellow of code diff and the change in the generated XML. Note that the Since tag is removed from the comment as there is a proper field for it in the XML. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
* scripts: apibuild: parse 'Since' for typedefsVictor Toso2022-04-261-7/+8
| | | | | | | | | | | | | | | This patch adds 'version' parameter to the generated XML API for typedefs It'll require, for new additions, to add a comment with the version that the typedef value was added. An example bellow of code diff and the change in the generated XML. Note that the Since tag is removed from the comment as there is a proper field for it in the XML. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
* scripts: apibuild: fix parsing block comments from typedef enumVictor Toso2022-04-261-1/+7
| | | | | | | | Removed the TODO as we can rely to the serialize_typedef() the job to report missing comments. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
* scripts: apibuild: parse 'Since' version for enumsVictor Toso2022-04-261-1/+28
| | | | | | | | | | | | | | This patch adds 'version' parameter to the generated XML API for enums. It'll require, for new additions, to add a comment with the version that the enum value was added. Note that the Since tag is removed from the comment as there is a proper field for it in the XML. Signed-off-by: Victor Toso <victortoso@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
* syntax-check: Rework mock-noinline to get all files at onceMartin Kletzander2022-03-071-1/+1
| | | | | | | | | | The script can break if the number of files does not fit one invocation and xargs has to split it. Instead pipe the list of files directly into the script and in the script read them from stdin instead of the arguments. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* scripts/mock-noinline: Use full name of the required annotation in error messagePeter Krempa2022-02-141-1/+1
| | | | | Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* scripts: Properly declare g_auto() stub for cocciMichal Privoznik2021-11-031-1/+1
| | | | | | | | | | | | | | | | | | While being great semantic patching tool, coccinelle fails to understand some of macros we use (including those provided by glib). What they have in common is use of __attribute__ under the hood. We store a list of such macros in a file. But in there, g_auto() macro is not defined properly. Indeed, g_auto(type) declares a local variable of given type, for instance from cocci's POV: g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; virBuffer buf = VIR_BUFFER_INITIALIZER; are both the same declaration. Fix declaration of g_auto() stub. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
* scripts: include function versions in API definitionDaniel P. Berrangé2021-09-231-6/+62
| | | | | | | | | | | | | | | | | | | | | | | | | In order to auto-generate more of the language binding code, it is desirable to know what libvirt version an API was introduced in. We can extract this information from the .syms files and expose it in the API description eg instead of <function name='virNodeNumOfDevices' file='libvirt-nodedev' module='libvirt-nodedev'> we now have <function name='virNodeNumOfDevices' file='libvirt-nodedev' module='libvirt-nodedev' version='0.5.0'> This will benefit this proposal: https://gitlab.com/libvirt/libvirt-go-module/-/merge_requests/7 Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Tested-by: Victor Toso <victortoso@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts: apibuild: fix spacingJán Tomko2021-09-211-2/+2
| | | | | | | Syntax check reports: E226 missing whitespace around arithmetic operator Signed-off-by: Ján Tomko <jtomko@redhat.com>
* scripts: fix API parsing of *** pointersDaniel P. Berrangé2021-09-211-7/+6
| | | | | | | | | | | | | | | | The currrent generated API contains *** pointer types with bogus whitespace in the middle: <arg name='keys' type='char ** *' info='pointer to a variable to store authorized keys'/> because the tokenizer only tries to merge 2 distinct '*' together. This refactors the code to merge an arbitrary number, resulting in <arg name='keys' type='char ***' info='pointer to a variable to store authorized keys'/> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts: group-qemu-caps: Add capability name as comment to capability stringPeter Krempa2021-08-181-3/+40
| | | | | | | | | | | | | | Add a cross reference of the enum value name with the string representation. This allows a quick cross-reference of the values without having to open the header and implementation files separately. To achieve this the checker code at first obtains a list of the flags and cross-references them when checking the grouping in syntax-check, thus we are guaranteed to stay in sync. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
* lib: Drop internal virXXXPtr typedefsMichal Privoznik2021-04-132-6/+6
| | | | | | | | | | | | | | | | | | | | | | Historically, we declared pointer type to our types: typedef struct _virXXX virXXX; typedef virXXX *virXXXPtr; But usefulness of such declaration is questionable, at best. Unfortunately, we can't drop every such declaration - we have to carry some over, because they are part of public API (e.g. virDomainPtr). But for internal types - we can do drop them and use what every other C project uses 'virXXX *'. This change was generated by a very ugly shell script that generated sed script which was then called over each file in the repository. For the shell script refer to the cover letter: https://listman.redhat.com/archives/libvir-list/2021-March/msg00537.html Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
* Remove test 'args' file rewrapping infrastructurePeter Krempa2021-04-122-169/+0
| | | | | | | | | | | | | | | All tests which use files with 'ldargs' and 'args' suffix as output now use the internal and better line splitting. Remove the test-wrap-argv.py script, the syntax check which used it and the helper rewrapping the output when regenerating test output. For any further use, we require code to use virCommand anyways and thus it has internal wrapping now. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
* scripts/check-aclrules.py: check ACL for domain_driver.c ACL callersDaniel Henrique Barboza2021-02-171-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script works under two specific conditions. For each opened file, search for all functions that has ACL calls and store them, and see if there is a vir*DriverPtr struct declared in it. For each implementation found, check if there is an ACL verification inside it, and error out if none was found. The script also supports the concept of stub, where another function takes the responsibility for the ACL call instead of the original API. Unfortunately this is not enough to cover the new scenario we have now, with domain_driver.c containing helper functions that execute the ACL calls. The script does not store state between files because, until now, it wasn't needed to - APIs and stubs and vir*DriverPtr declarations were always in the same file. Also, the script will not check for ACL in functions that does not belong to a vir*DriverPtr interface. What we have now in domain_driver.c breaks both assumptions: the functions are in a different file, and there is no vir*DriverPtr being implemented in the file that uses these functions. This patch changes check-aclrules.py to accomodate this scenario. The helpers that have ACL checks are stored beforehand in aclFuncHelpers, allowing other files to use them to recognize a stub situation. In case the current file being analyzed is domain_driver.c itself, we'll do a manual check using aclFuncHelpers to verify that these functions indeed have ACL checks. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
* hyperv: enable use of g_autoptr for the rest of the CIM/WMI classesMatt Coleman2021-01-221-0/+4
| | | | | Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Laine Stump <laine@redhat.com>
* hyperv: add inheritance to the WMI generatorMatt Coleman2021-01-221-3/+9
| | | | | | | This enables casting subtypes to their parent. Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Laine Stump <laine@redhat.com>
* scripts: Actually print filename of offending filePeter Krempa2021-01-152-4/+4
| | | | | | | | | | | The error message printed by scripts/group-qemu-caps.py and scripts/test-wrap-argv.py doesn't actually print the filename of the offending file: Incorrect line wrapping in $file Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
* scripts: ignore whitespace in pdwtags outputDaniel P. Berrangé2020-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The pdwtags program changed its whitespace formatting for enum values in release 1.19: @@ -145,22 +145,22 @@ u_int flags; }; enum admin_procedure { - ADMIN_PROC_CONNECT_OPEN = 1, - ADMIN_PROC_CONNECT_CLOSE = 2, - ADMIN_PROC_CONNECT_GET_LIB_VERSION = 3, - ADMIN_PROC_CONNECT_LIST_SERVERS = 4, - ADMIN_PROC_CONNECT_LOOKUP_SERVER = 5, + ADMIN_PROC_CONNECT_OPEN = 1, + ADMIN_PROC_CONNECT_CLOSE = 2, + ADMIN_PROC_CONNECT_GET_LIB_VERSION = 3, + ADMIN_PROC_CONNECT_LIST_SERVERS = 4, + ADMIN_PROC_CONNECT_LOOKUP_SERVER = 5, Workaround this by telling diff to ignore whitespace changes. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* docs: xsl: Unify stylability of main container elementPeter Krempa2020-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | page.xsl was adding '<div id="content">' wrapper for the content picked up from the <body> element from the original input file. Optionally class="$DOCNAME" was added for some documents taken from <body>. Since docs generated from RST by docutils have a '<div class='document' id='$DOCNAME>' we actually don't need an extra wrapper for them. Additionally if we standardize on one of them we can use the same styles for both. I've picked the latter because it makes more sense to use the document name as 'id'. This patch: 1) Modifies the XSL trasformation to add the wrapper only if it's not present. 2) Modifies the XSL transformation to use 'id' for document name and class='document' for the wrapper element. 3) Changes docs.html/index.html/hvsupport.html to use 'id' instead of 'class' for document name. 4) Modifies the main stylesheet to keep styling the elements properly Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
* scripts: trim "__attribute__((packed))" in RPC struct diffDaniel P. Berrangé2020-11-111-0/+6
| | | | | | | | | | | i686 builds on x86_64 host on Debian 10 result in the RPC structs getting "__attribute__((packed))" annotations added to them. This is harmless since we know the XDR protocol aligns and pads struct fields suitably on the wire. Thus we can safely cull the attribute before doing the diff comparison. Reviewed-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* hyperv: do not generate *_CLASSNAME constantsMatt Coleman2020-11-091-4/+1
| | | | | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Matt Coleman <matt@datto.com>
* hyperv: remove hypervWmiClassInfoList, hypervWmiClassInfoListPtr, and ↵Matt Coleman2020-11-091-14/+7
| | | | | | | _hypervWmiClassInfoList Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Matt Coleman <matt@datto.com>
* hyperv: remove support for multiple API versions from the WMI generatorMatt Coleman2020-11-091-215/+52
| | | | | | | All Msvm_* classes are assumed to be V2, now. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Matt Coleman <matt@datto.com>
* scripts: meson-html-gen: RemovePeter Krempa2020-10-192-31/+0
| | | | | | | | The script was obscuring what's happening and not reporting errors properly. Remove it since it's no longer used now. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
* scripts/meson-html-gen.py: Don't rereformat output filesPeter Krempa2020-10-191-8/+1
| | | | | | | | | | | | The output HTML files (especially those generated from rST files) don't look good even after reformatting. Skip the extra step and accept that no matter what we do HTMLs will not look great. This additionally makes it way simpler to remove meson-html-gen.py in the future (thus I've neglected to remove passing of xmllint). Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
* esx: separate header and source file generationJán Tomko2020-09-231-70/+91
| | | | | | | | Invoke the generator twice and introduce separate meson targets for headers and C sources. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
* scripts: fix logic error in argv wrapping codeDaniel P. Berrangé2020-09-181-1/+1
| | | | | | | | The first piece of the command we process must be added to the list straight away regardless of whether it starts with a '-' or not. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* remove HAL node device driverPavel Hrdina2020-09-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was one attempt a year ago done by me to drop HAL [1] but it was never resolved. There was another time when Dan suggested to drop HAL driver [2] but it was decided to keep it around in case device assignment will be implemented for FreeBSD and the fact that virt-manager uses node device driver [3]. I checked git history and code and it doesn't look like bhyve supports device assignment so from that POV it should not block removing HAL. The argument about virt-manager is not strong as well because libvirt installed from FreeBSD packages doesn't have HAL support so it will not affect these users as well [4]. The only users affected by this change would be the ones compiling libvirt from GIT on FreeBSD. I looked into alternatives and there is libudev-devd package on FreeBSD but unfortunately it doesn't work as it doesn't list any devices when used with libvirt. It provides libudev APIs using devd. I also looked into devd directly and it provides some APIs but there are no APIs for device monitoring and events so that would have to be somehow done by libvirt. Main motivation for dropping HAL support is to replace libdbus with GLib dbus implementation and it cannot be done with HAL driver present in libvirt because HAL APIs heavily depends on symbols provided by libdbus. [1] <https://www.redhat.com/archives/libvir-list/2019-May/msg00203.html> [2] <https://www.redhat.com/archives/libvir-list/2016-April/msg00992.html> [3] <https://www.redhat.com/archives/libvir-list/2016-April/msg00994.html> [4] <https://svnweb.freebsd.org/ports/head/devel/libvirt/Makefile?view=markup> Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
* esx: generator: add GuestNicInfo objectPino Toscano2020-09-151-0/+1
| | | | | | | | Add the definition of the GuestNicInfo object, with all the required objects for it. Signed-off-by: Pino Toscano <ptoscano@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>