tag v0.155.0 Tagger: imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> Changes with 0.155.0 ---------------- * Fedora 43: add shadow-utils when LockRoot is enabled, update cloud-init service name (osbuild/images#1618) * Author: Achilleas Koutsou, Reviewers: Gianluca Zuccarelli, Michael Vogt * Update osbuild dependency commit ID to latest (osbuild/images#1609) * Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger, Tomáš Hozza * Update snapshots to 20250626 (osbuild/images#1623) * Author: SchutzBot, Reviewers: Achilleas Koutsou, Simon de Vlieger * distro/rhel9: xz compress azure-cvm image type [HMS-8587] (osbuild/images#1620) * Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza * distro/rhel: introduce new image type: Azure SAP Apps [HMS-8738] (osbuild/images#1612) * Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza * distro/rhel: move ansible-core to sap_extras_pkgset (osbuild/images#1624) * Author: Achilleas Koutsou, Reviewers: Brian C. Lane, Tomáš Hozza * github/create-tag: allow passing the version when run manually (osbuild/images#1621) * Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal, Tomáš Hozza * rhel9: move image-config into pure YAML (HMS-8593) (osbuild/images#1616) * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Simon de Vlieger * test: split manifest checksums into separate files (osbuild/images#1625) * Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza — Somewhere on the Internet, 2025-06-30 --- tag v0.156.0 Tagger: imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> Changes with 0.156.0 ---------------- * Many: delete repositories for EOL distributions (HMS-7044) (osbuild/images#1607) * Author: Tomáš Hozza, Reviewers: Michael Vogt, Simon de Vlieger * RHSM/facts: add 'image-builder CLI' API type (osbuild/images#1640) * Author: Tomáš Hozza, Reviewers: Brian C. Lane, Simon de Vlieger * Update dependencies 2025-06-29 (osbuild/images#1628) * Author: SchutzBot, Reviewers: Simon de Vlieger, Tomáš Hozza * Update osbuild dependency commit ID to latest (osbuild/images#1627) * Author: SchutzBot, Reviewers: Simon de Vlieger, Tomáš Hozza * [RFC] image: drop `InstallWeakDeps` from image.DiskImage (osbuild/images#1642) * Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger, Tomáš Hozza * build(deps): bump the go-deps group across 1 directory with 3 updates (osbuild/images#1632) * Author: dependabot[bot], Reviewers: SchutzBot, Tomáš Hozza * distro/rhel10: xz compress azure-cvm image type (osbuild/images#1638) * Author: Achilleas Koutsou, Reviewers: Brian C. Lane, Simon de Vlieger * distro: cleanup/refactor distro/{defs,generic} (HMS-8744) (osbuild/images#1570) * Author: Michael Vogt, Reviewers: Simon de Vlieger, Tomáš Hozza * distro: remove some hardcoded values from generic/images.go (osbuild/images#1636) * Author: Michael Vogt, Reviewers: Simon de Vlieger, Tomáš Hozza * distro: small tweaks for the YAML based imagetypes (osbuild/images#1622) * Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger * fedora/wsl: packages and locale (osbuild/images#1635) * Author: Simon de Vlieger, Reviewers: Michael Vogt, Tomáš Hozza * image/many: make compression more generic (osbuild/images#1634) * Author: Simon de Vlieger, Reviewers: Brian C. Lane, Michael Vogt * manifest: handle content template name with spaces (osbuild/images#1641) * Author: Bryttanie, Reviewers: Brian C. Lane, Michael Vogt, Tomáš Hozza * many: implement gzip (osbuild/images#1633) * Author: Simon de Vlieger, Reviewers: Michael Vogt, Tomáš Hozza * rhel/azure: set GRUB_TERMINAL based on architecture [RHEL-91383] (osbuild/images#1626) * Author: Achilleas Koutsou, Reviewers: Simon de Vlieger, Tomáš Hozza — Somewhere on the Internet, 2025-07-07 --- |
||
|---|---|---|
| .. | ||
| finder.go | ||
| path.go | ||
| README.md | ||
The content library finder
The govmomi package now includes a finder for the content library, github.com/vmware/govmomi/vapi/library.Finder. This finder supports searching for objects in the content library using an inventory path design similar to the standard govmomi finder and includes support for wildcard matching courtesy of golang's path.Match. For example:
| Pattern | Result |
|---|---|
* |
Gets all of the content libraries |
*/ |
Gets all of the content library items for all of the content libraries. |
/Public/ |
Gets all of the content library items for the content library named Public |
/*/*/ |
Gets all of the content library files for all of the content library items for all of the content libraries. |
Public/*/photon2* |
Gets all of the files that begin with photon2 in all of the content library items for the content library named Public |
The use of a wildcard character in the search string results in a full listing of content library objects for that part of the path's server-side analogue. If Public/Photon2* is searched, then all of the content library items for the Public library are listed in order to perform the wildcard matching. However, if Public/PhotonOS-2-GA then the server-side API call library:item:find is used to find an item with the name PhotonOS-2-GA.
Performance
Search strings that do not use wildcard characters should be more efficient as these searches rely on server-side find calls and do not require dumping all of the objects. However, this is only true for systems with a large number of objects in the content libraries. This is due to the number of round-trips required to lookup an object with a direct path. For example:
| Search path | Roundtrips |
|---|---|
Public/Photon2 |
4 |
Public*/Photon2* |
2 |
The absolute search path takes twice as many roundtrips compared to the search path with wildcards:
Absolute path search logic
- Find library ID for library with name using server-side find API
- Get library with library ID
- Find item ID for item with name using server-side find API
- Get item with item ID
Wildcard search logic
- Get all of the libraries and filter the pattern on the client-side
- Get all of the items for the library and filter the pattern on the client-=side
Searches at scale
While a system that has few content library objects benefits from wildcard search logic, the fact is that the above approach regarding absolute paths proves out to be much more efficient for systems with large numbers of content library objects.
govc library.ls
Listing all the objects in the content library
$ govc library.ls '*/*/'
/ISOs/CentOS-7-x86_64-Minimal-1804/CentOS-7-x86_64-Minimal-1804.iso
/ISOs/CoreOS Production/coreos_production_iso_image.iso
/ISOs/VMware-VCSA-all-6.7.0-8217866.iso/VMware-VCSA-all-6.7.0-8217866.iso
/ISOs/VMware-VIM-all-6.7.0-8217866.iso/VMware-VIM-all-6.7.0-8217866.iso
/ISOs/ubuntu-16.04.5-server-amd64/ubuntu-16.04.5-server-amd64.iso
/ISOs/photon-2.0-304b817/photon-2.0-304b817.iso
/OVAs/VMware-vCenter-Server-Appliance-6.7.0.10000-8217866_OVF10.ova/VMware-vCenter-Server-Appliance-6.7.0.10000-8217866_OVF10.ova
/OVAs/coreos_production_vmware_ova/coreos_production_vmware_ova.ovf
/OVAs/coreos_production_vmware_ova/coreos_production_vmware_ova-1.vmdk
/OVAs/centos_cloud_template/centos_cloud_template-2.iso
/OVAs/centos_cloud_template/centos_cloud_template.ovf
/OVAs/centos_cloud_template/centos_cloud_template-1.vmdk
/OVAs/centos_cloud_template/centos_cloud_template-3.nvram
/OVAs/photon-custom-hw13-2.0-304b817/photon-ova-disk1.vmdk
/OVAs/photon-custom-hw13-2.0-304b817/photon-ova.ovf
/OVAs/yakity-centos/yakity-centos-2.nvram
/OVAs/yakity-centos/yakity-centos-1.vmdk
/OVAs/yakity-centos/yakity-centos.ovf
/OVAs/yakity-photon/yakity-photon-1.vmdk
/OVAs/yakity-photon/yakity-photon.ovf
/OVAs/yakity-photon/yakity-photon-2.nvram
/OVAs/ubuntu-16.04-server-cloudimg-amd64/ubuntu-16.04-server-cloudimg-amd64.ovf
/OVAs/ubuntu-16.04-server-cloudimg-amd64/ubuntu-16.04-server-cloudimg-amd64-1.vmdk
/sk8-TestUploadOVA/photon2-cloud-init/photon2-cloud-init.ovf
/sk8-TestUploadOVA/photon2-cloud-init/photon2-cloud-init-1.vmdk
/Public/photon2-cloud-init/photon2-cloud-init.ovf
/Public/photon2-cloud-init/photon2-cloud-init-1.vmdk
govc library.info
Getting the info for all the objects in the content library
$ govc library.info '*/*/'
Name: CentOS-7-x86_64-Minimal-1804.iso
Path: /ISOs/CentOS-7-x86_64-Minimal-1804/CentOS-7-x86_64-Minimal-1804.iso
Size: 824637106200
Version: 1
Name: coreos_production_iso_image.iso
Path: /ISOs/CoreOS Production/coreos_production_iso_image.iso
Size: 824637441624
Version: 1
Name: VMware-VCSA-all-6.7.0-8217866.iso
Path: /ISOs/VMware-VCSA-all-6.7.0-8217866.iso/VMware-VCSA-all-6.7.0-8217866.iso
Size: 824637106368
Version: 1
Name: VMware-VIM-all-6.7.0-8217866.iso
Path: /ISOs/VMware-VIM-all-6.7.0-8217866.iso/VMware-VIM-all-6.7.0-8217866.iso
Size: 824637106504
Version: 1
Name: ubuntu-16.04.5-server-amd64.iso
Path: /ISOs/ubuntu-16.04.5-server-amd64/ubuntu-16.04.5-server-amd64.iso
Size: 824637441944
Version: 1
Name: photon-2.0-304b817.iso
Path: /ISOs/photon-2.0-304b817/photon-2.0-304b817.iso
Size: 824637106672
Version: 1
Name: VMware-vCenter-Server-Appliance-6.7.0.10000-8217866_OVF10.ova
Path: /OVAs/VMware-vCenter-Server-Appliance-6.7.0.10000-8217866_OVF10.ova/VMware-vCenter-Server-Appliance-6.7.0.10000-8217866_OVF10.ova
Size: 824637106880
Version: 1
Name: coreos_production_vmware_ova.ovf
Path: /OVAs/coreos_production_vmware_ova/coreos_production_vmware_ova.ovf
Size: 824637107032
Version: 1
Name: coreos_production_vmware_ova-1.vmdk
Path: /OVAs/coreos_production_vmware_ova/coreos_production_vmware_ova-1.vmdk
Size: 824637107072
Version: 1
Name: centos_cloud_template-2.iso
Path: /OVAs/centos_cloud_template/centos_cloud_template-2.iso
Size: 824636997760
Version: 1
Name: centos_cloud_template.ovf
Path: /OVAs/centos_cloud_template/centos_cloud_template.ovf
Size: 824636997792
Version: 1
Name: centos_cloud_template-1.vmdk
Path: /OVAs/centos_cloud_template/centos_cloud_template-1.vmdk
Size: 824636997832
Version: 1
Name: centos_cloud_template-3.nvram
Path: /OVAs/centos_cloud_template/centos_cloud_template-3.nvram
Size: 824636997856
Version: 1
Name: photon-ova-disk1.vmdk
Path: /OVAs/photon-custom-hw13-2.0-304b817/photon-ova-disk1.vmdk
Size: 824637107280
Version: 1
Name: photon-ova.ovf
Path: /OVAs/photon-custom-hw13-2.0-304b817/photon-ova.ovf
Size: 824637107328
Version: 1
Name: yakity-centos-2.nvram
Path: /OVAs/yakity-centos/yakity-centos-2.nvram
Size: 824637253000
Version: 2
Name: yakity-centos-1.vmdk
Path: /OVAs/yakity-centos/yakity-centos-1.vmdk
Size: 824637253024
Version: 2
Name: yakity-centos.ovf
Path: /OVAs/yakity-centos/yakity-centos.ovf
Size: 824637253056
Version: 2
Name: yakity-photon-1.vmdk
Path: /OVAs/yakity-photon/yakity-photon-1.vmdk
Size: 824637107504
Version: 5
Name: yakity-photon.ovf
Path: /OVAs/yakity-photon/yakity-photon.ovf
Size: 824637107536
Version: 5
Name: yakity-photon-2.nvram
Path: /OVAs/yakity-photon/yakity-photon-2.nvram
Size: 824637107560
Version: 5
Name: ubuntu-16.04-server-cloudimg-amd64.ovf
Path: /OVAs/ubuntu-16.04-server-cloudimg-amd64/ubuntu-16.04-server-cloudimg-amd64.ovf
Size: 824637442112
Version: 1
Name: ubuntu-16.04-server-cloudimg-amd64-1.vmdk
Path: /OVAs/ubuntu-16.04-server-cloudimg-amd64/ubuntu-16.04-server-cloudimg-amd64-1.vmdk
Size: 824637442136
Version: 1
Name: photon2-cloud-init.ovf
Path: /sk8-TestUploadOVA/photon2-cloud-init/photon2-cloud-init.ovf
Size: 824636903184
Version: 1
Name: photon2-cloud-init-1.vmdk
Path: /sk8-TestUploadOVA/photon2-cloud-init/photon2-cloud-init-1.vmdk
Size: 824636903208
Version: 1
Name: photon2-cloud-init.ovf
Path: /Public/photon2-cloud-init/photon2-cloud-init.ovf
Size: 824637442304
Version: 3
Name: photon2-cloud-init-1.vmdk
Path: /Public/photon2-cloud-init/photon2-cloud-init-1.vmdk
Size: 824637442328
Version: 3