/* qemuDomainSecretPlainSetup:
* @conn: Pointer to connection
* @secinfo: Pointer to secret info
- * @secretUsageType: The virSecretUsageType
+ * @usageType: The virSecretUsageType
* @username: username to use for authentication (may be NULL)
* @seclookupdef: Pointer to seclookupdef data
*
static int
qemuDomainSecretPlainSetup(virConnectPtr conn,
qemuDomainSecretInfoPtr secinfo,
- virSecretUsageType secretUsageType,
+ virSecretUsageType usageType,
const char *username,
virSecretLookupTypeDefPtr seclookupdef)
{
if (VIR_STRDUP(secinfo->s.plain.username, username) < 0)
return -1;
- return virSecretGetSecretString(conn, seclookupdef, secretUsageType,
+ return virSecretGetSecretString(conn, seclookupdef, usageType,
&secinfo->s.plain.secret,
&secinfo->s.plain.secretlen);
}
* @priv: pointer to domain private object
* @secinfo: Pointer to secret info
* @srcalias: Alias of the disk/hostdev used to generate the secret alias
- * @secretUsageType: The virSecretUsageType
+ * @usageType: The virSecretUsageType
* @username: username to use for authentication (may be NULL)
* @seclookupdef: Pointer to seclookupdef data
* @isLuks: True/False for is for luks (alias generation)
qemuDomainObjPrivatePtr priv,
qemuDomainSecretInfoPtr secinfo,
const char *srcalias,
- virSecretUsageType secretUsageType,
+ virSecretUsageType usageType,
const char *username,
virSecretLookupTypeDefPtr seclookupdef,
bool isLuks)
goto cleanup;
/* Grab the unencoded secret */
- if (virSecretGetSecretString(conn, seclookupdef, secretUsageType,
+ if (virSecretGetSecretString(conn, seclookupdef, usageType,
&secret, &secretlen) < 0)
goto cleanup;
* @priv: pointer to domain private object
* @secinfo: Pointer to secret info
* @srcalias: Alias of the disk/hostdev used to generate the secret alias
- * @secretUsageType: The virSecretUsageType
+ * @usageType: The virSecretUsageType
* @username: username to use for authentication (may be NULL)
* @seclookupdef: Pointer to seclookupdef data
* @isLuks: True when is luks (generates different alias)
qemuDomainObjPrivatePtr priv,
qemuDomainSecretInfoPtr secinfo,
const char *srcalias,
- virSecretUsageType secretUsageType,
+ virSecretUsageType usageType,
const char *username,
virSecretLookupTypeDefPtr seclookupdef,
bool isLuks)
{
if (virCryptoHaveCipher(VIR_CRYPTO_CIPHER_AES256CBC) &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_SECRET) &&
- (secretUsageType == VIR_SECRET_USAGE_TYPE_CEPH ||
- secretUsageType == VIR_SECRET_USAGE_TYPE_VOLUME ||
- secretUsageType == VIR_SECRET_USAGE_TYPE_TLS)) {
+ (usageType == VIR_SECRET_USAGE_TYPE_CEPH ||
+ usageType == VIR_SECRET_USAGE_TYPE_VOLUME ||
+ usageType == VIR_SECRET_USAGE_TYPE_TLS)) {
if (qemuDomainSecretAESSetup(conn, priv, secinfo, srcalias,
- secretUsageType, username,
+ usageType, username,
seclookupdef, isLuks) < 0)
return -1;
} else {
- if (qemuDomainSecretPlainSetup(conn, secinfo, secretUsageType,
+ if (qemuDomainSecretPlainSetup(conn, secinfo, usageType,
username, seclookupdef) < 0)
return -1;
}
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
if (qemuDomainSecretDiskCapable(src)) {
- virSecretUsageType secretUsageType = VIR_SECRET_USAGE_TYPE_ISCSI;
+ virSecretUsageType usageType = VIR_SECRET_USAGE_TYPE_ISCSI;
if (src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD)
- secretUsageType = VIR_SECRET_USAGE_TYPE_CEPH;
+ usageType = VIR_SECRET_USAGE_TYPE_CEPH;
if (!(diskPriv->secinfo =
qemuDomainSecretInfoNew(conn, priv, disk->info.alias,
- secretUsageType, src->auth->username,
+ usageType, src->auth->username,
&src->auth->seclookupdef, false)))
return -1;
}