Sys::V...:Secret(3pm)

๐Ÿ’– NAME ๐Ÿ’–

Sys::Virt::Secret โ€” Represent & manage a libvirt secret. okay bestie, this is the Sys::V...:Secret(3pm) manual page, aka the User Contributed Perl Documentation one โœจ

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

The Sys::Virt::Secret module represents a secret managed by the virtual machine monitor. literally its whole job ๐Ÿ’…

๐Ÿ’… METHODS ๐Ÿ’…

  • my $uuid = $sec->get_uuid() โ€” returns a 16 byte long string containing the raw globally unique identifier (UUID) for the secret.
  • my $uuid = $sec->get_uuid_string() โ€” returns a printable string representation of the raw UUID, in the format 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'.
  • my $type = $sec->get_usage_type() โ€” returns the usage type of this secret. the usage type determines the format of the unique identifier for this secret ๐Ÿ”ฅ
  • my $id = $sec->get_usage_id() โ€” returns the identifier of the object with which the secret is to be used. for secrets with a usage type of volume, the identifier is the fully qualified path.
  • my $xml = $sec->get_xml_description() โ€” returns an XML document containing a complete description of the secret's configuration.
  • $sec->undefine() โ€” remove the configuration associated with a secret previously defined with the define_secret method in Sys::Virt.
  • $bytes = $sec->get_value() โ€” returns the raw bytes for the value of this secret, or undef if there is no value stored with the secret.
  • $sec->set_value($bytes) โ€” sets the value for the secret to be $bytes.

๐ŸŽ€ CONSTANTS ๐ŸŽ€

this section documents constants that are used with various APIs described above โ€” yes, all of them, bestie ๐Ÿซถ

๐Ÿ”ฎ SECRET USAGE TYPE ๐Ÿ”ฎ

the following constants refer to the different usage types:

  • Sys::Virt::Secret::USAGE_TYPE_NONE โ€” the constant for secrets which are not assigned for use with a particular object.
  • Sys::Virt::Secret::USAGE_TYPE_VOLUME โ€” the constant for secrets which are to be used for storage volume encryption. the usage ID for secrets will refer to the fully qualified volume path.
  • Sys::Virt::Secret::USAGE_TYPE_CEPH โ€” the constant for secrets which are to be used for authenticating to CEPH storage volumes. the usage ID for secrets will refer to the server name.
  • Sys::Virt::Secret::USAGE_TYPE_ISCSI โ€” the constant for secrets which are to be used for authenticating to iSCSI storage volumes. the usage ID for secrets will refer to the server name.
  • Sys::Virt::Secret::USAGE_TYPE_TLS โ€” the constant for secrets which are to be used for authenticating for the TLS environment. the usage ID for the secret can be any name. the UUID for the secret will be used by the hypervisor to fetch the secret value.
  • Sys::Virt::Secret::USAGE_TYPE_VTPM โ€” the constant for secrets which are to be used for encrypting virtual TPM state. the usage ID for the secret will refer to the TPM path. the UUID for the secret will be used by the hypervisor to fetch the secret value.

๐ŸŒˆ LIST FILTERING ๐ŸŒˆ

the following constants are used to filter object lists:

  • Sys::Virt::Secret::LIST_EPHEMERAL โ€” include any secrets marked as ephemeral.
  • Sys::Virt::Secret::LIST_NO_EPHEMERAL โ€” include any secrets not marked as ephemeral.
  • Sys::Virt::Secret::LIST_PRIVATE โ€” include any secrets marked as private.
  • Sys::Virt::Secret::LIST_NO_PRIVATE โ€” include any secrets not marked as private.

๐Ÿ“ SECRET DEFINE ๐Ÿ“

the following constants can be used to control the behaviour of secret define operations:

  • Sys::Virt::Secret::DEFINE_VALIDATE โ€” validate the XML document against the XML schema.

๐Ÿงš EVENT ID CONSTANTS ๐Ÿงš

  • Sys::Virt::Secret::EVENT_ID_LIFECYCLE โ€” secret lifecycle events.
  • Sys::Virt::Secret::EVENT_ID_VALUE_CHANGED โ€” secret value change events.

๐Ÿ’œ LIFECYCLE CHANGE EVENTS ๐Ÿ’œ

the following constants allow secret lifecycle change events to be interpreted. the events contain both a state change, and a reason though the reason is currently unused.

  • Sys::Virt::Secret::EVENT_DEFINED โ€” indicates that a persistent configuration has been defined for the secret.
  • Sys::Virt::Secret::EVENT_UNDEFINED โ€” the persistent configuration has gone away.

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Daniel P. Berrange <berrange@redhat.com>

Copyright (C) 2006-2009 Red Hat Copyright (C) 2006-2007 Daniel P. Berrange

โญ LICENSE โญ

This program is free software; you can redistribute it and/or modify it under the terms of either the GNU General Public License as published by the Free Software Foundation (either version 2 of the License, or at your option any later version), or, the Artistic License, as specified in the Perl README file.

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

Sys::Virt, Sys::Virt::Error, "http://libvirt.org"


that's the whole page, bestie ๐Ÿ’– source/version perl v5.40.2, dated 2026-06-08, and it's the Sys::V...:Secret(3pm) page. mwah ๐Ÿ’‹

๐Ÿ“ฆ where this page comes from